No Slide Title
Download
Report
Transcript No Slide Title
EGL Database
Connections
Howard Chen - April 6, 2010
www.asiEGL.com
© 2002 Legion Systems Inc
1
asiEGL
EGL Database Connections
• Define JDBC Drivers
– DB2/400
– Oracle 10g Express
– SQLServer 2008
• Create Database Connections
– DB2/400 Library
– Oracle HR Database
– SQLServer Northwind Database
•
•
•
•
Define Build Descriptor db Options
Define context.xml for Tomcat 5 and up
Additional runtime jar files
Getting data from multiple databases
© 2010 Anchor Systems, Inc.
2
asiEGL
Define JDBC Drivers 1 of 2
JDBC Drivers:
– DB2/400: jt400.jar
• AS/400 toolbox for java
default
– Oracle: ojdbc14.jar
• <version> Oracle thin
driver default
– SQLServer: sqljdbc4.jar
• <version> SQL server
JDBC driver default
• Window Preferences
Data Management
Connectivity
Driver Definitions
• Highlight Driver name
• Click Edit
© 2010 Anchor Systems, Inc.
3
asiEGL
Define JDBC Drivers 2 of 2
• If EGL displays an error
message that says
“Unable to locate JAR”
• Click “Jar List”
• Click to highlight the jar
file
• Click “Edit JAR/Zip
• Browse to the location of
the jar file you
downloaded and saved
• Click Open. The “Unable
to locate JAR” message
is resolved
© 2010 Anchor Systems, Inc.
4
Create Database Connections – AS400 1 of 2
• Window
Preferences EGL
SQL Database
Connections
• Click New
• Select “DB2 for
i5/OS”
• Accept the default
driver name
• Enter the host
name, it can be an
IP address or a DNS
name
• Enter User Name
and Password
• Check “Save
Password”
• Click Test
Connection
© 2010 Anchor Systems, Inc.
5
asiEGL
Create Database Connections – AS400 2 of 2
• Click Next
• unCheck
“Disable
Filter”
• Check
“Expression”
or “Selection”
to select
libraries
• Click Finish
© 2010 Anchor Systems, Inc.
6
asiEGL
Create Database Connections – Oracle 10g Express
• Follow the
same steps
as described
before
• Optionally,
you can click
the triangle
icon to the
right of the
JDBC driver
name to
update JDBC
driver jar file
© 2010 Anchor Systems, Inc.
7
asiEGL
Create Database Connections – SQL Server 2008
• Follow the
same steps
as described
before
• You can use
2005 Driver
for SQL
Server 2008
Database
© 2010 Anchor Systems, Inc.
8
asiEGL
Define Build Descriptor DB Options 1 of 2
• Open
<project>.eglbld
file
• From “Load DB
options using
Connections
drop down box
• Select the db
connection
• Enter the JNDI
name
• Press Ctrl-S to
save
© 2010 Anchor Systems, Inc.
9
asiEGL
Define Build Descriptor DB Options 2 of 2
© 2010 Anchor Systems, Inc.
10
asiEGL
asiEGL
Context.xml for Tomcat
• Put Context.xml file in
<project>/WebContent/META-INF
folder
© 2010 Anchor Systems, Inc.
11
asiEGL
JAR Files for TOMCAT Runtime
• DB2/400
– jt400.jar
– db2jcc.jar
– db2jcc_license_cisuz.jar
– db2jcc_license_cu.jar
• Oracle
– ojdbc14.jar
– activation.jar
– mail.jar
• SQL Server 2008
– sqljdbc4.jar
C:\Program Files\IBM\SDPShared\plugins\com.ibm.datatools.db2_2.0.101.v200811061754\driver
© 2010 Anchor Systems, Inc.
12
Getting Data From Multiple Databases
• Create a project for
each db connection
• Use Data Access
Wizard to retrieve
database definitions
• Create Web Services
for data access
• Copy wsdl files to
the Application
Project
• Use “EGL Service”
“Create EGL Client
Interface” to create
Web Service
interfaces
• Consume web
services for both JSF
and RUI
© 2010 Anchor Systems, Inc.
13
asiEGL
Thank You
[email protected]