Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

stateful session bean and interceptors  RSS feed

 
Jonathan Elkharrat
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...)
 
Anish Mathur
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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!