Integrating NonStop JDBC Type 4 Driver With JBoss Applications

The J2EE Tutorial—Duke Bank’s Application
As mentioned earlier, we will make use of the example applications provided by Sun in the J2EE
tutorial, and, in particular, the “Duke’s Bank” Application. You can find the tutorial online at
http://java.sun.com/j2ee/tutorial/1_3-fcs/index.html.
Duke’s Bank is an online banking application. It has two clients: an application client, used by
administrators to manage customers and accounts, and a Web client, used by customers to access
account histories and perform transactions. The clients access the customer, account, and transaction
information maintained in a database through Enterprise JavaBeans (EJB). The Duke’s Bank
Application demonstrates the way that many of the component technologies—EJBs, application
clients, and Web components—are applied to provide a simple but functional application.
What’s different
J2EE technologies are designed so that the client code is independent of the server in which the
application is deployed. The deployment descriptors for EJB and Web applications (ejb-jar.xml and
web.xml, respectively) are also standard and do not change between different J2EE containers.
However, there are a few things that need to be done in order to move the application to the JBoss
Application Server. In particular, we have to supply JBoss specific descriptors and ensure that the
database scripts will work. The NonStopFiles_JBoss.zip contains the necessary files to make this
configuration change. The files contained in the archive are
dukesDB.sh—contains the script file to create and populate the necessary database on NonStop
SQL/MX Software.
sqlmx-ds.xml—contains the configuration to create the default data source needed by the Duke’s
Bank sample to communicate with the NonStop SQL/MX Database.
Extract the Type 4 files
Install the NonStop JDBC Type 4 Driver using the installation instructions provided in the product’s
README.txt file. The installation directory will hereafter be referred to as TYPE4_HOME.
Extract Duke’s Bank files
Unpack the downloaded archive file containing the Duke’s Bank files. This will create a directory
named j2eetutorial containing all the necessary source and configuration files.
Setting up the JBoss environment
Preparing the files
1. The zip archive named jbossj2ee-src.zip contains the supplementary JBoss files. Unpack the
contents into the j2eetutorial
directory (mentioned in the “Extract the Type 4 files” section),
adding to the existing tutorial files.
2. The entire sample code is in the bank subdirectory. If you’ve unpacked the files correctly, you
should find a jboss-build.xml file in this directory. This is the Ant build script for the JBoss
Application Server version of the application.
3. Edit the bank/jboss-build.xml to make the following changes:
Comment out the following XML text:
<!
3