[jboss-cvs] JBossAS SVN: r111802 - in projects/jboss-jca/branches/Branch_1_0: adapters/src/test/resources and 5 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Jul 20 12:11:02 EDT 2011


Author: jesper.pedersen
Date: 2011-07-20 12:11:01 -0400 (Wed, 20 Jul 2011)
New Revision: 111802

Added:
   projects/jboss-jca/branches/Branch_1_0/adapters/src/test/java/org/jboss/jca/adapters/jdbc/unit/H2DynamicDriverTestCase.java
   projects/jboss-jca/branches/Branch_1_0/adapters/src/test/java/org/jboss/jca/adapters/jdbc/unit/H2ModuleTestCase.java
   projects/jboss-jca/branches/Branch_1_0/adapters/src/test/resources/h2-dynamic-driver-ds.xml
   projects/jboss-jca/branches/Branch_1_0/adapters/src/test/resources/h2-module-ds.xml
   projects/jboss-jca/branches/Branch_1_0/deployers/src/main/java/org/jboss/jca/deployers/fungal/DriverRegistry.java
Modified:
   projects/jboss-jca/branches/Branch_1_0/deployers/src/main/java/org/jboss/jca/deployers/common/AbstractDsDeployer.java
   projects/jboss-jca/branches/Branch_1_0/deployers/src/main/java/org/jboss/jca/deployers/fungal/DsXmlDeployer.java
   projects/jboss-jca/branches/Branch_1_0/doc/userguide/en-US/modules/deployment.xml
   projects/jboss-jca/branches/Branch_1_0/embedded/src/main/resources/ds.xml
   projects/jboss-jca/branches/Branch_1_0/sjc/src/main/resources/bootstrap/ds.xml
Log:
[JBJCA-633] Support <drivers> deployments

Added: projects/jboss-jca/branches/Branch_1_0/adapters/src/test/java/org/jboss/jca/adapters/jdbc/unit/H2DynamicDriverTestCase.java
===================================================================
--- projects/jboss-jca/branches/Branch_1_0/adapters/src/test/java/org/jboss/jca/adapters/jdbc/unit/H2DynamicDriverTestCase.java	                        (rev 0)
+++ projects/jboss-jca/branches/Branch_1_0/adapters/src/test/java/org/jboss/jca/adapters/jdbc/unit/H2DynamicDriverTestCase.java	2011-07-20 16:11:01 UTC (rev 111802)
@@ -0,0 +1,103 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.adapters.jdbc.unit;
+
+import org.jboss.jca.adapters.ArquillianJCATestUtils;
+import org.jboss.jca.embedded.dsl.InputStreamDescriptor;
+
+import java.sql.Connection;
+
+import javax.annotation.Resource;
+import javax.sql.DataSource;
+
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive;
+import org.jboss.shrinkwrap.descriptor.api.Descriptor;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.assertNotNull;
+
+/**
+ * Test cases for getting a connection from the H2 database
+ *
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+ at RunWith(Arquillian.class)
+public class H2DynamicDriverTestCase
+{
+
+   //-------------------------------------------------------------------------------------||
+   //---------------------- GIVEN --------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Define the deployment
+    * @return The deployment archive
+    * @throws Exception in case of errors
+    */
+   @Deployment(order = 1)
+   public static ResourceAdapterArchive createArchive() throws Exception
+   {
+      return ArquillianJCATestUtils.buildShrinkwrapJdbcLocal();
+   }
+
+   /**
+    * Define the -ds.xml
+    * @return The deployment archive
+    * @throws Exception in case of errors
+    */
+   @Deployment(order = 2)
+   public static Descriptor createDescriptor() throws Exception
+   {
+      ClassLoader cl = Thread.currentThread().getContextClassLoader();
+      InputStreamDescriptor isd = new InputStreamDescriptor("h2-dynamic-driver-ds.xml",
+                                                            cl.getResourceAsStream("h2-dynamic-driver-ds.xml"));
+      return isd;
+   }
+
+   //-------------------------------------------------------------------------------------||
+   //---------------------- WHEN  --------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+   //
+   @Resource(mappedName = "java:/H2DS")
+   private DataSource ds;
+
+   //-------------------------------------------------------------------------------------||
+   //---------------------- THEN  --------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Basic
+    * @exception Throwable Thrown if case of an error
+    */
+   @Test
+   public void testBasic() throws Throwable
+   {
+      assertNotNull(ds);
+      Connection c = ds.getConnection();
+      assertNotNull(c);
+   }
+}

