• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

ejbPassivate() for Stateful session bean

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
According to spec, for SFSB, after ejbPassivate(), if there are still some fields not meet the requirements of serialization, the container may choose to destroy the bean instance, so if the clients try to invode the business method on this bean, client gets a ObjectNotFoundException, isn't it ?
 
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jason,

You are correct in stating that the sfsb is destroyed if the container could not passivate it.

However, when the client invokes a biz method on the bean's component interface (after the bean is destroyed) it will get a system exception rather than javax.ejb.ObjectNotFoundException (which is an application exception thrown from entity bean's single finder methods when an entity with the specified attributes cannot be found in the underlying persistence store):

* java.rmi.NoSuchObjectFoundException - remote clients will get this system exception
OR
* javax.ejb.NoSuchLocalObjectFoundExceptio - local clients will get this system exception


Hope it helps
 
Jason Hunt
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
alex, thank you very much, it is all clear now
 
Rototillers convert rich soil into dirt. Please note that this tiny ad is not a rototiller:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic