inline...
 
 
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Ashwani Kalra" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, September 26, 2002 3:29 PM
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.
Ofcourse I am saying from that point also. Read on below from specs
 
"The EJB specification allows a client to obtain a handle for the remote home interface. The client can
use the home handle to store a reference to an entity bean�s remote home interface in stable storage, and re-create the reference later. This handle functionality may be useful to a client that needs to use the remote home interface in the future, but does not know the JNDI name of the remote home interface. A handle to a remote home interface must implement the javax.ejb.HomeHandle interface.
The client code must use the javax.rmi.PortableRemoteObject.narrow(...)method to
convert the result of the getEJBHome() method invoked on a handle to the home interface type.
The lifetime and scope of a handle is specific to the handle implementation. At the minimum, a program running in one JVM must be able to serialize the handle, and another program running in a different JVM must be able to deserialize it and re-create an object reference. An entity handle is typically imple-mented" to be usable over a long period of time�it must be usable at least across a server restart.

> 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 ??
From the above last sentance from specs and I dont know what you mean by going out of scope. Yes in case of Entity ejb, if some body has removed the row from the database, then you will get exception as you get normally like NoSuch entity or ObjectNotFound exception as also mentioned by Krish.

> How does the EJB container resoponds to such situations ???
> ***********************************
It will throw appropriate exceptions.
 

>
>
>                                                                                               
>                     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".
>
>
>
>
>

Reply via email to