public static void rethrowIfCorbaSystemException(Throwable e) { RuntimeException re; if (e instanceof java.rmi.MarshalException) re = new org.omg.CORBA.MARSHAL(e.toString()); else if (e instanceof java.rmi.NoSuchObjectException) re = new org.omg.CORBA.OBJECT_NOT_EXIST(e.toString()); else if (e instanceof java.rmi.AccessException) re = new org.omg.CORBA.NO_PERMISSION(e.toString()); else if (e instanceof javax.transaction.TransactionRequiredException) re = new org.omg.CORBA.TRANSACTION_REQUIRED(e.toString()); else if (e instanceof javax.transaction.TransactionRolledbackException) re = new org.omg.CORBA.TRANSACTION_ROLLEDBACK(e.toString()); else if (e instanceof javax.transaction.InvalidTransactionException) re = new org.omg.CORBA.INVALID_TRANSACTION(e.toString()); else if (e instanceof org.omg.CORBA.SystemException) re = (org.omg.CORBA.SystemException) e; else return; re.setStackTrace(e.getStackTrace()); throw re; } }
return new org.omg.CORBA.INV_OBJREF(minor, status); } else if (id.equals("IDL:omg.org/CORBA/NO_PERMISSION:1.0")) { return new org.omg.CORBA.NO_PERMISSION(minor, status); } else if (id.equals("IDL:omg.org/CORBA/INTERNAL:1.0")) { return new org.omg.CORBA.INTERNAL(minor, status); return new org.omg.CORBA.TRANSACTION_REQUIRED(minor, status); } else if (id.equals("IDL:omg.org/CORBA/TRANSACTION_ROLLEDBACK:1.0")) { return new org.omg.CORBA.TRANSACTION_ROLLEDBACK(minor, status); } else if (id.equals("IDL:omg.org/CORBA/INVALID_TRANSACTION:1.0")) { return new org.omg.CORBA.INVALID_TRANSACTION(minor, status); } else if (id.equals("IDL:omg.org/CORBA/INV_POLICY:1.0")) { String reason = MinorCodes.describeInvPolicy(minor); return new org.omg.CORBA.UNKNOWN(reason, minor, status);
private void check_state(){ if( state == PREPARED || state == COMMITED ) { throw new org.omg.CORBA.INVALID_TRANSACTION(); } else if( state == ROLLEDBACK ) { throw new org.omg.CORBA.TRANSACTION_ROLLEDBACK(); } }; };
/** removed synchronization at method level since only tranState requires locking */ public int hash_transaction() { int result = hash; if (tranState == null) { INVALID_TRANSACTION exc = new INVALID_TRANSACTION( MinorCode.Completed, CompletionStatus.COMPLETED_NO); throw exc; } return result; }
throw new INVALID_TRANSACTION(ExceptionCodes.SERVERAA_NO_CONTROL, CompletionStatus.COMPLETED_NO); throw new INVALID_TRANSACTION(ExceptionCodes.NO_TRANSACTION, CompletionStatus.COMPLETED_NO); ThreadActionData.popAction(); ThreadActionData.popAction(); ThreadActionData.popAction(); ThreadActionData.popAction(); throw new UNKNOWN(e7.toString());
throw new NO_PERMISSION(0, CompletionStatus.COMPLETED_NO); (outcome == ActionStatus.ABORT_ONLY && TxControl.isBeforeCompletionWhenRollbackOnly())) throw new TRANSACTION_ROLLEDBACK(ExceptionCodes.FAILED_TO_COMMIT, CompletionStatus.COMPLETED_NO); } else { throw new INVALID_TRANSACTION(0, CompletionStatus.COMPLETED_NO); case ActionStatus.ABORTING: // in case of asynchronous abort! case ActionStatus.H_ROLLBACK: throw new TRANSACTION_ROLLEDBACK(ExceptionCodes.FAILED_TO_COMMIT, CompletionStatus.COMPLETED_NO); case ActionStatus.H_MIXED:
throw new NO_PERMISSION(0, CompletionStatus.COMPLETED_NO); if(TxControl.isBeforeCompletionWhenRollbackOnly()) throw new INVALID_TRANSACTION(0, CompletionStatus.COMPLETED_NO); // means case ActionStatus.H_MIXED: case ActionStatus.H_HAZARD: throw new INVALID_TRANSACTION(0, CompletionStatus.COMPLETED_NO); // means throw new UNKNOWN(ExceptionCodes.UNKNOWN_EXCEPTION, CompletionStatus.COMPLETED_MAYBE);
throw new INVALID_TRANSACTION(ExceptionCodes.SERVERAA_NO_CONTROL, CompletionStatus.COMPLETED_NO); jtsLogger.i18NLogger.warn_orbspecific_interposition_resources_arjuna_notx("ServerTopLevelAction.commit_one_phase"); throw new INVALID_TRANSACTION(ExceptionCodes.NO_TRANSACTION, CompletionStatus.COMPLETED_NO); ThreadActionData.pushAction(theTransaction); // LockManager needs to know if there is a transaction ThreadActionData.popAction(); ThreadActionData.popAction(); ThreadActionData.popAction(); throw new UNKNOWN(e7.toString());
throw new TRANSACTION_ROLLEDBACK( ExceptionCodes.MARKED_ROLLEDBACK, CompletionStatus.COMPLETED_NO); throw new UNKNOWN(e3.toString(), ExceptionCodes.UNKNOWN_EXCEPTION, CompletionStatus.COMPLETED_NO); throw new INVALID_TRANSACTION(ExceptionCodes.ADD_FAILED, CompletionStatus.COMPLETED_NO);
if ((outcome != ActionStatus.ABORT_ONLY) || TxControl.isBeforeCompletionWhenRollbackOnly()) parentTransaction.removeChildAction(this); throw new INVALID_TRANSACTION(ExceptionCodes.INVALID_ACTION, CompletionStatus.COMPLETED_NO); case ActionStatus.ABORTED: case ActionStatus.H_ROLLBACK: throw new TRANSACTION_ROLLEDBACK(ExceptionCodes.FAILED_TO_COMMIT, CompletionStatus.COMPLETED_NO); case ActionStatus.H_HAZARD:
throw new INVALID_TRANSACTION(ExceptionCodes.SERVERAA_NO_CONTROL, CompletionStatus.COMPLETED_NO); ThreadActionData.popAction(); throw new INVALID_TRANSACTION(ExceptionCodes.INVALID_ACTION, CompletionStatus.COMPLETED_NO); case TwoPhaseOutcome.PREPARE_OK: return Vote.VoteCommit; if (TxControl.getMaintainHeuristics()) destroyResource(); throw new HeuristicMixed(); // will eventually get forget case TwoPhaseOutcome.HEURISTIC_HAZARD: default: if (TxControl.getMaintainHeuristics()) destroyResource(); throw new HeuristicHazard();
throw new INVALID_TRANSACTION(ExceptionCodes.SERVERAA_NO_CONTROL, CompletionStatus.COMPLETED_NO); ThreadActionData.pushAction(theTransaction); // LockManager needs to know if there is a transaction ThreadActionData.popAction(); throw new INVALID_TRANSACTION(ExceptionCodes.SERVERAA_NO_CONTROL, CompletionStatus.COMPLETED_NO); case ActionStatus.COMMITTED: case ActionStatus.H_COMMIT: case ActionStatus.ABORTED: case ActionStatus.H_ROLLBACK: if (TxControl.getMaintainHeuristics()) destroyResource(); throw new HeuristicRollback(); case ActionStatus.H_MIXED: if (TxControl.getMaintainHeuristics()) destroyResource(); throw new HeuristicMixed(); case ActionStatus.H_HAZARD: if (TxControl.getMaintainHeuristics()) destroyResource(); throw new HeuristicHazard();
ControlImpl current = endAborted(outBoolean, false); if( outBoolean[0] ) { TRANSACTION_ROLLEDBACK exc = new TRANSACTION_ROLLEDBACK(0,CompletionStatus.COMPLETED_NO); throw exc; INVALID_TRANSACTION ex2 = new INVALID_TRANSACTION(0,CompletionStatus.COMPLETED_NO); ex2.initCause(exc); throw ex2; endCurrent(true); current.destroy(); throw (TRANSACTION_ROLLEDBACK)exc.fillInStackTrace();
throw new INVALID_TRANSACTION(ExceptionCodes.INVALID_ACTION, CompletionStatus.COMPLETED_NO); else throw new UNKNOWN(exp.toString()); throw new UNKNOWN(e.toString());
NO_PERMISSION exc = new NO_PERMISSION(0,CompletionStatus.COMPLETED_NO); throw exc; INVALID_TRANSACTION exc = new INVALID_TRANSACTION(MinorCode.FactoryFailed, CompletionStatus.COMPLETED_NO); throw exc; throw (INVALID_TRANSACTION)exc.fillInStackTrace();
INVALID_TRANSACTION exc = new INVALID_TRANSACTION(MinorCode.Completed, CompletionStatus.COMPLETED_NO); throw exc; INVALID_TRANSACTION exc = new INVALID_TRANSACTION(MinorCode.DeferredActivities, CompletionStatus.COMPLETED_NO); throw exc; term = controlImpl.get_localTerminator(); } catch( Unavailable exc ) { NO_PERMISSION ex2 = new NO_PERMISSION(0,CompletionStatus.COMPLETED_NO); throw ex2; term = controlImpl.get_terminator(); } catch( Unavailable exc ) { NO_PERMISSION ex2 = new NO_PERMISSION(0,CompletionStatus.COMPLETED_NO); throw ex2;
INVALID_TRANSACTION ex3 = new INVALID_TRANSACTION( MinorCode.CompareFailed, CompletionStatus.COMPLETED_NO); ex3.initCause(exc); throw ex3;
throw (INVALID_TRANSACTION)exc.fillInStackTrace(); } catch (Throwable exc) {
return new org.omg.CORBA.INVALID_TRANSACTION (); return new org.omg.CORBA.NO_PERMISSION (); return new org.omg.CORBA.TRANSACTION_ROLLEDBACK (); return new org.omg.CORBA.UNKNOWN ();
private void check_status( TransactionCoordinator tc ){ Status status = tc.get_state(); if( status.equals( Status.StatusActive ) ){ return; } else if( status.equals( Status.StatusPrepared ) || status.equals( Status.StatusCommitted ) || status.equals( Status.StatusUnknown ) || status.equals( Status.StatusNoTransaction ) || status.equals( Status.StatusPreparing ) || status.equals( Status.StatusCommitting ) ) { throw new org.omg.CORBA.INVALID_TRANSACTION(); } else if (status.equals( Status.StatusRollingBack ) || status.equals( Status.StatusMarkedRollback) || status.equals( Status.StatusRolledBack) ) { throw new org.omg.CORBA.TRANSACTION_ROLLEDBACK(); } } private synchronized boolean attempt_lock_from_queue(){