Added: projects/jboss-jca/branches/Branch_1_0/adapters/src/test/java/org/jboss/jca/adapters/jdbc/unit/H2ModuleTestCase.java
===================================================================
--- projects/jboss-jca/branches/Branch_1_0/adapters/src/test/java/org/jboss/jca/adapters/jdbc/unit/H2ModuleTestCase.java	                        (rev 0)
+++ projects/jboss-jca/branches/Branch_1_0/adapters/src/test/java/org/jboss/jca/adapters/jdbc/unit/H2ModuleTestCase.java	2011-07-20 16:11:01 UTC (rev 111802)
@@ -0,0 +1,103 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.adapters.jdbc.unit;
+
+import org.jboss.jca.adapters.ArquillianJCATestUtils;
+import org.jboss.jca.embedded.dsl.InputStreamDescriptor;
+
+import java.sql.Connection;
+
+import javax.annotation.Resource;
+import javax.sql.DataSource;
+
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive;
+import org.jboss.shrinkwrap.descriptor.api.Descriptor;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.assertNotNull;
+
+/**
+ * Test cases for getting a connection from the H2 database
+ *
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+ at RunWith(Arquillian.class)
+public class H2ModuleTestCase
+{
+
+   //-------------------------------------------------------------------------------------||
+   //---------------------- GIVEN --------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Define the deployment
+    * @return The deployment archive
+    * @throws Exception in case of errors
+    */
+   @Deployment(order = 1)
+   public static ResourceAdapterArchive createArchive() throws Exception
+   {
+      return ArquillianJCATestUtils.buildShrinkwrapJdbcLocal();
+   }
+
+   /**
+    * Define the -ds.xml
+    * @return The deployment archive
+    * @throws Exception in case of errors
+    */
+   @Deployment(order = 2)
+   public static Descriptor createDescriptor() throws Exception
+   {
+      ClassLoader cl = Thread.currentThread().getContextClassLoader();
+      InputStreamDescriptor isd = new InputStreamDescriptor("h2-module-ds.xml",
+                                                            cl.getResourceAsStream("h2-module-ds.xml"));
+      return isd;
+   }
+
+   //-------------------------------------------------------------------------------------||
+   //---------------------- WHEN  --------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+   //
+   @Resource(mappedName = "java:/H2DS")
+   private DataSource ds;
+
+   //-------------------------------------------------------------------------------------||
+   //---------------------- THEN  --------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Basic
+    * @exception Throwable Thrown if case of an error
+    */
+   @Test
+   public void testBasic() throws Throwable
+   {
+      assertNotNull(ds);
+      Connection c = ds.getConnection();
+      assertNotNull(c);
+   }
+}

Added: projects/jboss-jca/branches/Branch_1_0/adapters/src/test/resources/h2-dynamic-driver-ds.xml
===================================================================
--- projects/jboss-jca/branches/Branch_1_0/adapters/src/test/resources/h2-dynamic-driver-ds.xml	                        (rev 0)
+++ projects/jboss-jca/branches/Branch_1_0/adapters/src/test/resources/h2-dynamic-driver-ds.xml	2011-07-20 16:11:01 UTC (rev 111802)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
+  <datasource jndi-name="java:/H2DS" pool-name="H2DS">
+    <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
+    <driver>h2.jar</driver>
+    <security>
+      <user-name>sa</user-name>
+      <password>sa</password>
+    </security>
+  </datasource>
+</datasources>

