public Object invoke(Invocation invocation) throws Throwable
{
EJBContainerInvocation<EJBContainer, BeanContext<?>> containerInvocation = (EJBContainerInvocation<EJBContainer, BeanContext<?>>) invocation;
EJBContainer container = getEJBContainer(invocation);
ComponentStack ccm = container.getCachedConnectionManager();
if(ccm == null)
{
log.warn("EJBTHREE-1028: No ejb3 CachedConnectionManager installed");
return containerInvocation.invokeNext();
}
Object key = containerInvocation.getBeanContext().getInstance();
ccm.pushMetaAwareObject(key, unsharableResources);
try
{
return containerInvocation.invokeNext();
}
finally
{
ccm.popMetaAwareObject(unsharableResources);
}
}