Meaningless Drivel is fun!
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Conversational state and passivation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Conversational state and passivation" Watch "Conversational state and passivation" New topic

Conversational state and passivation

Deepak Jain
Ranch Hand

Joined: Aug 05, 2006
Posts: 637
The following conversational state will be passivated and restored correctly by the container and the bean provider does not have to do anything.

I) A reference to an enterprise bean�s business interface.

i) The above statement applies to session beans, because MDB and entity beans do not have business interface. Is this correct?

ii) If my stateful session bean has a reference to other session bean instance [Logically a stateless session bean], For example the statefull session bean might be using services from other stateless session beans to accomplish its business. These references will be automatically restored by the container.

The thing that i am trying to say is Statefull Session Bean has

Here HelloUser is the Stateless "WelcomeBean" 's remote business interface. [MDB, Entity beans do not have such business interface]. When the bean is passivated and activated again.

More Questions
a) Will bean will point to WelcomeBean instance or will it be lost and have null?
b) If WelcomeBean was a statefull session bean, will its instance fields be restored , provided they one of the EJB 3.0 Core Specification 4.2.1 Instance Passivation and Conversational State defined members ?

II) A reference to an enterprise bean�s remote interface, even if the stub class is not serializable.
i) Does remote interface mean, Remote business interface defined with @Remote annotation ?
ii) What does it mean when the specification says "Stub class is not serializable" ?
iii) A stateful sesion bean will have a reference to enterprise beans that are not in this container using Remote interface reference. Is this statement correct ?
Does the Stub class refers to the instance of such beans [session bean] ?
Does "Stub class is not serializable" means that the class is not implementing "" interface?

In the above case : One thing is sure that the instance has to be moved to secondary storage during passivation. Now if that class is not implementing iterface then Container can use its own technique to achive Passivation.

Wow i just realized, was this the reason now that beans are not required to implement interface ? And since the above rule was removed the sesison bean will be passivated using any technique and not Java Serialization technique that was used when bean were forced to implement interface prior to EJB 3.0.If all my above statements are correct then i will say "Good improvisation by EJB Container"
i) Container is not tied with Java Serialization techinique.Container can now use any technique.
ii) Bean provider are freed from forcing beans implement interface.
III) A reference to an enterprise bean�s remote home interface, even if the stub class is not serializable.

In case of EJB 3.0 there is no concept of home interface [In fact i don';t even know what does home mean?]

Why is there a mention of home ???

Deepak Jain
Ranch Hand

Joined: Aug 05, 2006
Posts: 637
Experts, Please take time and reply.
I agree. Here's the link:
subject: Conversational state and passivation
It's not a secret anymore!