Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

stateful session bean and interceptors

 
Ranch Hand
Posts: 170
Ubuntu
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
The only taste of success some people get is to take a bite out of you. Or this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic