OTSManager.destroyControl(controlHandle);
private final void disassociateContext () throws SystemException { if (_piCurrent != null) { try { int slotId = OTSManager.getLocalSlotId(); if (slotId != -1) { _piCurrent.set_slot(slotId, null); } } catch (InvalidSlot is) { // Something very wrong throw new org.omg.CORBA.INTERNAL(); } } }
Control theControl = OTSManager.get_current().suspend(); Uid uid = OTSImpleManager.systemCurrent().contextManager().getReceivedCoordinatorUid(); if (uid != null) { OTSImpleManager.systemCurrent().contextManager().disassociateContext(OTSManager.getReceivedSlotId()); return TransactionImple.getTransactions().get(uid); } else {
int receivedSlot = init_info.allocate_slot_id(); OTSManager.setLocalSlotId(localSlot); OTSManager.setReceivedSlotId(receivedSlot);
public Uid getReceivedCoordinatorUid() throws InvalidSlot { Any ctx = _piCurrent.get_slot(OTSManager.getReceivedSlotId()); if (ctx != null && ctx.type().kind().value() != TCKind._tk_null) { PropagationContext theContext = org.omg.CosTransactions.PropagationContextHelper.extract(ctx); if (theContext.current.coord == null) // nothing to use!! return null; else return Helper.getUid(Helper.getUidCoordinator(theContext.current.coord)); } else return null; }
/** * @return the suspended transaction. */ public Transaction suspend () throws javax.transaction.SystemException { if (jtaLogger.logger.isDebugEnabled()) { jtaLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jta.logging.FacilityCode.FAC_JTA, "TransactionManagerImple.suspend"); } try { TransactionImple tx = TransactionImple.getTransaction(); Control theControl = OTSManager.get_current().suspend(); return tx; } catch (Exception e) { javax.transaction.SystemException systemException = new javax.transaction.SystemException(e.toString()); systemException.initCause(e); throw systemException; } }
public void start(org.omg.CORBA.ORB theCorbaORB) throws Exception { jbossatxLogger.i18NLogger.info_jts_TransactionManagerService_start(); // Create an ORB portability wrapper around the CORBA ORB services orb ORB orb = ORB.getInstance("jboss-atx"); org.omg.PortableServer.POA rootPOA = org.omg.PortableServer.POAHelper.narrow(theCorbaORB.resolve_initial_references("RootPOA")); orb.setOrb(theCorbaORB); OA oa = OA.getRootOA(orb); oa.setPOA(rootPOA); try { // OTSManager won't play nice unless we explicity bootstrap the portability layer: ORBManager.setORB(orb); ORBManager.setPOA(oa); org.omg.CosTransactions.TransactionFactory factory = com.arjuna.ats.jts.OTSManager.get_factory(); final int resolver = Services.getResolver(); com.arjuna.ats.jts.TransactionServer.registerTransactionManager(resolver, orb, factory); } catch (final Exception ex) { throw new Exception(jbossatxLogger.i18NLogger.get_jts_TransactionManagerService_failed(), ex); } }
Status s = OTSManager.factory().getStatus(transactionUid);
int receivedSlot = init_info.allocate_slot_id(); OTSManager.setLocalSlotId(localSlot); OTSManager.setReceivedSlotId(receivedSlot);
int slotId = OTSManager.getReceivedSlotId();
Control cont = OTSManager.get_current().get_control();
env.setShutdownWrappedOrb(false); org.omg.CosTransactions.TransactionFactory factory = com.arjuna.ats.jts.OTSManager.get_factory(); final int resolver = Services.getResolver();
Status s = OTSManager.factory().getStatus(transactionUid);
int receivedSlot = init_info.allocate_slot_id(); OTSManager.setLocalSlotId(localSlot); OTSManager.setReceivedSlotId(receivedSlot);
disassociateContext(OTSManager.getLocalSlotId());
int slotId = OTSManager.getReceivedSlotId();
Control cont = OTSManager.get_current().get_control();
int receivedSlot = init_info.allocate_slot_id(); OTSManager.setLocalSlotId(localSlot); OTSManager.setReceivedSlotId(receivedSlot);
OTSManager.destroyControl(ctx.getControl()); ctx = null;