Book Image

JDBC 4.0 and Oracle JDeveloper for J2EE Development

Book Image

JDBC 4.0 and Oracle JDeveloper for J2EE Development

Overview of this book

Table of Contents (20 chapters)
JDBC 4.0 and Oracle JDeveloper for J2EE Development
Credits
About the Author
About the Reviewer
Preface

Configuring JBoss Server with DB2 Database


IBM's DB2 Universal Database is a full-featured, robust, scalable, and easy-to-use database server, which may be used on Linux, UNIX, and Windows platforms. Begin by adding its driver to the runtime classpath of the JBoss application server. IBM Data Server Driver for JDBC and SQLJ Version 4.0 supports JDBC 4.0 and may be downloaded from https://www14.software.ibm.com/webapp/iwm/web/reg/download.do?source=swg-informixfpd&S_PKG=dl&lang=en_US&cp=UTF-8#. For JDBC 4.0 functionality add the db2jcc4.jar to the JBoss's installation /server/default/lib directory. To use the JDBC 4.0 features set the JAVA_HOME environment variable to JDK 6.0. Copy /docs/examples/jca/db2-ds.xml to the /server/default/deploy directory to configure the JBoss server with the DB2 data source.

Next, modify the db2-ds.xml configuration file by setting<driver-class/> to com.ibm.db2.jcc.DB2Driver and<connection-url/> to jdbc:db2://localhost:50000/database...