Section 4.6. JDBC Driver JARs


4.6. JDBC Driver JARs

A DataSource is a container-managed resource. The JBoss documentation recommends storing the JAR outside of your EAR and in $JBOSS_HOME/server/default/lib. (One big reason for this is that JDBC drivers cannot be hot deployed.) For example, the $JBOSS_HOME/server/default/lib directory is where you'll find hsqldb.jarthe JDBC driver for the Hypersonic database. As an added benefit, if you store the drivers here, you can share them across multiple EARs. With less duplication, there is less of a chance for mismatched drivers and database versions.

Figure 4-1. The JBoss JMX-Console


Figure 4-2. MBean configuration


Of course, if you are not going to be hot deploying your EARs you can include your JDBC drivers in your EAR. This gives you the added benefit of allowing each EAR to use potentially different or conflicting versions of the same JDBC driver.



JBoss at Work. A Practical Guide
JBoss at Work: A Practical Guide
ISBN: 0596007345
EAN: 2147483647
Year: 2004
Pages: 197

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net