I am migrating a project from OC4J server to Weblogic. It uses an ejb-jar.xml file and Spring framework AbstractStatelessSessionBean implementation. I get an error:
SessionBean MessagingManager implements SessionBean interface, but PreDestroy callback hasn't been applied to the ejbRemove method
I googled this, and found absolutely nothing. The MessagingManager in question has the PreDestory annotation in a cleanUp() method not the ejbRemove method (I'm guessing because AbstractStatelesSessionBean is implemented).
Here's some code:
public class MessagingQueueManagerImpl extends AbstractStatelessSessionBean
implements AppMessagingManager {
//blah
@Override
// Use Spring DI
protected void onEjbCreate() throws CreateException {
//spring injection variables
}
}
@PreDestroy
public void cleanUp() {
//blah
}
Why is the @PreDestory annotation set on the cleanUp method instead of the ejbRemove method and it worked in OC4J but not Weblogic? I made no changes to the code, only put the ear file into weblogic.
Aucun commentaire:
Enregistrer un commentaire