File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Local Home / Remote Interface in a clustered environment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Local Home / Remote Interface in a clustered environment " Watch "Local Home / Remote Interface in a clustered environment " New topic
Author

Local Home / Remote Interface in a clustered environment

Lakshmi Anantharaman
Ranch Hand

Joined: Aug 01, 2001
Posts: 58
Does having localHome and LocalRemote objects provide any significant performance improvement in the clustered weblogic environment.

Will this be a significant change incode considering we already have full flegded app runting on 6 instance with approximately a load of 25000 users in total. millions of line s of code (enttiy / session / servlets )

Also wondering if the Service locator pattern is useful in a scenario with localHome and localremote objects and otherwise.

Thanks
Lakshmi
Valentin Tanase
Ranch Hand

Joined: Feb 17, 2005
Posts: 704
There are couple of things that will definitely help, depending what type of container you are using. Weblogic for example will try to pass parameters to ejb method calls by reference if the caller and the ejb are running within the same jvm and loaded with the same classloader. In order to achieve that you need to set the next configuration parameter:

Secondly Weblogic will always optimize the access for collocated ejb objects. What that means is that ejb A (or a servlet or jsp, etc) calls ejb B weblogic will always try to forward the call to an instance B running on the same server instance like A.
Regards.


I think, therefore I exist -- Rene Descartes
Lakshmi Anantharaman
Ranch Hand

Joined: Aug 01, 2001
Posts: 58
Thanks for the feedback .
And yes we are using Weblogic
Lakshmi Anantharaman
Ranch Hand

Joined: Aug 01, 2001
Posts: 58
I thought it may be helpful to add this here

enable-call-by-reference
Range of values:
True | False

Default value:
False

Parent elements:
weblogic-enterprise-bean


Function
When enable-call-by-reference is False, parameters to the EJB methods are copied´┐Żor passed by value´┐Żregardless of whether the EJB is called remotely or from with the same EAR.

When enable-call-by-reference is True, EJB methods called from within the same EAR file or standalone JAR file will pass arguments by reference. This improves the performance of method invocation since parameters are not copied.

Note: Method parameters are always passed by value when an EJB is called remotely.

Example
<weblogic-enterprise-bean> <entity-descriptor> <ejb-name>AccountBean</ejb-name> ... <enable-call-by-reference>False</enable-call-by-reference> </entity-descriptor></weblogic-enterprise-bean>
[ May 20, 2005: Message edited by: Laksh Anan ]
Lakshmi Anantharaman
Ranch Hand

Joined: Aug 01, 2001
Posts: 58
On top of this would we need a LocalHome and Localremote interfaces for session/entity beans or a service locator pattern to cache home references

Thanks,
-Lakshmi Anantharaman
[ May 20, 2005: Message edited by: Laksh Anan ]
Valentin Tanase
Ranch Hand

Joined: Feb 17, 2005
Posts: 704

On top of this would we need a LocalHome and Localremote interfaces for session/entity beans or a service locator pattern to cache home references

Is this a question?
Regards.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Local Home / Remote Interface in a clustered environment