File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes doubt 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 "doubt" Watch "doubt" New topic
Author

doubt

Steve Agarwal
Ranch Hand

Joined: Feb 02, 2003
Posts: 51
Please correct me if i am wrong.
1) stateless session beans doenst have handle for serialization
2) local SFSB doesnt have handle for serialization (WHY)
Steve


SCJP1.4,SCWCD, SCBCD, SCEA part 1<br />"Its feels good to know the stuff in detail."
hover cheng
Ranch Hand

Joined: Feb 11, 2003
Posts: 66
Let me have a try. Whether handles can be derived from ejb home/component interfaces depends on whether it's local or remote. For local home/component interfaces, they cannot; for remote home/compoent interfaces, they can.
I think the reason is, for references to remote home/component interfaces, they are NOT guranteed serializable, so it need some machnism(handles)serializable in order to pass them through network; but for references of local home/component interfaces, they are NOT intended to be passed through network (actually, they are pass-by-reference only locally).


SCJP 91% SCJD 94% SCBCD 98% SCWCD1.4 86%<p>XML141 SCDWJS -- in progress<br />If you don't retreat, you are mostly among those who can surmount it.
Steve Agarwal
Ranch Hand

Joined: Feb 02, 2003
Posts: 51
Let me have a try. Whether handles can be derived from ejb home/component interfaces depends on whether it's local or remote. For local home/component interfaces, they cannot; for remote home/compoent interfaces, they can.
I think the reason is, for references to remote home/component interfaces, they are NOT guranteed serializable, so it need some machnism(handles)serializable in order to pass them through network; but for references of local home/component interfaces, they are NOT intended to be passed through network (actually, they are pass-by-reference only locally).

handle are obtained by EJBObject.getHandle()... ( I am sorry I dont think they are derived. )
I am confused with now. As per my know how Serialization is to do with marshelling and unmarshelling.
For SLSB -- no handle (remote + local ) -- makes sense as the client just runs the methods and dont care about the other things.
For SFSB -- we have handle for remote client. example Cart.
For the local cases why cant a servlet like to keep the handle of localHomeSFSB and use it later when the client returns. ( Local only say its in same JVM but dont we any scenario where local handle's use would be required. ) May be handle we only need for PortableRemoteObject.narrow( I am not sure on this ).
Steve
hover cheng
Ranch Hand

Joined: Feb 11, 2003
Posts: 66
Steve,
I notice that your question is based on that handles can not be obtained from SLSB. I am not sure where this is based. I only find the following in EJB 2.0 spec:

7.11.6 Handle classes
The deployment tools are responsible for implementing the handle classes for the session bean�s remote home and remote interfaces.

It does not discriminate stateful or stateless anyway, and I can not find anything asserting that handles can not be obtained from SLSB... Correct me if I am wrong.
Regards,
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

It is possible to obtain Handle for remote session beans.


Groovy
 
Don't get me started about those stupid light bulbs.
 
subject: doubt