Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

doubt

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
Steve Agarwal
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
 
Ranch Hand
Posts: 8943
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is possible to obtain Handle for remote session beans.
 
Thank you my well lotioned goddess! Here, have my favorite tiny ad!
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic