Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Local vs Remote EJB's in clustered environment

 
Ruud Steeghs
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • 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 ]
 
Lars Vonk
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34422
347
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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.
 
Hiroshi Tominaga
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • 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...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic