• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

doubt

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is possible to obtain Handle for remote session beans.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic