/** * Ensures that the transaction represented by the target SubCoordinator * cannot be committed. * * @param * * @return * * @exception Inactive The Coordinator is already completing the * transaction. * @see */ synchronized public void rollback_only() throws Inactive { if (tranState.state != TransactionState.STATE_ACTIVE) { Inactive exc = new Inactive(); throw exc; } else { // Set the rollback-only flag. rollbackOnly = true; } }
Inactive exc = new Inactive(); throw exc; throw (SystemException) exc.fillInStackTrace(); } catch (Inactive exc) { throw (Inactive) exc.fillInStackTrace();
/** * Ensures that the transaction represented by the target TopCoordinator * cannot be committed. * * @param * * @return * * @exception Inactive The Coordinator is already completing the * transaction. * @see */ public void rollback_only() throws Inactive { if (tranState == null || tranState.state != TransactionState.STATE_ACTIVE) { Inactive exc = new Inactive(); throw exc; } else { // Set the rollback-only flag. rollbackOnly = true; } }
public void register_synchronization(Synchronization sync) throws Inactive, SynchronizationUnavailable{ synchronized(stat_semaphore){ if (status == Status._StatusMarkedRollback){ throw new org.omg.CORBA.TRANSACTION_ROLLEDBACK(); } if (status != Status._StatusActive){ throw new Inactive(); } syncs.addElement(sync); } }
public static org.omg.CosTransactions.Inactive read (org.omg.CORBA.portable.InputStream istream) { org.omg.CosTransactions.Inactive value = new org.omg.CosTransactions.Inactive (); // read and discard the repository ID istream.read_string (); return value; }
public static org.omg.CosTransactions.Inactive read (org.omg.CORBA.portable.InputStream istream) { org.omg.CosTransactions.Inactive value = new org.omg.CosTransactions.Inactive (); // read and discard the repository ID istream.read_string (); return value; }
public RecoveryCoordinator register_resource(Resource r) throws Inactive{ synchronized(stat_semaphore){ if (status == Status._StatusMarkedRollback){ throw new org.omg.CORBA.TRANSACTION_ROLLEDBACK(); } if (status != Status._StatusActive){ throw new Inactive(); } resources.addElement(r); votes.addElement(null); } return null; }
public void rollback_only() throws Inactive{ if (!move_to_state(Status._StatusMarkedRollback)){ throw new Inactive(); } }
/** * Register the specified synchronization with this transaction. This * transaction must be a top-level transaction. * * @exception org.omg.CosTransactions.Inactive * if this transaction is no longer in the active phase. * * @exception org.omg.CosTransactions.SynchronizationUnavailable * if this transaction it not a top-level transaction. */ public void registerSynchronization (Synchronization sync) throws Inactive, SynchronizationUnavailable, SystemException { if (jtsLogger.logger.isTraceEnabled()) { jtsLogger.logger.trace("AtomicTransaction::registerSynchronization ( " + sync + " )"); } synchronized (_theStatus) { if (_theAction == null) { throw new Inactive(); } } _theAction.register_synchronization(sync); }
/** * Register the specified subtransaction aware resource with this * transaction. This transaction must be a subtransaction. * * @exception org.omg.CosTransactions.Inactive * if this transaction is no longer in the active phase. * * @exception org.omg.CosTransactions.NotSubtransaction * if this transaction is not a subtransaction. */ public void registerSubtranAware (SubtransactionAwareResource r) throws Inactive, NotSubtransaction, SystemException { if (jtsLogger.logger.isTraceEnabled()) { jtsLogger.logger.trace("AtomicTransaction::registerSubtranAware ( " + r + " )"); } synchronized (_theStatus) { if (_theAction == null) { throw new Inactive(); } } _theAction.register_subtran_aware(r); }
/** * Register the specified resource with this transaction. * * @return the org.omg.CosTransactions.RecoveryCoordinator reference that * can be used to later query the outcome of the transaction. * * @exception org.omg.CosTransactions.Inactive * if the current transaction is no longer in the active * phase. */ public RecoveryCoordinator registerResource (Resource r) throws Inactive, SystemException { if (jtsLogger.logger.isTraceEnabled()) { jtsLogger.logger.trace("AtomicTransaction::registerResource ( " + r + " )"); } RecoveryCoordinator rc = null; synchronized (_theStatus) { if (_theAction == null) { throw new Inactive(); } } return _theAction.register_resource(r); }
public static org.omg.CosTransactions.Inactive read (final org.omg.CORBA.portable.InputStream in) { String id = in.read_string(); if (!id.equals(id())) throw new org.omg.CORBA.MARSHAL("wrong id: " + id); final org.omg.CosTransactions.Inactive result = new org.omg.CosTransactions.Inactive(id); return result; } public static void write (final org.omg.CORBA.portable.OutputStream out, final org.omg.CosTransactions.Inactive s)
public static org.omg.CosTransactions.Inactive read (final org.omg.CORBA.portable.InputStream in) { String id = in.read_string(); if (!id.equals(id())) throw new org.omg.CORBA.MARSHAL("wrong id: " + id); final org.omg.CosTransactions.Inactive result = new org.omg.CosTransactions.Inactive(id); return result; } public static void write (final org.omg.CORBA.portable.OutputStream out, final org.omg.CosTransactions.Inactive s)
public static org.omg.CosTransactions.Inactive read (final org.omg.CORBA.portable.InputStream in) { org.omg.CosTransactions.Inactive result = new org.omg.CosTransactions.Inactive(); if (!in.read_string().equals(id())) throw new org.omg.CORBA.MARSHAL("wrong id"); return result; } public static void write (final org.omg.CORBA.portable.OutputStream out, final org.omg.CosTransactions.Inactive s)
public Control create_subtransaction () throws SystemException, SubtransactionsUnavailable, Inactive { if (jtsLogger.logger.isTraceEnabled()) { jtsLogger.logger.trace("ArjunaTransactionImple::create_subtransaction - called for " + get_uid()); } if (determineStatus(this) != Status.StatusActive) throw new Inactive(); else { if (!_subtran) throw new SubtransactionsUnavailable(); else { if (controlHandle == null) throw new Inactive(); else return TransactionFactoryImple.create_subtransaction(controlHandle.getControl(), this); } } }