Added: projects/jboss-jca/branches/Branch_1_0/adapters/src/test/resources/h2-module-ds.xml
===================================================================
--- projects/jboss-jca/branches/Branch_1_0/adapters/src/test/resources/h2-module-ds.xml	                        (rev 0)
+++ projects/jboss-jca/branches/Branch_1_0/adapters/src/test/resources/h2-module-ds.xml	2011-07-20 16:11:01 UTC (rev 111802)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
+  <datasource jndi-name="java:/H2DS" pool-name="H2DS">
+    <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
+    <driver>h2</driver>
+    <security>
+      <user-name>sa</user-name>
+      <password>sa</password>
+    </security>
+  </datasource>
+  <drivers>
+      <driver name="h2" module="h2.jar">
+      </driver>
+  </drivers>
+</datasources>

Modified: projects/jboss-jca/branches/Branch_1_0/deployers/src/main/java/org/jboss/jca/deployers/common/AbstractDsDeployer.java
===================================================================
--- projects/jboss-jca/branches/Branch_1_0/deployers/src/main/java/org/jboss/jca/deployers/common/AbstractDsDeployer.java	2011-07-20 15:50:05 UTC (rev 111801)
+++ projects/jboss-jca/branches/Branch_1_0/deployers/src/main/java/org/jboss/jca/deployers/common/AbstractDsDeployer.java	2011-07-20 16:11:01 UTC (rev 111802)
@@ -239,10 +239,30 @@
                         if (dataSource.getDriverClass() == null && dataSource.getDriver() != null &&
                             dataSource instanceof DataSourceImpl)
                         {
-                           ((DataSourceImpl) dataSource).forceDriverClass(dataSources.getDriver(dataSource
-                              .getDriver()).getDriverClass());
+                           String driverClass = null;
+
+                           if (dataSources.getDriver(dataSource.getDriver()) != null)
+                              driverClass = dataSources.getDriver(dataSource.getDriver()).getDriverClass();
+
+                           if (driverClass != null)
+                              ((DataSourceImpl) dataSource).forceDriverClass(driverClass);
                         }
 
+                        if (dataSource.getDriverClass() == null && dataSource.getDriver() != null &&
+                            dataSource instanceof DataSourceImpl)
+                        {
+                           String driverName = dataSource.getDriver();
+                           String moduleId = null;
+
+                           if (dataSources.getDriver(dataSource.getDriver()) != null)
+                              moduleId = dataSources.getDriver(dataSource.getDriver()).getModule();
+
+                           String driverClass = getDriver(driverName, moduleId);
+
+                           if (driverClass != null)
+                              ((DataSourceImpl) dataSource).forceDriverClass(driverClass);
+                        }
+
                         Object cf = deployDataSource(dataSource, jndiName,
                                                      uniqueJdbcLocalId, mgtDataSource, jdbcLocalDeploymentCl);
 
