/** * Tidy-up the system prior to exiting. */ public static void purge () { if (OTSImpleManager._currentRef != null) { OTSImpleManager._currentRef = null; OTSImpleManager._current = null; } if (OTSImpleManager._theFactoryRef != null) { ORBManager.getPOA().shutdownObject(OTSImpleManager._theFactory); OTSImpleManager._theFactory = null; } }
/** * Tidy-up the system prior to exiting. */ public static void purge () { if (OTSImpleManager._currentRef != null) { OTSImpleManager._currentRef = null; OTSImpleManager._current = null; } if (OTSImpleManager._theFactoryRef != null) { ORBManager.getPOA().shutdownObject(OTSImpleManager._theFactory); OTSImpleManager._theFactoryRef = null; OTSImpleManager._theFactory = null; } }
public void destroy() { try { ORBManager.getPOA().shutdownObject(this); } catch (Exception e) { jtsLogger.i18NLogger.warn_orbspecific_interposition_resources_destroyfailed(); } }
public final org.omg.CosTransactions.Synchronization getSynchronization () { if (_theReference == null) { _thePOATie = getPOATie(); ORBManager.getPOA().objectIsReady(_thePOATie); _theReference = org.omg.CosTransactions.SynchronizationHelper.narrow(ORBManager.getPOA().corbaReference(_thePOATie)); } return _theReference; }
public final org.omg.CosTransactions.Synchronization getSynchronization () { if (_theReference == null) { _thePOATie = getPOATie(); ORBManager.getPOA().objectIsReady(_thePOATie); _theReference = org.omg.CosTransactions.SynchronizationHelper.narrow(ORBManager.getPOA().corbaReference(_thePOATie)); } return _theReference; }
public Resource getReference () { if ((_resourceRef == null) && _valid) { if (_theControl != null) { _theResource = new org.omg.CosTransactions.ResourcePOATie(this); ORBManager.getPOA().objectIsReady(_theResource); _resourceRef = org.omg.CosTransactions.ResourceHelper.narrow(ORBManager.getPOA().corbaReference(_theResource)); } else _valid = false; } return _resourceRef; }
public Resource getReference () { if ((_resourceRef == null) && _valid) { if (_theControl != null) { _theResource = new org.omg.CosTransactions.ResourcePOATie(this); ORBManager.getPOA().objectIsReady(_theResource); _resourceRef = org.omg.CosTransactions.ResourceHelper.narrow(ORBManager.getPOA().corbaReference(_theResource)); } else _valid = false; } return _resourceRef; }
/** * @return the CORBA Control object. */ public final synchronized Control getControl () { /* * If we have been committed then the reference will be null. There is * no point in recreating it and in some cases (e.g., JacORB) this will * in fact cause an exception to be thrown. */ if ((_myControl == null) && (!_destroyed)) { ORBManager.getPOA().objectIsReady(this); _myControl = com.arjuna.ArjunaOTS.ActionControlHelper.narrow(ORBManager.getPOA().corbaReference(this)); } /* * In C++ we had to narrow to Control for some ORBs, despite the fact * that an ArjunaControl is a Control. Does now seem to be necessary for * Java. * * return ControlHelper.narrow(_myControl); */ return _myControl; }
protected final void createTransactionHandle () { if (jtsLogger.logger.isTraceEnabled()) { jtsLogger.logger.trace("ControlImple::createTransactionHandle ()"); } /* Create/bind the 2 IDL interfaces to the same implementation */ _transactionImpl = new com.arjuna.ArjunaOTS.ArjunaTransactionPOATie( _transactionHandle); ORBManager.getPOA().objectIsReady(_transactionImpl); ArjunaTransaction transactionReference = com.arjuna.ArjunaOTS.ArjunaTransactionHelper.narrow(ORBManager.getPOA().corbaReference(_transactionImpl)); _theCoordinator = com.arjuna.ArjunaOTS.UidCoordinatorHelper.narrow(transactionReference); _theTerminator = org.omg.CosTransactions.TerminatorHelper.narrow(transactionReference); transactionReference = null; }
/** * No need to protect with mutex since only called from destroy (and * destructor), which is protected with a mutex. Do not call directly * without synchronizing. */ protected final void tidyup () { if (jtsLogger.logger.isTraceEnabled()) { jtsLogger.logger.trace("ControlImple::tidyup ()"); } _myControl = null; _parentControl = null; try { if (_transactionImpl != null) { _finalStatus = _transactionImpl.get_status(); ORBManager.getPOA().shutdownObject(_transactionImpl); _transactionHandle = null; _transactionImpl = null; } } catch (Exception e) { jtsLogger.i18NLogger.warn_orbspecific_tidyfail("ControlImple.tidyup", e); } }
/** * @message com.arjuna.ats.internal.jts.orbspecific.interposition.resources.destroyfailed * Failed to destroy server-side synchronization object! */ public void destroy() { try { ORBManager.getPOA().shutdownObject(this); } catch (Exception e) { if (jtsLogger.logger.isWarnEnabled()) { jtsLogger.loggerI18N .warn("com.arjuna.ats.internal.jts.orbspecific.interposition.resources.destroyfailed"); } } }
private final void removeConnection() { /* * Should only be called once. Remove the connection so that user can * reuse the driver as though it were fresh (e.g., can do read only * optimisation). */ if (_recoveryObject != null) { _recoveryObject.close(); _recoveryObject = null; } if (_theTransaction != null) _theTransaction = null; try { if (_theReference != null) { ORBManager.getPOA().shutdownObject(this); _theReference = null; } } catch (Exception e) { jtaxLogger.i18NLogger.warn_jtax_resources_jts_orbspecific_remconn(e); } }
protected final void createTransactionHandle () { if (jtsLogger.logger.isDebugEnabled()) { jtsLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED, com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS, "ControlImple::createTransactionHandle ()"); } /* Create/bind the 2 IDL interfaces to the same implementation */ _transactionImpl = new com.arjuna.ArjunaOTS.ArjunaTransactionPOATie( _transactionHandle); ORBManager.getPOA().objectIsReady(_transactionImpl); ArjunaTransaction transactionReference = com.arjuna.ArjunaOTS.ArjunaTransactionHelper.narrow(ORBManager.getPOA().corbaReference(_transactionImpl)); _theCoordinator = com.arjuna.ArjunaOTS.UidCoordinatorHelper.narrow(transactionReference); _theTerminator = org.omg.CosTransactions.TerminatorHelper.narrow(transactionReference); transactionReference = null; }
protected final synchronized void destroyResource () { if (!_destroyed) { _destroyed = true; if (_parent != null) { /* * Now try to garbage collect this resource. Since it was * registered as a subtranaware resource it won't get called * again. */ if (!_parent.removeChild(this)) { jtsLogger.i18NLogger.warn_orbspecific_interposition_resources_arjuna_childerror( get_uid(), _parent.get_uid()); } } if (_theResource != null) { ORBManager.getPOA().shutdownObject(_theResource); _theResource = null; } } tidyup(); }