JBAS014775:New missing/unsatisfied dependencies:service jboss.jdbc-driver.ojdbc7_jar (missing) dependents: [service jboss.data-source.java:/JNDIName - oracle

I use netbeans 8.1. An I try to set up JBoss 7.1.1 on it. My database connection is oracle. But when I run my enterprise app, there is an error on my console like JBAS014775:New missing/unsatisfied dependencies.
standalone.xml
<datasource jta="false" jndi-name="java:/ETOBSORACLEJNDI" pool-name="oracle-thin_GTBDEV1_ETOBSPool" enabled="true" use-ccm="false">
<connection-url>jdbc:oracle:thin:#***************</connection-url>
<driver-class>oracle.jdbc.OracleDriver</driver-class>
<driver>ojdbc7.jar</driver>
<security>
<user-name>ETOBS</user-name>
<password>*******</password>
</security>
</datasource>
module.xml
<module xmlns="urn:jboss:module:1.1" name="com.oracle.ojdbc">
<resources>
<resource-root path="ojdbc7.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
<module name="javax.servlet.api" optional="true"/>
any suggestion?

module.xml
<module xmlns="urn:jboss:module:1.1" name="com.oracle.jdbc">
<resources>
<resource-root path="ojdbc7.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
standalone(-).xml or domain(-).xml to configure a datasource that references this module:
<subsystem xmlns="urn:jboss:domain:datasources:1.2">
<datasources>
<datasource jndi-name="java:jboss/datasources/OracleDS" pool-name="OracleDS" enabled="true" use-java-context="true">
<connection-url>jdbc:oracle:thin:#myhostname:1521:oracle</connection-url>
<driver>oracle</driver>
<pool>
<min-pool-size>10</min-pool-size>
<max-pool-size>20</max-pool-size>
<prefill>true</prefill>
</pool>
<security>
<user-name>myuser</user-name>
<password>mypass</password>
</security>
<validation>
<validate-on-match>true</validate-on-match>
<valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"></valid-connection-checker>
<stale-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleStaleConnectionChecker"></stale-connection-checker>
<exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"></exception-sorter>
</validation>
</datasource>
<drivers>
<driver name="oracle" module="com.oracle.jdbc">
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
</subsystem>

Follow the below step by step procedure:
Install a JDBC driver as a core module
Create a directory under $JBOSS_HOME/modules. In this example: "$JBOSS_HOME/modules/com/oracle/jdbc/main".
Put the the JDBC driver jar (ojdbc7.jar) in this directory
Create a module configuration file module.xml:
Note that the jdbc driver jar must contain a META-INF/services/java.sql.Driver text file that specifies the jdbc Driver, otherwise the Java service provider mechanism used to load the driver will not work. From the main/common vendors only Informix does not have this out of the box.
Configure a datasource setting in standalone.xml or domain.xml.
You can now edit your standalone(-).xml or domain(-).xml to configure a datasource that references this module:
jdbc:oracle:thin:#myhostname:1521:oracle
oracle
10
20
true
myuser
mypass
true
oracle.jdbc.xa.client.OracleXADataSource
Any JDBC 4 compliant driver will automatically be recognized and installed into the system by name and version by Java service provider mechanism. Such JDBC 4 compliant driver have a text file named META-INF/services/java.sql.Driver, which contains the name of the class(es) of the JDBC Drivers, in that JAR. However, non JDBC 4 compliant driver JAR does not contain such META-INF/services/java.sql.Driver file. So it needs some modification to be made deployable. Use ojdbc7.jar when using Java 1.7 .
Try this if you have any issue attach server.log file.

Related

Whats the correct way to allow different jdbc drivers for deployed applications on JBoss / Wildfly?

My setting is the following:
I got an application, which I deploy in /standalone/deployments
The jboss-deployment-structure.xml of my deployment in /standalone/deployments looks the following:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<deployment>
<dependencies>
[...]
<module name="org.postgresql"/>
</dependencies>
</deployment>
</jboss-deployment-structure>
To drop the jboss-deployment-structure.xml completely (because it must not be used if there are no classloading issues), doesn't work. I use more dependencies (keycloak) beside the driver, which can't be found then.
My module.xml in my module org/postgresql/main looks like this (like described in https://www.keycloak.org/docs/4.8/server_installation/index.html#package-the-jdbc-driver)
<?xml version="1.0" encoding="UTF-8"?>
<module name="org.postgresql" xmlns="urn:jboss:module:1.5">
<resources>
<resource-root path="postgresql-42.2.5.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
My requirement is, to allow different types of jdbc-drivers, e.g. postgres, oracle, mssql.
First option:
I can change my jboss-deployment-structure.xml to
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<deployment>
<dependencies>
[...]
<module name="org.postgresql" optional="TRUE"/>
<module name="com.oracle.ojdbc6" optional="TRUE"/>
[...]
</dependencies>
</deployment>
</jboss-deployment-structure>
(added the optional-parameter)
Then I have to allow all drivers explicitly. Seems to be not the best way.
The idea comes from the standard documentation.
Second option:
I change my module-path to driver/jdbc/main (instead of org/postgres/main) and the module.xml to
<module name="driver.jdbc" xmlns="urn:jboss:module:1.5">
[...]
</module>
(changed name of module)
and go with the module-reference in my jboss-deployment-structure.xml like
<jboss-deployment-structure>
[...]
<module name="driver.jdbc"/>
[...]
</jboss-deployment-structure>
Now I force my customers to name the driver-module like I proposed. They can't name the module like mentioned in every standard-documentation.
The idea comes from this question.
I am doing this in context of a keycloak installation with a self-implemented User-federation to access a separate (legacy) user-database. Therefore dropping the jboss-deployment-structure.xml is no option as mentioned above.
Whats the correct way to achieve my goal of being flexible with the jdbc-driver?
EDIT: mentioned, dropping jboss-deployment-structure.xml is not working.
Keycloak have a very well designed container. You can get inspiration from it for your deployment. Just take a look at how the Dockerfile installs database driver modules and later how to activate those modules using jboss_cli.
Of course, if you can, maybe you can use the container instead. Just make sure to include the module.xml for your driver and activate it on start-up by providing your own entrypoint.
I would suggest you should install all database drivers individually as modules. Individual modules will help you to track and upgrade driver jars easily in the future.
As long as you don't have any classloading problems with your application you don't need to mention these drivers in the jboss-deployment-structure.xml file. They are static modules and will be loaded on server startup.
Moreover, after installing the driver modules, you have to add entries in the standalone.xml file. For example, if I have installed Oracle driver then
<driver name="oracle" module="com.oracle">
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
</driver>
within the tag.
Add a datasource definition within the tag (next to ExampleDS):
<datasource jndi-name="java:/[NAME]" pool-name="OracleDS" enabled="true">
<connection-url>jdbc:oracle:thin:#[HOST_NAME]:1521:[SID]</connection-url>
<driver>oracle[has to match the driver name]</driver>
<pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>5</max-pool-size>
<prefill>true</prefill>
</pool>
<security>
<user-name>[USER]</user-name>
<password>[PWD]</password>
</security>
</datasource>
At least I went with a hybrid solution of my two above mentioned approaches for the jboss-deployment-structure.xml like as follows
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="org.postgresql" optional="TRUE"/>
<module name="com.oracle.ojdbc6" optional="TRUE"/>
[...]
<module name="driver.jdbc" optional="TRUE"/>
</dependencies>
</deployment>
</jboss-deployment-structure>
I listed all the relevant database divers as optional modules and listed another one with flexible naming if a driver is desired, which is not mentioned in the list above.

wildfly - installing postgres driver jar

I am having difficulty installing the postgres driver. I've tried a bunch of things:
https://docs.jboss.org/author/display/WFLY10/Application+deployment
a. tried "deploying" the JAR (both from CLI and admin console UI)
https://sites.google.com/site/jmdstips/jboss-wildfly/postgresql-on-wildfly---xa-datasource
a. tried putting module definition in modules/org/postgresql ...
b. tried putting module definition in modules/system/layers/base/org/postgresql
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.3" name="org.postgres">
<resources>
<resource-root path="postgresql-9.4.1212.jre7.jar" />
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
<module name="javax.servlet.api" optional="true"/>
</dependencies>
</module>
And:
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
<driver name="postgresql" module="org.postgresql">
<datasource-class>org.postgresql.Driver</datasource-class>
<xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
</driver>
</drivers>
After all of that, I get this error. So, I think wildfly can "see" the module, but something is awry.
23:24:15,889 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 33) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("jdbc-driver" => "postgresql")
]) - failure description: "WFLYJCA0041: Failed to load module for driver [org.postgresql]"
short answer: put the driver in the /wildfly/standalone/deployments folder, it will deploy the driver automatically
It turns out I used "org.postgres" for the module name in standalone.xml instead of "org.postgresql" which is what I declared it as inside the module.xml
I also encountered this error and it was due to the module.xml not having the correct resource-root

