4 Replies Latest reply on May 15, 2002 1:21 PM by Danny Thornton

    JDBC MBean Not Working in JBoss RC1

    Danny Thornton Novice

      My Mbean for mysql works with a version of JBoss 3.0 built on 4-11-02 but not JBoss 3.0 RC1. JBoss RC1 says the mbean deployed successfully but when I check for the JNDI name for the connection pool, it's not there. CMP EJBs won't deploy and have the error:

      Can't find datasource: java:/MyPool, MyPool not bound.

      Is there a configuration change for a jdbc pooled connection mbean in RC1?

        • 1. Re: JDBC MBean Not Working in JBoss RC1
          Danny Thornton Novice

          My MySQL service mbean is configured as follows:

          File: mysql-service.xml
          Location: jbossroot/server/default/deploy
          File Contents:

          <?xml version="1.0" encoding="UTF-8" ?>
          <!-- $Id: mysql-service.xml,v 1.2 2002/01/14 00:16:51 d_jencks Exp $ -->
          <!-- ==================================================================== -->
          <!-- -->
          <!-- Configuration for the mysql database. -->
          <!-- Put the driver jar mm.mysql-2.0.11-bin.jar in lib/ext -->
          <!-- ===================================================================== -->



          ConnectionURL=jdbc:mysql://localhost/DBName DriverClass=org.gjt.mm.mysql.Driver
          MyDBPool
          java:/TransactionManager
          <depends optional-attribute-name="ResourceAdapterName">jboss.jca:service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter
          <depends optional-attribute-name="ConnectionManagerFactoryLoaderName">jboss.jca:service=ConnectionManagerFactoryLoader,name=MinervaSharedLocalCMFactory
          # #Wed Aug 15 16:17:29 EDT 2001 BlockingTimeoutMillis=500000 IdleTimeoutMinutes=30 MaxSize=10 CleanupIntervalMinutes=10 MinSize=0 MaxIdleTimeoutPercent=1.0
          org.jboss.resource.security.ManyToOnePrincipalMapping
          UserName=AUserName password=APassword



          • 2. Re: JDBC MBean Not Working in JBoss RC1
            Danny Thornton Novice

            A couple of corrections to the above posts. MyPool in message 1 = MyDBPool in message 2 (edit prior to post mistake). The space in the name host in message 2 was due to cut and paste.

            Danny

            • 3. Re: JDBC MBean Not Working in JBoss RC1
              David Jencks Master

              Things have changed, ConnectionFactoryLoader is Gone Gone Gone. Please get rc2, and start over with the example configs in docs/examples/jca.

              • 4. Re: JDBC MBean Not Working in JBoss RC1
                Danny Thornton Novice

                Thanks David,

                I got the new JDBC mbean working for RC2. Some points of potential confusion during the process:

                1) For those unfamiliar with JAAS, it's not clear what the principal name is suppose to be set to. I set the principle name to be the same name as the login name and that worked.

                2) The login-config.xml must be edited from the jbossroot/server/default/config directory and not created and dropped in the deploy directory. If this is done, then there will be error messages leading the user to believe a users.properties and roles.properties file must be created. These authentication files aren't required if the jbossroot/server/default/config/login-config.xml is setup and logging into the database correctly.