private void postInvoke(ComponentInvocation curInv){ ComponentInvocation invToUse = curInv; /* if(invToUse == null){ invToUse = getConnectorRuntime().getInvocationManager().getCurrentInvocation(); } */ if (invToUse == null) { return; } Object comp = invToUse.getInstance(); if (comp == null) { return; } handleLazilyAssociatedConnectionPools(comp, invToUse); }
Object invInstance = inv.getInstance();
public void registerComponentResource(TransactionalResource h) { ComponentInvocation inv = invMgr.getCurrentInvocation(); if (inv != null) { Object instance = inv.getInstance(); if (instance == null) return; h.setComponentInstance(instance); List l = getResourceList(instance, inv); if(_logger.isLoggable(Level.FINE)) { _logger.log(Level.FINE, "\n\nIn JavaEETransactionManagerSimplified.registerComponentResource, h=" + h + " h.xares=" + h.getXAResource()); } l.add(h); } }
private void enlistComponentResources(ComponentInvocation inv) throws InvocationException { try { Transaction tran = (Transaction) inv.getTransaction(); if (isTransactionActive(tran)) { List l = getExistingResourceList(inv.getInstance(), inv); if (l == null || l.size() == 0) return; Iterator it = l.iterator(); // END IASRI 4705808 TTT002 while(it.hasNext()) { TransactionalResource h = (TransactionalResource) it.next(); try{ enlistResource(tran,h); }catch(Exception ex){ if (_logger.isLoggable(Level.FINE)) _logger.log(Level.WARNING, "enterprise_distributedtx.pooling_excep", ex); it.remove(); handleResourceError(h,ex,tran); } } //END OF IASRI 4658504 } } catch (Exception ex) { _logger.log(Level.SEVERE, "enterprise_distributedtx.excep_in_enlist",ex); } }
Transaction tran = (Transaction) inv.getTransaction(); if (isTransactionActive(tran)) { List l = getExistingResourceList(inv.getInstance(), inv); if (l == null || l.size() == 0) return;
/** * 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(); }
private ComponentInvocation createComponentInvocation(ComponentInvocation currInv) { // ComponentInvocation newInv = new ComponentInvocation( // currInv.getComponentId(), // ComponentInvocation.ComponentInvocationType.SERVLET_INVOCATION, // currInv.getContainer(), // currInv.getAppName(), // currInv.getModuleName() // ); ComponentInvocation newInv = currInv.clone(); newInv.setResourceTableKey(null); newInv.instance = currInv.getInstance(); // if (naming) { // newInv.setJNDIEnvironment(currInv.getJNDIEnvironment()); // } if (!naming) { newInv.setJNDIEnvironment(null); } return newInv; }
monitor.transactionActivatedEvent(); ComponentInvocation inv = invMgr.getCurrentInvocation(); if (inv != null && inv.getInstance() != null) { tx.setComponentName(inv.getInstance().getClass().getName());
for ( int j = invList.size(); j > 0; j-- ) { ComponentInvocation inv = (ComponentInvocation) invList.get( j - 1 ); Object comp = inv.getInstance();
if (invocation != null && !handle.isUseTransactionOfExecutionThread()) { invocation.setResourceTableKey(new PairKey(invocation.getInstance(), Thread.currentThread())); invocationManager.preInvoke(invocation);
cpy.componentId = parentInv.getComponentId(); cpy.setComponentInvocationType(parentInv.getInvocationType()); cpy.instance = parentInv.getInstance(); cpy.container = parentInv.getContainerContext(); cpy.transaction = parentInv.getTransaction();
cpy.componentId = parentInv.getComponentId(); cpy.setComponentInvocationType(parentInv.getInvocationType()); cpy.instance = parentInv.getInstance(); cpy.container = parentInv.getContainerContext(); cpy.transaction = parentInv.getTransaction();