Aashish,
The EJB specification (both 1.1 and 2.0) is quite clear on what
happens when handles (or remote reference) becomes invalid and a
client attempts to use it.
In that case, the Container should throw a:
java.rmi.NoSuchObjectException
in case of a remote client. Or a:
javax.ejb.NoSuchObjectLocalException
in case of a local client.
So, for a SLSB or an entity bean, the handle should work in all
cases. If the underlying row from the database has been deleted,
then the above exception would be raised, else the Container will
recreate the instance on the server transparently.
For a SFSB, unless it has been evicted or destroyed, attempts to
use the handle will activate that instance (say from wherever it
has been passivated). Else, the above exception would be raised.
-krish
Borland
> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]] On Behalf Of Aashish Kaushik
> Sent: 26 September 2002 11:59
> To: [EMAIL PROTECTED]
> Subject: Re: Handle To an Entity Bean ????
>
>
> Hello Ashwini ,
> I asked about handles and they are kept on client side and
> not in the container. What i wanted to know is that ,if by
> the time i deserailize my handle my Bean goes out of scope or
> remove method is called what happens to the handle and what
> does it actually returns, will it throw the remote exception
> or what ?? How does the EJB container resoponds to such situations ???
> ***********************************
>
>
>
> Ashwani Kalra
> <[EMAIL PROTECTED] To:
> [EMAIL PROTECTED]
> NT.COM> cc:
> Sent by: A Subject: Re:
> Handle To an Entity Bean ????
> mailing list for
> Enterprise
> JavaBeans
> development
> <EJB-INTEREST@JAV
> A.SUN.COM>
>
>
> 09/26/02 04:17 AM
> Please respond to
> Ashwani Kalra
>
>
>
>
>
> Container is responsible for providing you equivalent
> functionality. For stateful beans for eg it creates the
> instance populates it to the state when it was deserialized.
> Client need not worry about it. --Ashwani
>
>
> ----- Original Message -----
> From: "Aashish Kaushik" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, September 26, 2002 2:21 PM
> Subject: Handle To an Entity Bean ????
>
>
> > 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.
> >
> > 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.
> >
> >
> ==============================================================
> =============
> > 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".
> >
>
> ==============================================================
> =============
> 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".
>
> ==============================================================
> =============
> 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".
>
>
===========================================================================
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".