This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes local vs remote in clustered environments Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "local vs remote in clustered environments" Watch "local vs remote in clustered environments" New topic
Author

local vs remote in clustered environments

chinedu efoagui
Ranch Hand

Joined: Feb 11, 2003
Posts: 167
pls i am deploying my aplication in a clustered server (weblogic) environment .pls i would like to ask if in using clustering u will have to call remote home objects in ur code rather than local home objects.
i would pefer local due to better performance .but since i am deploying on different machines, should i then call remote methods from the remote home objects
or does it matter?
thanks


--One learns a lot during a lesson but seeing is not enough,you must do;knowing is not enough ,you must apply--<br />SCJP 1.4,SCBCD,SCEA part 1,OCM JEE Enterprise Architect.
Valentin Tanase
Ranch Hand

Joined: Feb 17, 2005
Posts: 704
Hi Chinedu,

You can always use the local interfaces. WL uses cluster-aware stubs when clustering is enable. This means that the stub implements the routing algorithm (which by default is the round-robin) and it will forward the request to the next server instance in the cluster. However WL will always bypass the routing algorithm if the request originates from within the container. WL will redirect the request to the same instance to improve the performances.
Bottom line is that your request (from one ejb to another) will never leave the server instance, no matter whether you�re using remote or local interfaces. The only difference is that using the remote calls will add the extra RMI overhead.
Regards


I think, therefore I exist -- Rene Descartes
chinedu efoagui
Ranch Hand

Joined: Feb 11, 2003
Posts: 167
thanks a lot.
Valentin Tanase
Ranch Hand

Joined: Feb 17, 2005
Posts: 704
You are very welcomed!
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: local vs remote in clustered environments
 
Similar Threads
JVM query in WAS
java.lang.error with Weblogic cluster
Help -- Composite Enitity Pattern vs EJB 2
caching local objects
local / remote interfaces ?