• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Expose Spring Service as a remote EJB

 
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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?

Any tutorials or information would be great,

Thanks in Advance,

Niall
 
author
Posts: 63
Mac OS X Spring Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
Ken
reply
    Bookmark Topic Watch Topic
  • New Topic