How to connect to a Kerberos-secured Apache Phoenix data source with WildFly?

I have recently spent several weeks trying to get WildFly to successfully connect to a Kerberized Apache Phoenix data source. There is a surprisingly limited amount of documentation on how to do this, but now that I have cracked it, I'm sharing.
Environment:
WildFly 9+. An equivalent JBoss version should also work (but untested). WildFly 8 does not contain the required org.jboss.security.negotiation.KerberosLoginModule class (but you can hack it, see Kerberos sql server datasource in Wildfly 8.2). I used WildFly 10.1.0.Final, and used a standalone deployment.
Apache Phoenix 4.2.0.2.2.4.10. I have not tested any other version.
Kerberos v5. My KDC is running on Windows Active Directory, but this should not make a noticable difference.
My Hadoop environment is a HortonWorks version, and maintained by Ambari. Ambari ensures that all of the configuration files and Kerberos implementation settings are correct.
Firstly, you'll want to add a system property to WildFly's standalone.xml to specify the location of the Kerberos configuration file:
...
</extensions>
<system-properties>
<property name="java.security.krb5.conf" value="/path/to/krb5.conf"/>
</system-properties>
...
I'm not going to go into the format of the krb5.conf file here, as it is dependent on your own implementation of Kerberos. What is important is that it contains the default realm and network location of the KDC. On Linux you can normally find it at /etc/krb5.conf or /etc/security/krb5.conf. If you're running WildFly on Windows, then make sure you use forward-slashes in your path, e.g. "C:/Source/krb5.conf"
Secondly, add two new security domains to standalone.xml - one called "Client" which is used by ZooKeeper, and another called "host", which is used by WildFly. Do not ask me why (it caused me so much pain) but the name of the "Client" security domain must match that defined in Zookeeper's JAAS client configuration file on the server. If you've set up with Ambari, "Client" is the default name. Also note that you cannot simply provide a jaas.config file as a system property, you must define it here:
<security-domain name="Client" cache-type="default">
<login-module code="com.sun.security.auth.module.Krb5LoginModule" flag="required">
<module-option name="useTicketCache" value="true"/>
<module-option name="debug" value="true"/>
</login-module>
</security-domain>
<security-domain name="host" cache-type="default">
<login-module code="org.jboss.security.negotiation.KerberosLoginModule" flag="required" module="org.jboss.security.negotiation">
<module-option name="useTicketCache" value="true"/>
<module-option name="debug" value="true"/>
<module-option name="refreshKrb5Config" value="true"/>
<module-option name="addGSSCredential" value="true"/>
</login-module>
</security-domain>
The module options will vary depending on your implementation. I'm getting my tickets from the default Java ticket cache, which is defined in the java.security file of your JRE, but you can supply a keytab here if you want. Note that setting storeKey to true broke my implementation. Check the Java documentation for all of the options. Note that each security domain uses a different login module: this is not by accident - Phoenix does not know how to use the org.jboss... version.
Now you need to provide WildFly with the org.apache.phoenix.jdbc.PhoenixDriver class in phoenix-<version>-client.jar. Create the following directory tree under the WildFly directory:
/modules/system/layers/base/org/apache/phoenix/main/
In the main directory, paste the phoenix--client.jar which you can find on the server (e.g. /usr/hdp/<version>/phoenix/client/bin) and create a module.xml file:
<?xml version="1.0" ?>
<module xmlns="urn:jboss:module:1.1" name="org.apache.phoenix">
<resources>
<resource-root path="phoenix-<version>-client.jar">
<filter>
<exclude-set>
<path name="javax" />
<path name="org/xml" />
<path name="org/w3c/dom" />
<path name="org/w3c/sax" />
<path name="javax/xml/parsers" />
<path name="com/sun/org/apache/xerces/internal/jaxp" />
<path name="org/apache/xerces/jaxp" />
<path name="com/sun/jersey/core/impl/provider/xml" />
</exclude-set>
</filter>
</resource-root>
<resource-root path=".">
</resource-root>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="sun.jdk"/>
<module name="org.apache.log4j"/>
<module name="javax.transaction.api"/>
<module name="org.apache.commons.logging"/>
</dependencies>
</module>
You also need to paste the hbase-site.xml and core-site.xml from the server into the main directory. These are typically located in /usr/hdp/<version>/hbase/conf and /usr/hdp/<version>/hadoop/conf. If you don't add these, you will get a lot of unhelpful ZooKeeper getMaster errors! If you want the driver to log to the same place as WildFly, then you should also create a log4j.xml file in the main directory. You can find an example elsewhere on the web. The <resource-root path="."></resource-root> element is what adds those xml files to the classpath when deployed by WildFly.
Finally, add a new datasource and driver in the <subsystem xmlns="urn:jboss:domain:datasources:2.0"> section. You can do this with the CLI or by directly editing standalone.xml, I did the latter:
<datasource jndi-name="java:jboss/datasources/PhoenixDS" pool-name="PhoenixDS" enabled="true" use-java-context="true">
<connection-url>jdbc:phoenix:first.quorumserver.fqdn,second.quorumserver.fqdn:2181/hbase-secure</connection-url>
<connection-property name="phoenix.connection.autoCommit">true</connection-property>
<driver>phoenix</driver>
<validation>
<check-valid-connection-sql>SELECT 1 FROM SYSTEM.CATALOG LIMIT 1</check-valid-connection-sql>
</validation>
<security>
<security-domain>host</security-domain>
</security>
</datasource>
<drivers>
<driver name="phoenix" module="org.apache.phoenix">
<xa-datasource-class>org.apache.phoenix.jdbc.PhoenixDriver</xa-datasource-class>
</driver>
</drivers>
It's important that you replace first.quorumserver.fqdn,second.quorumserver.fqdn with the correct ZooKeeper quorum string for your environment. You can find this in hbase-site.xml in the HBase configuration directory: hbase.zookeeper.quorum. You don't need to add Kerberos information to the connection URL string!
tl;dr
Make sure that hbase-site.xml and core-site.xml are in your classpath.
Make sure that you have a <security-domain> with a name that ZooKeeper expects (probably "Client"), that uses the com.sun.security.auth.module.Krb5LoginModule.
The Phoenix connection URL must contain the entire ZooKeeper quorum. You can't miss one server out! Make sure it matches the value in hbase-site.xml.
References:
Using Kerberos for Datasource Authentication
Phoenix data source configuration by Mark S

