} catch (Throwable e) {
logger.error("Encountered exception during call to ejbActivate()", e);
TransactionPolicy txPolicy = callContext.getTransactionPolicy();
if (txPolicy != null && txPolicy.isTransactionActive()) {
txPolicy.setRollbackOnly();
throw new ApplicationException(new TransactionRolledbackException("Reflection exception thrown while attempting to call ejbActivate() on the instance", e));
}
throw new ApplicationException(new RemoteException("Exception thrown while attempting to call ejbActivate() on the instance. Exception message = " + e.getMessage(), e));
} finally {
callContext.setCurrentOperation(currentOp);
callContext.setCurrentAllowedStates(originalStates);