}
}
public void release(CoreDeploymentInfo deployInfo, Object instance) {
// get the mdb call context
ThreadContext callContext = ThreadContext.getThreadContext();
if (callContext == null) {
callContext = new ThreadContext(deployInfo, null);
ThreadContext.enter(callContext);
}
// if we have an mdb call context we need to invoke the after invoke method
MdbCallContext mdbCallContext = callContext.get(MdbCallContext.class);
if (mdbCallContext != null) {
try {
afterInvoke(mdbCallContext.txPolicy, callContext);
} catch (Exception e) {
logger.error("error while releasing message endpoint", e);