Integrating NonStop JDBC Type 4 Driver With JBoss Applications
Place the sqlmx-ds.xml file in the JBOSS_HOME/server/default/deploy directory.
Also, from the same directory (JBOSS_HOME/server/default/deploy), remove the existing hsqldb-
ds.xml file. This will prevent the duplicate definition of the Java Naming and Directory Interface (JNDI)
named “DefaultDS” during the server startup process.
Copying the t4sqlmx.jar file
The sqlmx-ds.xml file from the “Configuring JDBC Type 4 data source files for the JBoss Application
Server” section defines the SQLMXDriver as the driver class to be used for the DefaultDS datasource.
This driver class is part of the t4sqlmx.jar file and must be made available to the JBoss environment at
runtime.
To do this, copy the TYPE4_HOME/lib/t4sqlmx.jar file to the JBOSS_HOME/server/default/lib
directory.
Starting the JBoss Application Server
Start the default JBoss Application Server by executing the startup script—run.bat—located at
JBOSS_HOME/bin.
Note: There may be some JMS related errors that you can safely ignore because the Duke’s Bank
sample does not use any JMS code.
Deploying and running the sample
Deployment using the JBoss Application Server is easy: You just have to copy the EAR file to the
deploy directory. There’s also a target in the build file for this purpose, so you can type
ant -f jboss-build.xml deploy
This will assemble the EAR file and deploy it. You should see something close to the following output
from the server (shortened here somewhat for brevity):
19:30:32,966 INFO [MainDeployer] Starting deployment of package:
file:/F:/servers/jboss-3.2.3/server/default/deploy/JBossDukesBank.ear
19:30:32,997 INFO [EARDeployer] Init J2EE application: file:/F:/servers/jboss-
3.2.3/server/default/deploy/JBossDukesBank.ear
19:30:34,513 INFO [EjbModule] Deploying AccountEJB
...
19:30:45,356 INFO [Engine] StandardManager[/bank]: Seeding random number
generator class java.security.SecureRandom
19:30:45,356 INFO [Engine] StandardManager[/bank]: Seeding of random number
generator has been completed
19:30:45,356 INFO [Engine] StandardWrapper[/bank:default]: Loading container
servlet default
19:30:45,356 INFO [Engine] StandardWrapper[/bank:invoker]: Loading container
servlet invoker
19:30:45,685 INFO [EARDeployer] Started J2EE application: file:/F:/servers/jboss-
3.2.3/server/default/deploy/JBossDukesBank.ear
19:30:45,685 INFO [MainDeployer] Deployed package: file:/F:/servers/jboss-
3.2.3/server/default/deploy/JBossDukesBank.ear
If there are any errors or exceptions, make a note of the error message and the point at which it
occurred (for example, during the deployment of a particular EJB, the Web application, and so on).
7