0 Replies Latest reply on Jan 8, 2003 7:29 PM by ali mostofizadeh

    Mysql and XATxConnectionManager configuration

    ali mostofizadeh Newbie

      Has anybody tried to configure Mysql and XATxConnectionManager? If so, do you have an example of mysql-service.xml for XATxConnectionManager?

      I am trying the following configuration and getting this error.

      15:40:32,533 INFO [MainDeployer] Starting deployment of package: file:/C:/apps/jboss-3.0.3/server/kv/deploy/db-service.xml
      15:40:32,673 WARN [ServiceController] jboss.jca:service=XaTxDS,name=KVDS does not implement any Service methods
      .
      .
      .
      15:40:43,959 WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=entities/KanbanCardLocalHome,service=EJB
      org.jboss.deployment.DeploymentException: Error: can't find data source: java:/KVDS; - nested throwable: (javax.naming.NameNotFoundException: KVDS not bound)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.(JDBCEntityBridge.java:99)



      The reason that I am trying to use XATxConnectionManager, is that I am using both jdbc and jms and getting this warning. I saw in a posts I need to use XATxConnectionManager for multiple database source.

      16:21:02,239 WARN [LocalTxConnectionManager$LocalConnectionEventListener] prepare called on a local tx. You are not getting the semantics you expect!


      Here is copy of my current configuration that is causing the mentioned error.


      db-service.xml

      <?xml version="1.0" encoding="UTF-8"?>

      <!-- ==================================================================== -->
      <!-- New ConnectionManager setup for mysql dbs using jca-jdbc xa driver-->
      <!-- Build jmx-api (build/build.sh all) and view for config documentation -->
      <!-- ==================================================================== -->



      <!--make the rar deploy - A BIG HACK till xslt based deployment is written-->
      jboss.jca:service=RARDeployer

      <depends optional-attribute-name="ManagedConnectionFactoryName">

      <!--more hack-->
      <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=Mysql Database Connector


      <config-property>
      <config-property-name>XADataSourceClass</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>com.mysql.jdbc.jdbc2.optional.MysqlXaDataSource</config-property-value>
      </config-property>
      <config-property>
      <config-property-name>XADataSourceProperties</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>ServerName=coli21;Port=3306;Password=jdbc;User=jdbc;DatabaseName=kv_integ</config-property-value>
      </config-property>
      <!-- <config-property>
      <config-property-name>TransactionIsolation</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>TRANSACTION_READ_COMMITTED</config-property-value>
      </config-property>
      <config-property>
      <config-property-name>Server</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>coli21</config-property-value>
      </config-property>
      <config-property>
      <config-property-name>Port</config-property-name>
      <config-property-type>java.lang.Integer</config-property-type>
      <config-property-value>3306</config-property-value>
      </config-property>
      <config-property>
      <config-property-name>Database</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>kv_integ</config-property-value>
      </config-property>
      <config-property>
      <config-property-name>UserName</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>jdbc</config-property-value>
      </config-property>
      <config-property>
      <config-property-name>Password</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>jdbc</config-property-value>
      </config-property>
      -->


      KVDS



      <depends optional-attribute-name="ManagedConnectionPool">


      0
      50
      5000
      15
      <!--criteria indicates if Subject (from security domain) or app supplied
      parameters (such as from getConnection(user, pw)) are used to distinguish
      connections in the pool. Choices are
      ByContainerAndApplication (use both),
      ByContainer (use Subject),
      ByApplication (use app supplied params only),
      ByNothing (all connections are equivalent, usually if adapter supports
      reauthentication)-->
      ByContainer


      java:/TransactionManager