Db2 Driver/Datasource setup on wildfly: Failed to load module for driver [com.ibm]

I am wanting to configure the data source for db2 on my wildfly server (Wildfly.8.0.0-Final and 8.1.0 as well.) and am running into some problems doing so.
My research tells me this is a two step process
install the drivers as a module in the %JBOSS_HOME%/modules/com/ibm/main dir.
configure the datasources subsystem to include this module as a driver in your connection settings.
So far I have installed the module under the following structure with the following module.xml:
modules/
`-- com/
`-- ibm/
`-- main/
|-- db2jcc4.jar
|-- db2jcc_license_cu.jar
|-- db2jcc_license_cisuz.jar
`-- module.xml
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.3" name="com.ibm">
<resources>
<resource-root path="db2jcc4.jar"/>
<resource-root path="db2jcc_license_cu.jar"/>
<resource-root path="db2jcc_license_cisuz.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
<module name="sun.jdk"/>
</dependencies>
</module>
There is no space before the <?...?> in the xml file. the module name is "com.ibm" and the datasource is as follows:
<subsystem xmlns="urn:jboss:domain:datasources:2.0">
<datasources>
<datasource jndi-name="java:/jdbc/MyDS" pool-name="MyDS" enabled="true" use-java-context="true">
<xa-datasource-property name="ServerName">myIP</xa-datasource-property>
<xa-datasource-property name="PortNumber">1234</xa-datasource-property>
<xa-datasource-property name="DatabaseName">MyDB</xa-datasource-property>
<xa-datasource-property name="DriverType">4</xa-datasource-property>
<driver>ibmdb2</driver>
<pool>
<min-pool-size>0</min-pool-size>
<max-pool-size>50</max-pool-size>
</pool>
<security>
<user-name>bob</user-name>
<password>isyouruncle</password>
</security>
<validation>
<valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.db2.DB2ValidConnectionChecker"/>
<stale-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.db2.DB2StaleConnectionChecker"/>
<exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.db2.DB2ExceptionSorter"/>
</validation>
</datasource>
<drivers>
<driver name="ibmdb2" module="com.ibm">
<xa-datasource-class>com.ibm.db2.jcc.DB2XADatasource</xa-datasource-class>
</driver>
</drivers>
</datasources>
</subsystem>
The loading up of the server produces this error:
12:49:01,228 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 9) JBAS014613: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("jdbc-driver" => "ibmdb2")
]) - failure description: "JBAS010441: Failed to load module for driver [com.ibm]"
Which in turn causes my datasource declaration to fail loading as the driver is missing.
I am using older documentation as a guide because there doesn't seem to be any available for wildfly as yet. this documentation shows some promise but it seems a little out of date. If anyone has had any experience setting this up then Your help would be much appreciated.
I want to connect to DB2 9.7.
Please and thank you.
try replacing :
<resources-root path="db2jcc4.jar"/>
<resources-root path="db2jcc_license_cu.jar"/>
<resources-root path="db2jcc_license_cisuz.jar"/>
by
<resource-root path="db2jcc4.jar"/>
<resource-root path="db2jcc_license_cu.jar"/>
<resource-root path="db2jcc_license_cisuz.jar"/>
Remove the s from resources-route!
You could try to enable jboss.jdbc.spy = TRACE and add spy="true" to the datasource.
<datasource jndi-name="..." ... spy="true">
and
<logger category="jboss.jdbc.spy">
<level name="TRACE"/>
</logger>
This is normally to debug the JDBC, but perhaps it shows more on the loading of the driver as well.
Also you definitely need the resource-root without s.
I had the same issue. I resolved it by removing these two lines from module.xml:
<resource-root path="db2jcc_license_cu.jar"/>
<resource-root path="db2jcc_license_cisuz.jar"/>
I don't have a specific explanation as to why this worked.
This is not the solution to your problem but a reference for future visitors who (like me) come to this question by search of the same error message:
Today I had the same problem, for me it was an error in module.xml and standalone-full.xml. In both cases the module name was given as com.ibm.main, but it should have been com.ibm.
So in short: If you encounter this message and double checking the config files doesn't help, rewrite them.
jar files in module main folder should be added to the module.xml as
<resources>
<resource-root path="db2jcc4.jar"/>
<resource-root path="db2jcc_license_cu.jar"/>
</resources>
If you're using db2jcc.jar and not db2jcc4.jar and as you're defining a standard (non-XA) datasource, perhaps it helps to spedicfy the driver class too.
<driver-class>com.ibm.db2.jcc.DB2Driver</driver-class>
Everything is correct, just make s capital for (DB2XADatasource) as below:
<xa-datasource-class>com.ibm.db2.jcc.DB2XADataSource</xa-datasource-class>

Issue configuring JBoss EAP 6.1 with hibernate 3.6

I'm trying to deploy an EAR file in my local server but it seems it's still trying to use hibernate 4 (the default option, I guess).
What I have already done:
I've added a hibernate 3 module in $JBOSS_HOME$\modules\org.hibernate\3 with this module.xml file:
<module xmlns="urn:jboss:module:1.0" name="org.hibernate" slot="3">
<resources>
<resource-root path="hibernate3.jar"/>
<resource-root path="commons-collections-3.1.jar"/>
<resource-root path="jta-1.1.jar"/>
<resource-root path="javassist-3.12.0.GA.jar"/>
<resource-root path="antlr-2.7.6.jar"/>
<resource-root path="slf4j-api-1.6.1.jar"/>
<resource-root path="dom4j-1.6.1.jar"/>
<!-- Insert other Hibernate 3 jars to be used here -->
</resources>
<dependencies>
<module name="org.jboss.as.jpa.hibernate" slot="3"/>
<module name="asm.asm"/>
<module name="javax.api"/>
<module name="javax.persistence.api"/>
<module name="javax.transaction.api"/>
<module name="com.ibm.db2" />
<module name="org.infinispan"/>
</dependencies>
</module>
I've created the data source in standalone-full-ha.xml:
<datasource jndi-name="java:jboss/datasources/txdb" pool-name="txdbDS" enabled="true" use-java-context="true">
<connection-url>jdbc:db2://156.24.30.103:50000/TX_LSPDB</connection-url>
<driver>DB2Driver</driver>
<security>
<user-name> .... </user-name>
<password> .... </password>
</security>
</datasource>
My persistence.xml file has the following entry:
<persistence-unit name="esdb">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:jboss/datasources/txdb</jta-data-source>
<class>com.gtech.commerce.UidBlockPool</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.DB2Dialect"/>
<property name="jboss.as.jpa.providerModule" value="org.jboss.as.jpa.hibernate:3" />
</properties>
</persistence-unit>
And this is what I get when I try to deploy:
Caused by: java.lang.ClassCastException: org.springframework.orm.hibernate3.LocalJtaDataSourceConnectionProvider incompatible with org.hibernate.service.jdbc.connections.spi.ConnectionProvider at org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator.instantiateExplicitConnectionProvider(ConnectionProviderInitiator.java:189) [hibernate-core-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1] ... 107 more
Any idea about what I am missing?
UPDATE: I haven't found a solution, so I did the obvious workaround: I am using hibernate 3 bundled with the application, ignoring any module
Imho the problem comes from the fact that the jboss datasource built-in connection pool rely on the default persistence implementation provided with the server.
you can try to override the server datasource configuration
see https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_BRMS_Platform/5/html/BRMS_Administrator_Guide/Configuring_a_Datasource_for_JBoss_Enterprise_Application_Platform_6.html
But i don't know if you can specify the connection pool provider.
You could try otherwise to set up a custom datasource
see http://docs.jboss.org/hibernate/orm/4.1/devguide/en-US/html/ch01.html
please consider than you won't be any more in this case: JDBC connections obtained from a JNDI datasource automatically participate in the container-managed transactions of the application server.
and will have to properly configure the transaction factory.
As a more general comment I'll advise not to override provided implementation when using a Java EE application server.
If you wan't to use hibernate 3 switch to Jboss 6.0 or do not rely on the built-in java EE container features (and in this case switch to something lighter like jetty or tomcat)

Resources