When looking over the APIs, I see that I can hold a reference to a EJB using a primary key (entity), a Remote interface (EJBObject), a handle (getHandle()).
 
Will the remote interface or handle cause the bean to be activated automatically if I invoke on it?  Will it follow if the bean is moved to another JVM during a load balance or failover?  I'm not sure how these all are different and if holding handles/remotes is a good thing. 
 
For example, a remote seems like the right thing to hold if you will reuse the bean since you avoid the JNDI lookups and time to connect to the remote object (so the primary key does not seem that great except for the first lookup).  But, will the plumbing automatically take care of the case when the remote referenced object is passivated or moves to another JVM?
 
David

Reply via email to