I've just a very beginner's question about Spring. I'm in doubt if RMI remoting with Spring may used inside a WebContainer like Tomcat, or may be used only in a server program (not an application server).
Actually I'm using, with some success, HTTPInvoker to deal with RPC calls between a client, but I'd like to use RMI approach, since I think that may be faster (or, at least, I'd try it to take some measurements).
The Spring Framework of course allows your application in any container or server environment. The only difference is how you will access the Spring context. So for instance you are probably familiar with ApplicationContext or GenericApplicationContext as you are currently operating within a stand alone server mode application.
When working within a web environment you will deal with the WebApplicationContext ( a decendent of ApplicationContext), while having set it up within your web.xml file. There are a number of ways to do this, with the most straightforward one being to configure Spring's DispatcherServlet that will also get hooked up with your configuration XML, or if you prefer JavaConfig style @Configuration scanning.
All of the supported remoting technologies (RMI, HTTP, JMS, ETC...) will be available through Spring in whatever environmentyour application is in. You can even setup Hessian endpoints with ease. They are fast, cross-platform, and transmit in binary.
thank you very much for your reply. To be quite honest, I'm at a very beginner's stage with Spring, so I'm not very comfortable with even basic Spring's concepts like WebApplicationContext. Of course, I want to study as much as possible to gain a good knowledge of Spring, but at the moment I'm trying to solve some transmission issue (network latency) between a Swing client and a remote Applications server. So, I was in doubt about RMI invoker ina J2EE application server enviroment, just because I supppose that, in order to work, Spring framework must bind some service TCP port to listen to... and I was not sure that was a feasible solution.
I' ve tried Hessian and I found it fast, but I encountered some issues in serializing complex objects... so I just want to try the RMI approach.