4.6. JDBC Driver JARsA 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-ConsoleFigure 4-2. MBean configurationOf 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. |