views:

64

answers:

1

We have a solution that uses JBoss and Oracle, in the datasource configuration file it makes reference to a OracleXAExceptionFormatter class. We are migrating from Oracle to MySQL, my question is does JBoss have an equivalent exception formatter class for MySQL or at least a generic equivalent?

<datasources>
  <xa-datasource>
    <jndi-name>datasource.nikecms</jndi-name>
    <track-connection-by-tx/>
    <isSameRM-override-value>false</isSameRM-override-value>
    <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
    <xa-datasource-property name="URL">jdbc:oracle:thin:@ppg-oracledev:1521:devdb</xa-datasource-property>
    <xa-datasource-property name="User"></xa-datasource-property>
    <xa-datasource-property name="Password"></xa-datasource-property>
    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
    <no-tx-separate-pools/>
      <metadata>
         <type-mapping>Oracle10g</type-mapping>
      </metadata>
  </xa-datasource>

  <mbean code="org.jboss.resource.adapter.jdbc.vendor.OracleXAExceptionFormatter"
         name="jboss.jca:service=OracleXAExceptionFormatter">
    <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
  </mbean>

</datasources>
+1  A: 

Hi James,

according to the documentation there is a MySQLExceptionSorter available, but no other ExceptionFormatters than the one for oracle. In $JBOSS_HOME/docs/example/jca is an example how to configure the mysql-ds. You probably don't need this mbean any longer.

stacker