I am little confused regarding life-cycle callback interceptors.
You said: Return type of life-cycle callback method must be void.
But when I wrote this sample code, it behaved differently. Please go through the following code snippet and help me...

Details: I am using Netbeans 6.9 and EE6 project - Glassfish server 3 Felix.
@Stateless
@Interceptors({TimerInterceptor.class,TestLifecycleCallbackInterceptor.class})
public class EnthuBean implements EnthuBeanRemote {
@PostConstruct
private void myPostConstruct(){
System.out.println("I am in myPostConstruct!");
}
}
// Bean code ends here...
public class TimerInterceptor {
@PostConstruct
public Object myPostConstruct(InvocationContext ic) throws Exception{
System.out.println("I am in postConstruct ------------- starts");
Object obj = ic.proceed();
System.out.println("I am in postConstruct ------------- ends");
return obj;
}
}
public class TestLifecycleCallbackInterceptor {
@PostConstruct
public Object postConstruct(InvocationContext ic) throws Exception{
System.out.println("I am in TestLifecycleCallbackInterceptor.postConstruct starts");
Object obj = ic.proceed();
System.out.println("I am in TestLifecycleCallbackInterceptor.postConstruct ends");
return obj;
}
}
// When I instantiate a EnthuBean, I get following log message
INFO: I am in postConstruct ------------- starts
INFO: I am in TestLifecycleCallbackInterceptor.postConstruct starts
INFO: I am in myPostConstruct!
INFO: I am in TestLifecycleCallbackInterceptor.postConstruct ends
INFO: I am in postConstruct ------------- ends
I am not getting any error message or anything. Please confirm if the above code is aligned with EJB 3.1 spec.
Thanks & Regards,
Prakash Yaji