@@ -359,6 +379,17 @@
    }
 
    /**
+    * Get the driver
+    * @param driverName The name of the driver
+    * @param moduleId The id of the module
+    * @return The driver class name; or <code>null</code> if not found
+    */
+   protected String getDriver(String driverName, String moduleId)
+   {
+      return null;
+   }
+
+   /**
     * Deploy a datasource
     * @param ds The datasource
     * @param jndiName The JNDI name

Added: projects/jboss-jca/branches/Branch_1_0/deployers/src/main/java/org/jboss/jca/deployers/fungal/DriverRegistry.java
===================================================================
--- projects/jboss-jca/branches/Branch_1_0/deployers/src/main/java/org/jboss/jca/deployers/fungal/DriverRegistry.java	                        (rev 0)
+++ projects/jboss-jca/branches/Branch_1_0/deployers/src/main/java/org/jboss/jca/deployers/fungal/DriverRegistry.java	2011-07-20 16:11:01 UTC (rev 111802)
@@ -0,0 +1,144 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.deployers.fungal;
+
+import org.jboss.jca.deployers.DeployersLogger;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.logging.Logger;
+
+/**
+ * A driver registry
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+public class DriverRegistry
+{
+   /** The logger */
+   private static DeployersLogger log = 
+      Logger.getMessageLogger(DeployersLogger.class, DriverRegistry.class.getName());
+
+   /** The classloader to scan */
+   private ClassLoader cl;
+
+   /** Driver map */
+   private Map<String, String> driverMap;
+
+   /**
+    * Constructor
+    */
+   public DriverRegistry()
+   {
+      this.cl = null;
+      this.driverMap = new HashMap<String, String>();
+   }
+
+   /**
+    * Set the classloader
+    * @param value The value
+    */
+   public void setScanClassLoader(ClassLoader cl)
+   {
+      this.cl = cl;
+   }
+
+   /**
+    * Get driver for a module
+    * @return The driver; <code>null</code> if not defined
+    */
+   public String getDriver(String module)
+   {
+      if (module == null)
+         return null;
+
+      return driverMap.get(module);
+   }
+
+   /**
+    * Start
+    * @exception Throwable If an error occurs
+    */
+   public void start() throws Throwable
+   {
+      if (cl != null)
+      {
+         Enumeration<URL> drivers = cl.getResources("META-INF/services/java.sql.Driver");
+         if (drivers != null)
+         {
+            while (drivers.hasMoreElements())
+            {
+               URL driver = null;
+               InputStream is = null;
+               try
+               {
+                  driver = drivers.nextElement();
+
+                  is = driver.openStream();
+
+                  ByteArrayOutputStream bos = new ByteArrayOutputStream();
+                  int i = is.read();
+                  while (i != -1)
+                  {
+                     bos.write((byte)i);
+                     i = is.read();
+                  }
+
+                  String driverClass = bos.toString();
+
+                  String module = driver.toExternalForm();
+                  module = module.substring(0, module.indexOf("!"));
+                  module = module.substring(module.lastIndexOf("/") + 1);
+                 
+                  log.debugf("Driver class: %s Module: %s", driverClass, module);
+
+                  driverMap.put(module, driverClass);
+               }
+               catch (Throwable t)
+               {
+                  log.debug("Exception for driver: " + driver, t);
+               }
+               finally
+               {
+                  if (is != null)
+                  {
+                     try
+                     {
+                        is.close();
+                     }
+                     catch (IOException ioe)
+                     {
+                        // Ignore
+                     }
+                  }
+               }
+            }
+         }
+      }
+   }
+}

Modified: projects/jboss-jca/branches/Branch_1_0/deployers/src/main/java/org/jboss/jca/deployers/fungal/DsXmlDeployer.java
===================================================================
--- projects/jboss-jca/branches/Branch_1_0/deployers/src/main/java/org/jboss/jca/deployers/fungal/DsXmlDeployer.java	2011-07-20 15:50:05 UTC (rev 111801)
+++ projects/jboss-jca/branches/Branch_1_0/deployers/src/main/java/org/jboss/jca/deployers/fungal/DsXmlDeployer.java	2011-07-20 16:11:01 UTC (rev 111802)
@@ -86,6 +86,9 @@
    /** Metadata repository */
    protected MetadataRepository mdr;
 
+   /** Driver registry */
+   protected DriverRegistry driverRegistry;
+
    /**
     * Constructor
     */
@@ -94,6 +97,8 @@
       this.kernel = null;
       this.jdbcLocal = null;
       this.jdbcXA = null;
+      this.mdr = null;
+      this.driverRegistry = null;
    }
 
    /**
@@ -159,6 +164,15 @@
    }
 
    /**
+    * Set the driver registry
+    * @param value The value
+    */
+   public void setDriverRegistry(DriverRegistry value)
+   {
+      driverRegistry = value;
+   }
+
+   /**
     * Deploy
     * @param url The url
     * @param parent The parent classloader
@@ -306,6 +320,23 @@
    }
 
    /**
+    * Get the driver
+    * @param driverName The name of the driver
+    * @param moduleId The id of the module
+    * @return The driver class name; or <code>null</code> if not found
+    */
+   @Override
+   protected String getDriver(String driverName, String moduleId)
+   {
+      String driver = driverRegistry.getDriver(driverName);
+
+      if (driver == null)
+         driver = driverRegistry.getDriver(moduleId);
+
+      return driver;
+   }
+
+   /**
     * Start
     */
    public void start()

Modified: projects/jboss-jca/branches/Branch_1_0/doc/userguide/en-US/modules/deployment.xml
===================================================================
--- projects/jboss-jca/branches/Branch_1_0/doc/userguide/en-US/modules/deployment.xml	2011-07-20 15:50:05 UTC (rev 111801)
+++ projects/jboss-jca/branches/Branch_1_0/doc/userguide/en-US/modules/deployment.xml	2011-07-20 16:11:01 UTC (rev 111802)
@@ -751,7 +751,8 @@
               <row>
                 <entry><code>driver</code></entry>
                 <entry>
