• 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

stateful session bean and interceptors

 
Ranch Hand
Posts: 170
Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Interceptors have the same life cycle as the bean they intercept.
for stateless beans i guess one implementation can be one (or a pool of) interceptor instance.
but for stateful session bean, they are activated and passivated along with the bean, so does
that mean for every instance of stateful bean the container create and associate a whole bunch
of interceptors with it? (not to mention any resource injection they might have. sounds like memory eating to me...)
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, for stateful session beans, the interceptor instances are passivated upon bean instance passivation, and activated when bean instance is activated. Sec 12.2 in specifications.

Interceptor has PrePassivate & PostActivate callback methods these can be used to release and accquire the resources.
 
Don't destroy the earth! That's where I keep all my stuff! Including this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic