public boolean outsideStartup() { return getInvocationAttribute() != ComponentInvocationType.SERVICE_STARTUP; } }
public void setTransactionCompeting(boolean b) { ComponentInvocation curr = invMgr.getCurrentInvocation(); if (curr != null) curr.setTransactionCompeting(b); }
private ComponentInvocation createComponentInvocation(String componentId, String appName, String moduleName) { if (componentId == null && appName == null && moduleName == null) { return null; } ComponentInvocation newInv = new ComponentInvocation( componentId, ComponentInvocation.ComponentInvocationType.SERVLET_INVOCATION, null, appName, moduleName ); return newInv; }
public EntityManager lookupExtendedEntityManager(EntityManagerFactory emf) { EntityManager em = null; ComponentInvocation inv = invMgr.getCurrentInvocation(); if( (inv != null) && (inv.getInvocationType() == ComponentInvocation.ComponentInvocationType.EJB_INVOCATION )) { Object obj = inv.getContainer(); if (obj instanceof JavaEEContainer) { em = ((JavaEEContainer) obj).lookupExtendedEntityManager(emf); } } return em; }
/** * Returns the component invoking resource request. * * @return Handle to the component. */ public Object getComponent(){ InvocationManager invmgr = ConnectorRuntime.getRuntime().getInvocationManager(); ComponentInvocation inv = invmgr.getCurrentInvocation(); if (inv == null) { return null; } return inv.getInstance(); }
@Override public String getCurrentTag() { ComponentInvocation compInv = invocationManager.getCurrentInvocation(); return compInv == null ? null : (config.getName() + ":" + compInv.getAppName()); }
public ComponentInvocation getCurrentInvocation() { return _invManager.getCurrentInvocation(); }
public ResourceHandler getResourceHandler() { ResourceHandler rh = super.getResourceHandler(); if (rh == null) { rh = context; } return rh; }
public void register() { invManager.registerComponentInvocationHandler(ComponentInvocationType.SERVLET_INVOCATION, this); }
public EjbInvocation clone() { EjbInvocation newInv = (EjbInvocation) super.clone(); newInv.ejb = null; newInv.exception = null; newInv.exceptionFromBeanMethod = null; newInv.clientTx = null; newInv.preInvokeTxStatus = null; newInv.originalContextClassLoader = null; return newInv; }
EjbInvocation(String compEnvId, Container container) { super.componentId = compEnvId; super.container = container; super.setComponentInvocationType(ComponentInvocation.ComponentInvocationType.EJB_INVOCATION); }
protected InvocationArray initialValue() { return new InvocationArray(); }
@Override public ApplicationEnvironment getCurrentApplicationEnvironment() { return invMgr.peekAppEnvironment(); }
private Object getResourceTableKey(Object instance, ComponentInvocation inv) { Object key = null; if ( inv != null) { key = inv.getResourceTableKey(); } // If ComponentInvocation is null or doesn't hold the key, // use instance as the key. if (key == null) { key = instance; } return key; }
@SuppressWarnings("unchecked") private static Map<EntityManagerFactory, EntityManager> getNonTxEMsFromCurrentInvocation(ComponentInvocation currentInvocation) { return (Map<EntityManagerFactory, EntityManager>)currentInvocation.getRegistryFor(INVOCATION_PAYLOAD_KEY); }
public boolean isInvocationStackEmpty() { return (invMgr == null || invMgr.isInvocationStackEmpty()); }
public ResourceHandler getResourceHandler() { ResourceHandler rh = super.getResourceHandler(); if (rh == null) { rh = context; } return rh; } }
public void register() { invManager.registerComponentInvocationHandler(ComponentInvocationType.EJB_INVOCATION, this); }
public boolean outsideStartup() { return getInvocationAttribute() != ComponentInvocationType.SERVICE_STARTUP; } }
protected InvocationArray initialValue() { return new InvocationArray(); }