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 home Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "local home, remote home" Watch "local home, remote home" New topic
Author

local home, remote home

trupti nigam
Ranch Hand

Joined: Jun 21, 2001
Posts: 613
hi,
what is the difference between local home & remote home?
In weblogic there is a deployment property "local-jndi-name" which is used to specify the local home jndi name..if there are 2 homes i.e. local & remote then 2 separate Jndi names needs to be provided..
thanks in advance
trupti
Dave Landers
Ranch Hand

Joined: Jul 24, 2002
Posts: 401
A local home goes along with the local component interface, and the remote home goes with the remote interface. Starting with EJB 2.0, an EJB may have either or both.
The remote interface is the same as EJBs have had since the beginning - they are able to be called remotely (from another VM or another computer) using RMI or CORBA.
A local interface to an EJB is only allowed to be called from within the same JVM, so only code running on the same app server can use it.
The other difference is that parameters passed to (and returned from) a remote are passed by-value. That means they are serialized and the EJB gets a copy of what the client passed. Parameters to local interfaces are passed by reference (just like calling a regular java object).
An EJB can have either of these or it can have both. If it has both, they are allowed to have different methods (or the same methods).
They will need separate jndi names, although you sometimes don't need a "global" jndi name if you use ejb-ref and ejb-link to reference them.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: local home, remote home
 
Similar Threads
Error in deploying stateless session bean 2.1 on Jboss 5 GA
Local and Remote homes
Problem with Local home interfce accessing in EJB.....
Class Cast Exception
accessing local home