> >Can anyone help me with handles...
> >
> >1   : Is ther any situation where they become just absolutely necessary to
> >      use...
>
> When a container wants to passivate a stateful session bean, using
> handles is the best way to ensure that any references it holds to other
> beans are preserved.

  This is logical thanks...




>
> >2   : In case of entity beans.. I serialize the handle shut down the
> >    server .. and again when i restart the server i am able to use that
> >    handle.. That means it is also containing some context kind of info
> >    that stores the primary key that was associated with it when it was
> >    active...when does a server actually decides to kill an EJBObject..
>
> This is implementation dependent. The only thing you, as a bean
> developer, care about is that the container should implement the
> responsibilities defined in the EJB spec.

  I think iam not particularly clear about what specs say about this...
  But if I can reconstruct the whole EJBObject using the serialized handle
then its OKAY but if the container needs to keep ceratin issues related to
handle so that a client reconnecting again (or for that matter the server
restarting again..) may need to have that info.. that will lead to real
big overhead for that server for how will the server choose between which
references are serialized at the Client and which are not..?



>
> However, if you (like me) want to write an EJB container, then it's a
> bit trickier. The way we do it in jBoss (jboss.org) is to only have
> logical EJB-objects being implemented by one physical "EJB-object".
>
> >3   : When i cal a findbymethod what is called first in case of CMP a
> >     setEntity context or an ejbLoad...?  why..?
>
> An EJB-instance may only be used after it has been successfully
> instantiated. Instantiation in EJB is done by:
> 1. Doing newInstance on the EJB-class
> 2. Calling setEntityContext

  Consider this problem...

   I am obtaining a ref to home from my client and then calling a
findByMethod .. at the server side the following methods are called in
sequence..
    First an ejbLoad...
    then an setEntityContext..

     Then if i call any other method on the instantiated bean it calls the
ejbLoad once again..

   What i thought that in order to instantiate a bean setContext should
have been the first method to be called..
Iam using weblogic 5

tthat finishes my problems..
write back..
thanks..
 bhowmik..





>
> This is the only requirement. After that it can be used to
> 1. Serve home-invocations (such as a finder)
> 2. Hold the state of a particular instance (i.e. it is an "active"
> instance)
>
> Makes sense?
>
> /Rickard
>
> --
> Rickard �berg
>
> @home: +46 13 177937
> Email: [EMAIL PROTECTED]
> http://www.telkel.com
> http://www.jboss.org
> http://www.dreambean.com
>
> ===========================================================================
> 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