5 Replies Latest reply on Sep 23, 2002 8:28 AM by Jeff Andrews

    configuring datasource using jboss-3.0.0_tomcat-4.0.3

    sooraj Newbie

      I have copied mysql-service file to the and connector/j to the default/lib directory even changed the name inside the mysql-service to the mydatabase name under jndi name property.
      Then i deployed my bean(CMP).
      It said its deployed and table created.But when i check for the table in the mysqlserver It wasn't there once again I deployed it .it said the table is already there.

      Then i removed the hsqldb-service.xml from deploy.Then it said could not Bound to DefaultDS but this was not the name I gave to my datasource.

      My mysql-service.xml is like this.

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

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

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

      <!-- Include a login module configuration named MySqlDbRealm.
      Update your login-conf.xml, here is an example for a

      <application-policy name = "MySqlDbRealm">

      <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
      <module-option name = "principal">yourprincipal</module-option>
      <module-option name = "userName">yourusername</module-option>
      <module-option name = "password">yourpassword</module-option>
      <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=MySqlDS</module-option>


      NOTE: the application-policy name attribute must match SecurityDomainJndiName, and the
      module-option name = "managedConnectionFactoryName"
      must match the object name of the ConnectionManager you are configuring here.
      <!--uncomment out this line if you are using the MySqlDbRealm above

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


      <config-property name="ConnectionURL" type="java.lang.String">jdbc:mysql://localhost:3306/test2</config-property>
      <config-property name="DriverClass" type="java.lang.String">com.mysql.jdbc.Driver</config-property>
      <!--set these only if you want only default logins, not through JAAS -->
      <config-property name="UserName" type="java.lang.String"></config-property>
      <config-property name="Password" type="java.lang.String"></config-property>

      <!--Below here are advanced properties -->
      <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper

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

      <!--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

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

      <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:name=JaasSecurityManager

      <!--make the rar deploy! hack till better deployment-->

      Please let me know what exactly is required to be done . do we need to put jbosscmp-jdbc.xml into the META-INF along with other two xml files --jboss.xml and ejb-jar.xml or we have to use jaws.xml as we used to do it earlier.in jboss-2.2.2

      I can connect to mysql using jboss-2.2.2 its easy to configure.But its without jsp running support thats why I had to choose jboss-3.0.0-tomcat-4.0.3

      Please help.

      I am in a fix.