File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Interceptor Lifecycle callback issue. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Interceptor Lifecycle callback issue." Watch "Interceptor Lifecycle callback issue." New topic
Author

Interceptor Lifecycle callback issue.

Roy Pozarelli
Ranch Hand

Joined: Oct 17, 2009
Posts: 42
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?


OCP Java SE 6 Programmer,
OCM Java SE 6 Developer
OCE Web Components (OCEWD)
OCE JPA 6 (OCEJPAD)
OCE EJB 6 (OCEBCD)
OCE Web Services (OCEWSD)
MySQL Certified Administrator & Developer,
OMG Certified UML Prof. Fund., Int., Adv.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Interceptor Lifecycle callback issue.