@Override
public <T> T get(Contextual<T> bean,
CreationalContext<T> creationalContext)
{
TransactionImpl xa = _xaManager.getCurrent();
if (xa == null || ! xa.isActive()) {
throw new ContextNotActiveException(L.l("'{0}' cannot be created because @TransactionScoped requires an active transaction.",
bean));
}
ScopeContext cxt = (ScopeContext) xa.getResource("caucho.xa.scope");
if (cxt == null) {
cxt = new ScopeContext();
xa.putResource("caucho.xa.scope", cxt);
xa.registerSynchronization(cxt);
}
T result = cxt.get(bean);
if (result != null || creationalContext == null)