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; } }
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; } }
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; } }
/** * Map a java exception to a corba exception * * @param e exception to process */ public static void rethrowCorbaException(Exception e) { TraceCarol.debugRmiCarol(""); if (e instanceof java.rmi.MarshalException) { throw new org.omg.CORBA.MARSHAL(e.toString()); } else if (e instanceof java.rmi.NoSuchObjectException) { throw new org.omg.CORBA.OBJECT_NOT_EXIST(e.toString()); } else if (e instanceof java.rmi.AccessException) { throw new org.omg.CORBA.NO_PERMISSION(e.toString()); } else if (e instanceof javax.transaction.TransactionRequiredException) { throw new org.omg.CORBA.TRANSACTION_REQUIRED(e.toString()); } else if (e instanceof javax.transaction.TransactionRolledbackException) { throw new org.omg.CORBA.TRANSACTION_ROLLEDBACK(e.toString()); } else if (e instanceof javax.transaction.InvalidTransactionException) { throw new org.omg.CORBA.INVALID_TRANSACTION(e.toString()); } } }
public static org.omg.CORBA.TRANSACTION_REQUIRED 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); int x0; x0=in.read_ulong(); org.omg.CORBA.CompletionStatus x1; x1=org.omg.CORBA.CompletionStatusHelper.read(in); final org.omg.CORBA.TRANSACTION_REQUIRED result = new org.omg.CORBA.TRANSACTION_REQUIRED(id, x0, x1); return result; } public static void write (final org.omg.CORBA.portable.OutputStream out, final org.omg.CORBA.TRANSACTION_REQUIRED s)
public static org.omg.CORBA.TRANSACTION_REQUIRED 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); int x0; x0=in.read_ulong(); org.omg.CORBA.CompletionStatus x1; x1=org.omg.CORBA.CompletionStatusHelper.read(in); final org.omg.CORBA.TRANSACTION_REQUIRED result = new org.omg.CORBA.TRANSACTION_REQUIRED(id, x0, x1); return result; } public static void write (final org.omg.CORBA.portable.OutputStream out, final org.omg.CORBA.TRANSACTION_REQUIRED s)
public void rollback(){ if (!move_to_state(Status._StatusRollingBack)){ throw new org.omg.CORBA.TRANSACTION_REQUIRED(); } TransactionService.get_timer().kill_channel(this); rolling_to_back(); } }
public static TRANSACTION_REQUIRED read( org.omg.CORBA.portable.InputStream in) { if (!id().equals(in.read_string())) throw new MARSHAL(); TRANSACTION_REQUIRED val = new TRANSACTION_REQUIRED(); val.minor = in.read_ulong(); val.completed = CompletionStatus.from_int(in.read_ulong()); return val; }
|| exception instanceof TransactionRequiredLocalException ) mappedException = new TRANSACTION_REQUIRED(MAPEXCEPTION_CODE, CompletionStatus.COMPLETED_MAYBE); } else if ( exception instanceof javax.transaction.InvalidTransactionException ) {
throw new TRANSACTION_REQUIRED();
throw new TRANSACTION_REQUIRED();
static org.omg.CORBA.SystemException mapRemoteException(RemoteException rex) { if (rex.detail != null && rex.detail instanceof org.omg.CORBA.SystemException) return (org.omg.CORBA.SystemException) rex.detail; if (rex.detail != null && rex.detail instanceof RemoteException) rex = (RemoteException) rex.detail; if (rex instanceof java.rmi.NoSuchObjectException) { throw new org.omg.CORBA.INV_OBJREF(rex.getMessage()); } else if (rex instanceof java.rmi.AccessException) { throw new org.omg.CORBA.NO_PERMISSION(rex.getMessage()); } else if (rex instanceof java.rmi.MarshalException) { throw new org.omg.CORBA.MARSHAL(rex.getMessage()); } else if (rex instanceof javax.transaction.TransactionRequiredException) { throw new org.omg.CORBA.TRANSACTION_REQUIRED(rex.getMessage()); } else if (rex instanceof javax.transaction.TransactionRolledbackException) { throw new org.omg.CORBA.TRANSACTION_ROLLEDBACK(rex.getMessage()); } else if (rex instanceof javax.transaction.InvalidTransactionException) { throw new org.omg.CORBA.INVALID_TRANSACTION(rex.getMessage()); /* * } else if (rex.detail != null) { throw new * org.omg.CORBA.portable.UnknownException (rex.detail); */ } else { throw new org.omg.CORBA.portable.UnknownException(rex); } }
throw new TRANSACTION_REQUIRED();
throw new TRANSACTION_REQUIRED();
break; case TRANSACTION_REQUIRED: ex = new TRANSACTION_REQUIRED(_texte, 0, CompletionStatus.COMPLETED_MAYBE); break; case TRANSACTION_ROLLEDBACK:
return new TRANSACTION_MODE(minor, status); case _TRANSACTION_REQUIRED: return new TRANSACTION_REQUIRED(minor, status); case _TRANSACTION_ROLLEDBACK: return new TRANSACTION_ROLLEDBACK(minor, status);