Integrating NonStop JDBC Type 4 Driver With JBoss Applications

<fileset dir="${jboss.home}/server/all/deploy/jboss-
net.sar">
<include name="*.jar"/>
</fileset>
-->
Add the following XML text immediately after the above text:
<fileset dir="${jboss.home}/server/all/lib">
<include name="*.jar"/>
</fileset>
4. Download the struts distribution and copy the
struts.jar, struts-logic.tld, and the supporting
jakarta-commons jars (all those prefixed with “commons-“) to bank/jar.
5. In the j2eetutorial
directory you will find the “build.properties” file. Edit this to set the
jboss.home property to the full path to your JBoss installation. The build process makes use of
the jar files and utilities that come with the JBoss Application Server, so it needs to know where
to find them. For example, if you have unpacked JBoss Application Server to the C: drive on a
Microsoft
®
Windows
®
system–based machine, you would set it to the following:
# Set the path to the JBoss directory containing
# the JBoss application server
# (This is the one containing directories like "bin",
# "client" etc.)
jboss.home=C:/jboss-4.0.0RC1
Compiling the Java source
At the command line, change to the j2eetutorial/bank directory. All the build commands will be run
from here. Compilation should be fairly straightforward—just type the following command:
ant -f jboss-build.xml compile
This runs the “compile” target in the build script. If there aren’t any errors, you should find a newly
created build directory with the class files in it.
Packaging the EJB
The application has three separate EJB jars: account-ejb.jar, customer-ejb.jar, and tx-ejb.jar. Each jar
file contains the code and description (ejb-jar.xml and jboss.xml) for the corresponding entity bean
and an associated “controller” session bean, which the clients interact with (it is considered “bad”
programming to have clients communicate directly to entity beans). Execute the following command:
ant -f jboss-build.xml package-ejb
This should create the controller session bean (in the jar
directory).
Packaging the Web Archive (WAR) file
Next is the Web application, which provides the front end to allow users to interact with the business
components (the EJB). The Web source (JavaServer Pages, or JSP; images; and so on) is contained in
the src/web directory and is added unchanged to the archive.
The Ant WAR task also adds a WEB-INF directory, which contains the files that are not meant to be
directly accessed by a Web browser but are still part of the Web application. These include the
deployment descriptors (web.xml and jboss-web.xml), class files (for example, servlets and EJB
4