All inline

Juan Pablo Lorandi
Chief Software Architect
Code Foundry Ltd.
[EMAIL PROTECTED]

Barberstown, Straffan, Co. Kildare, Ireland.
Tel: +353-1-6012050  Fax: +353-1-6012051
Mobile: +353-86-2157900
www.codefoundry.com


>
> Hello All ,
> I Have a question which i think you guys will be the best to
> answer...!!
>
> My Question :   Since Handles Represents A Serializable
> Remote Refernce to
> The Beans both Session and Entity
>           so how does the Handle keeps a reference of the
> Entity Bean and Statefull Session Beans.

Handle is an INTERFACE. It's not a class. You rely on the BEHAVIOR of a
class implementing Handle, not on its state. A handle doesn't keep a
java object reference, but the identity of whatever it's representing.
For a Entity Bean Remote interface, it would keep a JNDI path to the
home, and possibly the name of the originating server(or just a
HomeHandle) and certainly the serialized PK. A handle will retrive the
same "logical" EJB, not necessarily the same object instance.

>
>           What if we serailize a handle that represents a
> particular instance of the Entity Bean
>           and by the time we deserialize the Handle  , that
> Entity Bean goes out of scope or Dies.

Entity Beans lifetime isn't tied up to Java's garbage collector. If an
EB represents a record in a DB, then the bean is alive for as long as
the record exists. If the record(or any other persistent state the EB
represents) is deleted, then a java.rmi.NoSuchObjectException is thrown.

I'll say it again so it is clear: Handles aren't tied up to Java's
memory management. Garbage collection doesn't affect Handles.

HTH,

JP

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to