1 Reply Latest reply on May 9, 2003 10:06 PM by Jon Barnett

    JBoss 3.2.0 DataSource Behavior

    bkbonner Newbie

      I'm seeing some interesting behavior. I'm trying to use the P6Spy Driver in my data source. I followed the directions (again I've had this working in Websphere).

      My spy.properties points to the realdriver=COM.ibm.db2.jdbc.app.DB2Driver

      My db2-ds.xml points to the following:

      -

      -
      <local-tx-datasource>
      <jndi-name>jdbc/SpcStn</jndi-name>
      <connection-url>jdbc:db2:test</connection-url>
      <driver-class>com.p6spy.engine.spy.P6SpyDriver</driver-class>
      <user-name>user</user-name>
      demo
      <min-pool-size>0</min-pool-size>
      </local-tx-datasource>


      Even if I put a ridiculous value in for driver-class, it still seems to find the driver. Is this using the db2 prefix and looking through any registered drivers to determine which driver to load? I would expect if I put in foo.bar into driver-class that it would throw a problem.

        • 1. Re: JBoss 3.2.0 DataSource Behavior
          Jon Barnett Master

          The datasource will register when you start JBoss. Only when you try to use the datasource will JBoss indicate there is a problem.

          2003-05-10 13:42:21,343 INFO [org.jboss.resource.connectionmanager.TxConnectionManager] Started
          2003-05-10 13:42:21,343 INFO [org.jboss.resource.connectionmanager.TxConnectionManager] Starting
          2003-05-10 13:42:21,343 INFO [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.AmityPool] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=LocalTxCM,name=AmityPool to JNDI name 'java:/AmityPool'
          2003-05-10 13:42:21,353 INFO [org.jboss.resource.connectionmanager.TxConnectionManager] Started

          ...

          2003-05-10 13:42:56,434 INFO [org.jboss.system.server.Server] JBoss (MX MicroKernel) [3.2.0 (build: CVSTag=JBoss_3_2_0 date=200304110033)] Started in 1m:2s:130ms
          2003-05-10 13:54:15,090 INFO [STDOUT] Connection pool problem: org.jboss.util.NestedSQLException: Failed to register driver for: org.wabba.Driver; - nested throwable: (java.lang.ClassNotFoundException: org.wabba.Driver); - nested throwable: (org.jboss.resource.JBossResourceException: Failed to register driver for: org.wabba.Driver; - nested throwable: (java.lang.ClassNotFoundException: org.wabba.Driver))
          2003-05-10 13:54:15,210 INFO [STDOUT] Connection pool problem: org.jboss.util.NestedSQLException: Failed to register driver for: org.wabba.Driver; - nested throwable: (java.lang.ClassNotFoundException: org.wabba.Driver); - nested throwable: (org.jboss.resource.JBossResourceException: Failed to register driver for: org.wabba.Driver; - nested throwable: (java.lang.ClassNotFoundException: org.wabba.Driver))

          See this excerpt where JBoss starts up fine and then I try to access some data via the datasource at a later point in time.