This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have 2 applications
* 1st deployed application contains the business code
* 2nd deployed application is a client application that connects to the business code in the 1st application through a remote EJB call
In the 1st deployed application, there is a stateless local EJB bean and the 2nd application connect to this 1st application EJB through a JNDI call using an instance of the remote interface,
I would like to convert the 1st application EJB bean into a Spring service but how can the other application connect to a proxy instance of this converted EJB service?
Check out the Spring Remoting section of the Spring reference manual - I would recommend not using EJB here - you can use any number of lightweight protocols to expose your Spring beans, such as Hessian, Burlap, Spring's HttpInvoker, or RMI.
If this is internal, remoting should be faster than REST but REST is easier and may be fast enough, although that requires mounting a web mvc app in your back teir.
Another angle is to create a facade spring bean, mount the ejb in your 2nd app using the jee:jndi tag as a Spring bean, and make calls to it via this other Spring bean. Expose the new Spring bean with remoting, and gradually move methods into Spring, replacing the EJB with calls to Spring based APis.