javaee-samples/javaee7-samples

Extra method parameter in org.javaee7.ejb.lifecycle.MyStatefulBean

aguibert opened this issue · 2 comments

The lifecycle callback interceptor methods defined on this bean are as follows:

    @PrePassivate
    private void prePassivate(InvocationContext context) {
        System.out.println("MyStatefulBean.prePassivate");
    }

    @PostActivate
    private void postActivate(InvocationContext context) { 
        System.out.println("MyStatefulBean.postActivate");
    }

However, the interceptor spec says:

Lifecycle callback interceptor methods defined on an interceptor class must have one of the following signatures
void (InvocationContext)
Object (InvocationContext) throws Exception

Lifecycle callback interceptor methods defined on a target class have the following signature
void ()

Since these are lifecycle callback interceptor methods defined on a target class (MyStatefulBean), these methods should be of the form void <METHOD>() rather than void <METHOD>(InvocationContext)

Sounds reasonable.

Do you want to send a PR ?

Opened #272 for this issue.
Closing this issue.