• 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

Timesout and ejbRemove Method.??

 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
All pleae clear my doubt.
when times out occur for a Bean than as per ejb1.1 ejbRemove()method not called then what other method gets called hear?
Ref: EJB ,In O'reilly BOOK.(Mansoon Hafel).
Page : 268 (as per Indian Edition)
 
Ranch Hand
Posts: 1871
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I think you mean the section 6.6.3 of the EJB Specification. This says that the ejbRemove() will not be called on an instance in the following scenarios.
A timeout of client inactivity while the instance is in the passive state. The timeout is specified by the deployer in an EJB Container implementation specific way.
This is specific to an session bean. There is no timeout to an Entity bean( refer lifecycle of an Entity bean at 9.1.4 & ejbRemove( 9.4.3).
If you focus your attention to the section which i have stressed by making it Bold i think you will get the answer. The answer lies in the fact that the ejbRemove method the instance typically releases the same resources that it releases in the ejbPassivate method (6.5.1 ejb spec. 1.1)
How it effects the client
Basically a session Bean services a single client.
In a stateless session bean the above act does not affect the client at all as he may be probably given the same, different or a new instance each time he makes a request.
However in a stateful session bean a specific single bean is servicing a client and its removal(through timeout) will effect the client and an Exception will be raized.

------------------
Regds.
Mahindrakar
 
reply
    Bookmark Topic Watch Topic
  • New Topic