Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

LifeCycle Callback interceptor question

Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In LifeCycle Callback interceptors , I did not write invocationContext.proceed() has the last statment.
Still the interceptors associated with the buisness method was executed and finally buisness method was executed.
How is this possible ? since if invocationContext.proceed() is not the last statement then the rest of the interceptors
and finally the buisness methods do not execute.

Further the "init" set in ContextData of the above lifecycle callback interceptor was not visible in the other interceptors.
System.out.println("init:"+invocationContext.getContextData().get("init")); in other interceptors returned null. How is this possible?

From EJB IN Action
"That is the whole point of calling the InvocationContext.
proceed method in lifecycle interceptor methods as in the resource
logger code. This ensures that the next lifecycle interceptor method in the invocation chain or the bean lifecycle method is triggered."
Posts: 14691
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One thing you're not telling us is : do you see all the System.outs from this method in your log ?
And then we all jump out and yell "surprise! we got you this tiny ad!"
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic