File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Local Home / Remote Interface in a clustered environment

 
Lakshmi Anantharaman
Ranch Hand
Posts: 58
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 704
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Lakshmi Anantharaman
Ranch Hand
Posts: 58
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the feedback .
And yes we are using Weblogic
 
Lakshmi Anantharaman
Ranch Hand
Posts: 58
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 58
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 704
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic