140 likes | 289 Views
EGL Database Connections. Howard Chen - April 6, 2010. www.asiEGL.com. 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
E N D
EGL Database Connections Howard Chen - April 6, 2010 www.asiEGL.com
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
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
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
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
Create Database Connections – AS400 2 of 2 • Click Next • unCheck “Disable Filter” • Check “Expression” or “Selection” to select libraries • Click Finish
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
Create Database Connections – SQL Server 2008 • Follow the same steps as described before • You can use 2005 Driver for SQL Server 2008 Database
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
Context.xml for Tomcat • Put Context.xml file in <project>/WebContent/META-INF folder
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
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
Thank You howard.chen@asiegl.com