OracleXAExceptionFormatterpublic class OracleXAExceptionFormatter extends org.jboss.system.ServiceMBeanSupport implements org.jboss.tm.XAExceptionFormatter, OracleXAExceptionFormatterMBeanOracleXAExceptionFormatter |
Fields Summary |
---|
private static final String | EXCEPTION_CLASS_NAME | private static final Object[] | NOARGS | private ObjectName | transactionManagerService | private Class | oracleXAExceptionClass | private Method | getXAError | private Method | getXAErrorMessage | private Method | getOracleError | private Method | getOracleSQLError |
Constructors Summary |
---|
public OracleXAExceptionFormatter()
|
Methods Summary |
---|
public void | formatXAException(javax.transaction.xa.XAException xae, org.jboss.logging.Logger log)
try
{
log.warn("xa error: " + getXAError.invoke(xae, NOARGS) + " (" + getXAErrorMessage.invoke(xae, new Object[]
{getXAError.invoke(xae, NOARGS)}) + "); " + "oracle error: " + getOracleError.invoke(xae, NOARGS) + "; "
+ "oracle sql error: " + getOracleSQLError.invoke(xae, NOARGS) + ";", xae);
}
catch (Exception e)
{
log.warn("Problem trying to format XAException: ", e);
}
| public javax.management.ObjectName | getTransactionManagerService()
return transactionManagerService;
| public void | setTransactionManagerService(javax.management.ObjectName transactionManagerService)
this.transactionManagerService = transactionManagerService;
| protected void | startService()
oracleXAExceptionClass = Thread.currentThread().getContextClassLoader().loadClass(EXCEPTION_CLASS_NAME);
getXAError = oracleXAExceptionClass.getMethod("getXAError", new Class[] {});
getXAErrorMessage = oracleXAExceptionClass.getMethod("getXAErrorMessage", new Class[] { getXAError.getReturnType() });
getOracleError = oracleXAExceptionClass.getMethod("getOracleError", new Class[] {});
getOracleSQLError = oracleXAExceptionClass.getMethod("getOracleSQLError", new Class[] {});
getServer().invoke(transactionManagerService, "registerXAExceptionFormatter", new Object[] { oracleXAExceptionClass, this}, new String[] { Class.class.getName(), XAExceptionFormatter.class.getName() });
| protected void | stopService()
getServer().invoke(transactionManagerService, "unregisterXAExceptionFormatter", new Object[] { oracleXAExceptionClass }, new String[] { Class.class.getName() });
oracleXAExceptionClass = null;
getXAError = null;
getXAErrorMessage = null;
getOracleError = null;
getOracleSQLError = null;
|
|