20
Using JBoss and Ingres March 2009 David Turner

Using JBoss and Ingres - Actiandownloads.actian.com/online/media/pdf/Application... · Setting up Ingres JDBC Driver for tracing Ingres JDBC Driver looks for a configuration file

  • Upload
    others

  • View
    17

  • Download
    0

Embed Size (px)

Citation preview

Using JBoss and Ingres

March 2009David Turner

Slide 2 of 20

Overview

Introduction What is JBoss? Configuring an Ingres JDBC resource in JBoss JDBC Troubleshooting A glance at the JBoss – Ingres Bundle

Slide 3 of 20Confidential — © 2008 Ingres Corporation Slide 3

Introduction

Slide 4 of 20

Presenters

David Turner– Technical Specialist

Slide 6 of 20

JBoss– Division of Red Hat– Open Source Middleware Software– Enterprise-class– Professional open source model

Ingres– Open Source RDBMS– Enterprise-class– Professional open source model

An enterprise-class open source technology stack

About JBoss and Ingres

Slide 7 of 20

Benefits of JBoss and Ingres

Lower total cost of ownership Reliable and safe technology Support, accountability and trust Backed by professional and expert support staff Large active community of developers Stable companies

Slide 8 of 20Confidential — © 2008 Ingres Corporation Slide 8

Configuring an Ingres JDBC resource in JBoss

Slide 9 of 20

Software Used in this Webinar

Java Standard Edition Development Kit “1.6.0_12” Ingres DBMS version 9.2

– Ingres JDBC Driver • Shipped with Ingres DBMS• Version 3.4 supports JDBC 3.0 API• Also available to download

– http://community.ingres.com/wiki/Ingres_JDBC_Driver_Downloads

JBoss Application Server 5.0.0 GA– http://www.jboss.org/jbossas/downloads/

Eclipse Ganymede JEE IDE version 3.4.1

Slide 10 of 20

Steps Required to configure Ingres JDBC

1. Obtain the Ingres JDBC Driver 2. Copy driver to JBoss AS3. Configure a JDBC datasource4. Test the Ingres JDBC resource

Slide 11 of 20

Step 1: Obtain the Ingres JDBC Driver

Locate the Ingres JDBC Driver– Typically located in %II_SYSTEM%\ingres\lib

directory – The JDBC driver is a JAR file called iijdbc.jar– Latest driver class is com.ingres.jdbc.IngresDriver

Slide 12 of 20

Step 2: Copy driver to JBoss AS

Copy to <JBoss_Home>/common/lib directory– Allows Application Server to use Ingres database– Parent folder to all server lib folders– If want to add jar for specific server profile then

• <JBoss_Home>/server/<serverName>lib (optional) Copy to <JBoss_Home>/client

– If developing a Java program or applet– JBoss Runtime libraries available to Dynamic Web

Project in Eclipse

Slide 13 of 20

Step 3: Configure a JDBC datasource

Create a datasource configuration deployment file– Naming convention is *-ds.xml

• Example, ingres-ds.xml– Located under server profile

• Example, <JBoss_Home>/server/default/deploy– DTD file is available at:

• docs/dtd/jbossds_1_5.dtd JBoss AS connects to relational database via a

datasource

Slide 14 of 20

Step 4: Test the Ingres JDBC resource

Create a simple web application– Obtain the named data source from the naming

context• Example, “IngresDS” if global• Example, “java:IngresDS” if only accessible from within

the JBoss server virtual machine

Slide 15 of 20Confidential — © 2008 Ingres Corporation Slide 15

JDBC Troubleshooting

Slide 16 of 20

Setting up Ingres JDBC Driver for tracing

Ingres JDBC Driver looks for a configuration file at class load time– Place iijdbc.properties file on CLASSPATH – Set ingres.jdbc.property_file system property

Be aware of the class loading model for JBoss– If putting on classpath place in server class loader or

higher• E.g common/lib or system class loaders

Slide 17 of 20

Properties of the configuration file

ingres.jdbc.trace.log=c:/tmp/iijdbc.log ingres.jdbc.trace.timestamp=true ingres.jdbc.trace.drv=5 ingres.jdbc.trace.ds=3 ingres.jdbc.trace.msg=3

Refer to:– http://community.ingres.com/wiki/Ingres_JDBC_Config_Utility_Documentation

Slide 18 of 20

Ensure JDBC driver compatibility

Find out which version of the JDBC Driver– If logging enabled JDBC driver writes out JDBC driver

version on class load– Otherwise, look at the IngresDriver class static

initializer If in doubt use the driver supplied with Ingres DBMS

Slide 19 of 20Confidential — © 2008 Ingres Corporation Slide 19

The Ingres-JBoss bundle

Slide 20 of 20

The Ingres-JBoss bundle

Complete Enterprise Open Source Stack JBoss and Ingres fully integrated and configured Tooling

– JBoss Developer Studio– Ingres Data Tools Platform

Available to download shortly