• 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

Local vs Remote EJB's in clustered environment

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

Our system is a web application using SLSB's in a clustered environment on WAS 5.0 (with an upcoming upgrade to WAS 5.1)
Untill now we have used Remote SessionBeans.

Correct me if I am mistaken:
we can use Local EJB's (SLSB) when the web container and EJB container are running in the same JVM.

How can I determine if the web container and EJB container are running in the same JVM?
Is this something I can configure in WAS, where?

Regards,

Ruud
[ August 22, 2005: Message edited by: Ruud Steeghs ]
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ruud,

Yes you are right, if your webcontainer and EJB container run in the same JVM you can use local interfacing.
In WAS 5 each application server has it own JVM. So if your web container and ejb container are in the same application server they are in the same JVM.
This also means that if you have multiple applications deployed in the same application server they also run in the same JVM.

Check out this redbook http://www.redbooks.ibm.com/redbooks/SG246195/ for more information about the websphere application server.

Regards,
Lars
 
Ruud Steeghs
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We've got a clustered environment with two (maybe three) machines with 2 WAS instances on it. So we've got 4, maybe 6 WAS instances with the whole application deployed on each WAS instance.
There's a load balancer taking care of balancing the load of all requests to the WAS instances.

Is there any reason to use Remote SLSB's (being called from the web app)?

Cheers,

Ruud.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ruud Steeghs:
Is there any reason to use Remote SLSB's (being called from the web app)?


Only if you think there is a chance that the web layer will want to call an arbitrary EJB. In practice, this is unlikely to happen. And if it does, you can change your deployment descriptor then.
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ruud,
Local vs Remote interfaces?.....mmm...
The methods in your ejb's are reusable or may become reusable by another application in the future? if that's the case then you should implement remote interface.
But if the methods in your ejb's are only used by your webmodule then you should implement local interface so you can get better performance.
I see no complication by implementing local & remote interfaces, that way you could use local interfaces for now, and when the time comes for an application to use your ejb's methods, they could get them using the already implemented remote interface.

Consider the fact that remote interface is more expensive in performance that local interface.

best regards...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic