On invoking an @Asynchronous
method in EJB, I see an error getting logged though the method execution works fine. Any suggestion on what is going wrong?
EJB 3.1 on WebSphere V8
The interface is :
@Local
public interface MyService {
@Asynchronous
public void doJob(MyObj o);
}
The implementation class :
@Stateless
@Local(MyService.class)
public class MyBean implements MyService {
@Asynchronous
public void doJob(MyObj o) {
// insert to DB
}
}
Error message
CWWAM1101E: In class {0} the method {1} is annotated with @Asynchronous but must be applied to a business method of a bean class or to a business method of a Local/Remote business interface.