Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Interceptor Lifecycle callback issue.

 
Roy Pozarelli
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm confused by the output that I have (see the bottom) for the following code:


I have 3 other classes with the only difference in the numbers.



I have no other information in the DD for the interceptors.

The following is the output that I get in Glassfish Server 3.1.1 window.

INFO: Test1 was successfully deployed in 510 milliseconds.
INFO: ReportInterceptor1.myInit() was called before.
INFO: ReportInterceptor2.myInit() was called before.
INFO: Advice.myInit() called before.
INFO: Advice.myInit() called after.
INFO: ReportInterceptor2.myInit() was called after.
INFO: ReportInterceptor1.myInit() was called after.
INFO: ReportInterceptor 1 : MyBeans.Advice.getLocalAdvice() was called before.
INFO: ReportInterceptor 2 : MyBeans.Advice.getLocalAdvice() was called before.
INFO: ReportInterceptor 3 : MyBeans.Advice.getLocalAdvice() was called before.
INFO: ReportInterceptor 3 : MyBeans.Advice.getLocalAdvice() was called after.
INFO: ReportInterceptor 2 : MyBeans.Advice.getLocalAdvice() was called after.
INFO: ReportInterceptor 1 : MyBeans.Advice.getLocalAdvice() was called after.
INFO: ReportInterceptor 1 : MyBeans.Advice.getLocalAdvice() was called before.
INFO: ReportInterceptor 2 : MyBeans.Advice.getLocalAdvice() was called before.
INFO: ReportInterceptor 3 : MyBeans.Advice.getLocalAdvice() was called before.
INFO: ReportInterceptor 3 : MyBeans.Advice.getLocalAdvice() was called after.
INFO: ReportInterceptor 2 : MyBeans.Advice.getLocalAdvice() was called after.
INFO: ReportInterceptor 1 : MyBeans.Advice.getLocalAdvice() was called after.
INFO: ReportInterceptor1.myCleanup() was called before.
INFO: ReportInterceptor2.myCleanup() was called before.
INFO: Advice.myCleanup() called before.
INFO: Advice.myCleanup() called after.
INFO: ReportInterceptor2.myCleanup() was called after.
INFO: ReportInterceptor1.myCleanup() was called after.


I get the myCleanup() messages since I "undeploy" the application. What confuses me is that I do NOT get a
INFO: ReportInterceptor3.myInit() was called before. (or "after")
or
INFO: ReportInterceptor3.myCleanupt() was called before. (or "after")
message.

The only difference that is evident is that the 1 & 2 are class level interceptors and 3 & 4 are method level interceptors. I used a *.jsp file to invoke the getLocalAdvice(). So why am I seeing this output?

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic