use of org.omg.CORBA.INVALID_TRANSACTION in project Payara by payara.
the class POAProtocolMgr method mapException.
/**
* Map the EJB/RMI exception to a protocol-specific (e.g. CORBA) exception
*/
@Override
public Throwable mapException(Throwable exception) {
boolean initCause = true;
Throwable mappedException = exception;
if (exception instanceof java.rmi.NoSuchObjectException || exception instanceof NoSuchObjectLocalException) {
mappedException = new OBJECT_NOT_EXIST(MAPEXCEPTION_CODE, CompletionStatus.COMPLETED_MAYBE);
} else if (exception instanceof java.rmi.AccessException || exception instanceof javax.ejb.AccessLocalException) {
mappedException = new NO_PERMISSION(MAPEXCEPTION_CODE, CompletionStatus.COMPLETED_MAYBE);
} else if (exception instanceof java.rmi.MarshalException) {
mappedException = new MARSHAL(MAPEXCEPTION_CODE, CompletionStatus.COMPLETED_MAYBE);
} else if (exception instanceof javax.transaction.TransactionRolledbackException || exception instanceof TransactionRolledbackLocalException) {
mappedException = new TRANSACTION_ROLLEDBACK(MAPEXCEPTION_CODE, CompletionStatus.COMPLETED_MAYBE);
} else if (exception instanceof javax.transaction.TransactionRequiredException || exception instanceof TransactionRequiredLocalException) {
mappedException = new TRANSACTION_REQUIRED(MAPEXCEPTION_CODE, CompletionStatus.COMPLETED_MAYBE);
} else if (exception instanceof javax.transaction.InvalidTransactionException) {
mappedException = new INVALID_TRANSACTION(MAPEXCEPTION_CODE, CompletionStatus.COMPLETED_MAYBE);
} else {
initCause = false;
}
if (initCause) {
mappedException.initCause(exception);
}
return mappedException;
}
Aggregations