aspose file tools
The moose likes Spring and the fly likes Question about Spring RMI wrapper Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Spring
Reply Bookmark "Question about Spring RMI wrapper" Watch "Question about Spring RMI wrapper" New topic
Author

Question about Spring RMI wrapper

Claude Moore
Ranch Hand

Joined: Jun 24, 2005
Posts: 101
Good morning,

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).

Thank you in advance for your support.
Mario Gray
author
Greenhorn

Joined: Mar 28, 2011
Posts: 3

Claude,

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.

You should finally visit the well written Spring reference manual for more details. here is a link to the remoting section: http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/remoting.html


I hope this helps your decision making process. And let us know if you have any more questions!

Thanks,
Mario
Claude Moore
Ranch Hand

Joined: Jun 24, 2005
Posts: 101
Hi Mario,

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.

Thank you again.
Best regards,
Claude.
 
 
subject: Question about Spring RMI wrapper
 
Threads others viewed
DWR on the server-side
GWT source jar inclusion for serverside code... all the spring jars?!
Spring in Action: Good start to programming Spring in my work?
Spring Usage
Distributed systems, which protocol to use ?
developer file tools