On Mon, 17 Jul 2000 10:51:00 +0530, SUDIPTA BHOWMIK
<[EMAIL PROTECTED]> wrote:
>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.
>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.
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
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".