-                  An unique name for the JDBC driver specified in the drivers section
+                  An unique name for the JDBC driver specified in the drivers section.
+                  Or the name of the .jar file if deployed as standalone deployment
                 </entry>
               </row>
               <row>
@@ -859,8 +860,8 @@
               <row>
                 <entry><code>driver</code></entry>
                 <entry>
-                  An unique reference to the classloader module which contains the JDBC driver
-                   The accepted format is driverName#majorVersion.minorVersion
+                  An unique name for the JDBC driver specified in the drivers section.
+                  Or the name of the .jar file if deployed as standalone deployment
                 </entry>
               </row>
               <row>
@@ -1364,7 +1365,10 @@
               <row>
                 <entry><code>module</code></entry>
                 <entry>
-                  The module definition for the JDBC driver
+                  The module definition for the JDBC driver. The format of a module inside
+                  JBoss Application Server 7+ is <code>com.h2database.h2</code> which will
+                  map to the H2 installation under <code>modules/com/h2database/h2/main</code>.
+                  The format for IronJacamar Standalone/Embedded is the name of the .jar file
                 </entry>
               </row>
               <row>

Modified: projects/jboss-jca/branches/Branch_1_0/embedded/src/main/resources/ds.xml
===================================================================
--- projects/jboss-jca/branches/Branch_1_0/embedded/src/main/resources/ds.xml	2011-07-20 15:50:05 UTC (rev 111801)
+++ projects/jboss-jca/branches/Branch_1_0/embedded/src/main/resources/ds.xml	2011-07-20 16:11:01 UTC (rev 111802)
@@ -1,5 +1,11 @@
 <deployment>
 
+  <!-- Driver registry -->
+  <bean name="DriverRegistry" 
+        class="org.jboss.jca.deployers.fungal.DriverRegistry">
+    <property name="ScanClassLoader"><inject bean="Kernel" property="KernelClassLoader"/></property>
+  </bean>
+
   <!-- Datasource deployer -->
   <bean name="DsXmlDeployer" 
         class="org.jboss.jca.deployers.fungal.DsXmlDeployer">
@@ -10,6 +16,7 @@
     <property name="Kernel"><inject bean="Kernel"/></property>
     <property name="ManagementRepository"><inject bean="ManagementRepository"/></property>
     <property name="CachedConnectionManager"><inject bean="CCM"/></property>
+    <property name="DriverRegistry"><inject bean="DriverRegistry"/></property>
   </bean>
 
 </deployment>

Modified: projects/jboss-jca/branches/Branch_1_0/sjc/src/main/resources/bootstrap/ds.xml
===================================================================
--- projects/jboss-jca/branches/Branch_1_0/sjc/src/main/resources/bootstrap/ds.xml	2011-07-20 15:50:05 UTC (rev 111801)
+++ projects/jboss-jca/branches/Branch_1_0/sjc/src/main/resources/bootstrap/ds.xml	2011-07-20 16:11:01 UTC (rev 111802)
@@ -1,6 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <deployment>
 
+  <!-- Driver registry -->
+  <bean name="DriverRegistry" 
+        class="org.jboss.jca.deployers.fungal.DriverRegistry">
+    <property name="ScanClassLoader"><inject bean="Kernel" property="KernelClassLoader"/></property>
+  </bean>
+
   <!-- Datasource deployer -->
   <bean name="DsXmlDeployer" 
         class="org.jboss.jca.deployers.fungal.DsXmlDeployer">
@@ -11,6 +17,7 @@
     <property name="Kernel"><inject bean="Kernel"/></property>
     <property name="ManagementRepository"><inject bean="ManagementRepository"/></property>
     <property name="CachedConnectionManager"><inject bean="CCM"/></property>
+    <property name="DriverRegistry"><inject bean="DriverRegistry"/></property>
   </bean>
 
 </deployment>



More information about the jboss-cvs-commits mailing list