1 Reply Latest reply on Apr 30, 2002 6:56 PM by ankur

    mysql-configuration for JBoss 3.0RC1

    daftarie

      Hi,

      is there anybody who can help us to configure a mySQL db with JBoss 3.0RC1. The setttings have changed, so the example configurations of the JBoss online documentation are not suitable any more.
      What's wrong with this? When deploying we get this exception:

      15:11:11,796 ERROR [EntityContainer] Exception in service lifecyle operation: create
      org.jboss.deployment.DeploymentException: Error: can't find data source: java:/DefaultDS; - nested throwable is: javax.naming.NameNotFoundException: DefaultDS not bound

      mysql-service.xml:
      <?xml version="1.0" encoding="UTF-8"?>




      jboss.jca:service=RARDeployer

      <depends optional-attribute-name="ManagedConnectionFactoryName">
      <!--embedded mbean-->

      <depends optional-attribute-name="OldRarDeployment">
      jboss.jca:service=RARDeployment,name=Minerva JDBC Local Transcation ResourceAdapter




      <config-property>
      <config-property-name>ConnectionURL</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>jdbc:mysql://domain.de/database</config-property-value>
      </config-property>
      <config-property>
      <config-property-name>DriverClass</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>org.gjt.mm.mysql.Driver</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>root</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></config-property-value>
      </config-property>


      DefaultDS


      <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


      <depends optional-attribute-name="CachedConnectionManager">
      jboss.jca:service=CachedConnectionManager

      <!--
      java:/jaas/MySQLDbRealm
      -->

      java:/TransactionManager


        • 1. Re: mysql-configuration for JBoss 3.0RC1
          ankur

          create a file "mysql-service.xml" containing following data and copy it in deploy folder :-


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

          <!-- ===================================================================== -->
          <!-- -->
          <!-- JBoss Server Configuration -->
          <!-- -->
          <!-- ===================================================================== -->

          <!-- $Id: hsqldb-service.xml,v 1.2 2002/04/14 04:31:56 d_jencks Exp $ -->



          <!-- ==================================================================== -->
          <!-- New ConnectionManager setup for default hsql dbs -->
          <!-- ==================================================================== -->


          <!--make the rar deploy! hack till better deployment-->
          jboss.jca:service=RARDeployer


          <depends optional-attribute-name="ManagedConnectionFactoryName">
          <!--embedded mbean-->

          <!--hack-->
          <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter

          <!--real attributes-->


          <config-property>
          <config-property-name>ConnectionURL</config-property-name>
          <config-property-type>java.lang.String</config-property-type>
          <config-property-value>jdbc:mysql://localhost/bluefishwireless</config-property-value>
          </config-property>
          <config-property>
          <config-property-name>DriverClass</config-property-name>
          <config-property-type>java.lang.String</config-property-type>
          <config-property-value>org.gjt.mm.mysql.Driver</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>ankur</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>ankur</config-property-value>
          </config-property>


          DefaultDS


          <depends optional-attribute-name="ManagedConnectionPool">
          <!--embedded mbean-->


          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


          <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager
          java:/TransactionManager