Win a copy of Pipeline as Code this week in the Cloud/Virtualization 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
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Stub and serialization

 
Ranch Hand
Posts: 8944
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I want to know why do we need EJBHandle when we can serilaize stubs. If stubs weren't serializable we would not be able to dynamically download them.
I was just wondering if it was because we are programming to an interface i.e. EJBObject rather than some implementation class and EJBObjects themselves are not serializable. Am I right?
 
Pradeep bhatt
Ranch Hand
Posts: 8944
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No reply!
 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Pradeep Bhat:
Hi,
I want to know why do we need EJBHandle when we can serilaize stubs. If stubs weren't serializable we would not be able to dynamically download them.
I was just wondering if it was because we are programming to an interface i.e. EJBObject rather than some implementation class and EJBObjects themselves are not serializable. Am I right?



From what I understand, the stubs are for remotly accessing remote interfaces and not the bean, but a handle actually an identifies a particular EJB in the server. So serializing stub dosen't solve the purpose ... Think you too mean the same ???
 
Pradeep bhatt
Ranch Hand
Posts: 8944
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If stub cannot identify the EJBObject how can it invoke calls on the server.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
  • You can serialize the handle and acquire an EJBObject reference from it after a server restart. This is clearly stated in the specification.
  • An EJBObject reference does survive a server restart. Furthermore, you might be able to serialize the EJBObject reference and acquire an EJBObject reference afterwards, depending on the application server's implementation because the client-side stubs need not be serializable.


  • Does everyone agree with these statements?
     
    Pradeep bhatt
    Ranch Hand
    Posts: 8944
    Firefox Browser Spring Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Why is the stub not serializable ? If it not then how does it get dynamically downloaded.
    Are you saying that we need to copy the stub in the clients classpath and stub does not get downloaded.
    If we need to copy the stub in the clients classpath then the stub need not be serializbale but is it how it work. Stubs should be dynamically downloadable.
    I havent found any asnwer for this question.
    [ August 15, 2003: Message edited by: Pradeep Bhat ]
     
    Greenhorn
    Posts: 3
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi Pradeep,
    In some app servers, stubs get automatically downloaded and in some it has to be in classpath.
    say, in Iplanet : stubs has to be in classpath.
    In jboss : stubs are automatically downloaded.
    I believe these things are container specific, what do you say!
    bye
    vinay
     
    Time is mother nature's way of keeping everything from happening at once. And this is a tiny ad:
    SKIP - a book about connecting industrious people with elderly land owners
    https://coderanch.com/t/skip-book
    reply
      Bookmark Topic Watch Topic
    • New Topic