Configure WebSphere Application Server Community Edition with Informix Dynamic Server

Do you need a stable, easy to install and use application server for developing and testing J2EE applications with a robust, highly reliable, administration-free database with outstanding performance? Then WebSphere Application Server Community Edition with IBM Informix Dynamic Server (IDS) is an optimal choice. WebSphere Application Server Community Edition is an application server built on Apache Geronimo, the open source application server project at the Apache Software Foundation and a lightweight Java 2 Platform. IDS is a strategic data server that provides high scalability with superior online transaction processing (OLTP) performance, high reliability with minimal downtime, and high administration functionality with extremely low administration cost. This article presents a three-tier architecture encompassing the features from both products.

The article has been updated for WebSphere Application Server Community Edition 2.1.1.1 and IDS 11.

Dhanashri Kudgavkar (dkudgavk@in.ibm.com), Informix-Interoperability Team, India Software Lab, IBM

Photo: Dhanashri KudgavkarDhanshri Kudgavkar works for the Interoperability team, ISL, India. She has extensive experience with IDS behaviors and features.



Prasanna Alur Mathada, Informix-Interoperability Team, India Software Lab, IBM

Prasanna Mathada photoPrasanna Mathada is a certified Informix professional. He currently works for the Interoperability team, ISL, India.



Amitava Chakraborty (amitacha@in.ibm.com), Informix-Interoperability Team, India Software Lab, IBM

Photo: Amitava ChakrabortyAmitava Chakraborty has more than eight years of experience on the different Informix products. Currently, as a lead on the Informix Interoperability team, he is responsible for ensuring Informix scalability to other products.



28 May 2009 (First published 04 October 2007)

Introduction

Built on Apache Geronimo server Version 2.1.3 and Geronimo Eclipse Plugin (GEP) 2.1.3, WebSphere Application Server Community Edition is an open source, Java EE 5 application server. Using open source applications such as Eclipse, Apache Tomcat, and an Apache Derby database, WebSphere Application Server Community Edition provides an easily accessible and flexible foundation for building Java applications. WebSphere Application Server Community Edition helps you quickly develop applications and grow them as needed. It provides basic security, easy administration, and manual application deployment. The product binaries, and even the source, is available for download and use at no cost. Optional IBM support can be purchased if needed.

IDS is an extensible object-relational database server that supports on-demand computing, WebSphere, and OLTP data management applications in the SQL, Dynamic SQL, C++, and Java languages, with high reliability and performance.

Features of WebSphere Application Server Community Edition and IDS

Some of the key features of WebSphere Application Server Community Edition are:

  • It includes some of the best open source technologies such as Apache Tomcat, Apache OpenEJB, Apache ActiveMQ , MX4J, TranQL, Apache Axis, and HOWL (ObjectWeb).
  • It includes an Eclipse plug-in that enables users to take advantage of the Eclipse technology-based Web tools platform. With this plug-in, which comes with the server adapter, users can use the features in WTP (Web Tool Platform) to create, deploy and debug applications in WebSphere Application Server Community Edition.
  • WebSphere Application Server Community Edition is pre-integrated with a robust and small footprint database server, Apache Derby. In addition to this, it provides driver support for other databases, including IDS, DB2, and Oracle.
  • Runtime customization helps selective enabling and disabling of components at runtime, which is cost effective and helps improve performance.
  • In WebSphere Application Server Community Edition 2.1 and later versions, users can take an application-centric approach wherein a user has to identify the function components required by a particular application and then assemble a custom server which includes only the components required by that application, thereby building light-weight server images.
  • While the previous admin console was static, from version 2.1 onwards, WAS CE provides a new extensible admin console. This framework allows Geronimo plug-in developers to package extensions to the admin console with their components. These extensions are known as Admin Console Extensions (ACE) and can be in the .war or .car form. The extensible admin console itself needs to be installed as a plug-in from the online plug-in catalog.
  • The most important addition to the newer (2.1.1.1) version of WAS CE is the additional TranQL XA connectors for Informix Dynamic Server and MS SQL Server 2000/2005.

Some of the key features of IDS are:

  • Security features such as:
    • Label-based access control (LBAC), which provides new ways of controlling access to the sensitive data within the database
    • Pluggable Authentication Module(PAM), which enables customization of system entry services on the challenge/response basis
    • Column Level Encryption wherein various cryptographic standards are used like DES or AES
    • Secured Socket Layer(SSL), which provides security over wire
    • Single Sign On (SSO), which helps manage data server access from a centralized authentication service using Kerberos Authentication protocol
  • Support for XA transactions as well as connection pooling
  • The MACH11 feature, which provides easy failover recovery to ensure continuous business operations
  • Ease of administration with new session configuration routines, new administration APIs, new administration scheduler, and a PHP based graphical administration tool called OpenAdmin Tool (OAT)
  • XML publishing and enhanced data type support in cross-server distributed queries

Set up IDS and WebSphere Application Server Community Edition

The prerequisites for this configuration are:

  • WebSphere Application Server Community Edition should be installed.
  • IDS should be installed.
  • One instance of IDS should be configured and running with socket connection.
  • Informix JDBC driver archive files should be available to add to the archive repository of WebSphere Application Server Community Edition.

Configure WebSphere Application Server Community Edition to use the Informix JDBC driver

To use IDS as the database server with WebSphere Application Server Community Edition, the Informix JDBC driver archives and the IBM JCC driver archive should be installed first. (See the Resources section for more information on IBM JCC Drivers.)

  1. Start the Administrative Console by navigating to Start > Programs > IBM WebSphere > Application Server Community Edition > Administrative Console. Use the predefined username system and password manager to log on to the administrative console.
  2. Add Informix JDBC driver archive files and IBM JCC driver archive files to the existing repository of archives by installing them using the Repository screen of the Administrative Console. (Later, you will select these JAR archives while creating database pools to make connections to the database.) To do this, select Repository under the section Services from the left navigation bar of the Administrative Console. In the Repository Viewer, specify the values as described in the following list and shown in Figure 1 for Informix JDBC archives and in Figure 2 for Informix JCC archives. Select Install to add each archive file.
    • File: <absolute path for ifxjdbc.jar> / <absolute path for ifxjdbcx.jar> / <absolute path for db2jcc.jar>
    • Group: Informix
    • Artifact: JDBC / JCC
    • Version: <JDBC driver version> / <JCC driver version>
    • Type: JAR
    Figure 1. Add Informix JDBC archives to the Repository
    Screen shot showing selections described above for adding ifxjdbc.jar and ifxjdbcx.jar files
    Figure 2. Add IBM JCC archives to the Repository
    Screen shot showing selections described above for adding db2jcc.jar file
  3. After successful installation of the archives, the entries for the Informix JDBC driver jar files and the JCC driver jar file appear in the list of archives along with the existing entries, as shown in Figure 3.
    Figure 3. Informix JDBC driver archives and IBM JCC driver archive, added to the archive repository
    Screen shot of Current Repository Entries list including Informix JDBC driver jar files and the JCC driver jar file

Create new database pools

Use the Administrative Console to create new database pools. These database pools can later be used in the applications to get connections to the database. To create a new pool, follow these steps:

  1. Select Database Pools from the left navigation bar of the console, to bring up the Database Pools list screen (Figure 4).
    Figure 4. Database Pools list screen
    Screen shot of Database Pools list

    (See a larger version of Figure 4.)

  2. Select Using the Geronimo database pool wizard to create new database pools. The following steps describe how to create database pools with database types of Informix XA, DB2 XA, and Other.
  3. Create a Database Pool using Informix JDBC Drivers and database type of Informix XA. As shown in Figure 5 and described in the accompanying table, for Step 1 of the Database Pool Creation Wizard, provide a name for the database pool and select Informix XA as the database type.
    Figure 5. Create Database Pool Step 1 for Informix XA database type
    Step 1 of wizard; Name of Database Pool is WASCE_IDS_JDBC_XA and Database type is Informix XA
Field descriptions
Field Description
Name of database poolThe name that applications use to refer to this database pool. Database pool names should be unique.
Database typeThe type of database.
  1. Select Next to create the database pool.
  2. From the screen for editing the connection properties of the new database pool, fill in the fields as shown in Figure 6 and described in the accompanying table.
    Figure 6. Connection properties for the database pool with database type of Informix XA
    Connection properties for the database pool you created with database type of Informix XA
Field descriptions
FieldDescription
Pool NameName of the Database pool. This value is copied from what you provided in Step 1 of the wizard. There is no need to change it.
Pool TypeThe resource adapter that is shown here depends on the Database Type that you select in Step 1 of the wizard. In this scenario, TranQL XA Resource Adapter for Informix is shown for the Database Type of Informix XA.
Driver JARA JAR repository that holds the JDBC driver class. This is added to the ClassPath of the database pool. The list here includes JARs available under the repository or directory. For Informix, two JARs added previously to the repository should be selected.
Ifx SQL Host FileThe value of the IfxSQLH_FILE variable.
User NameThe log-in name used to connect to the Informix database.
Database NameThe name of the Informix database you want to connect to.
Ifx SQL Host TypeThe value of the IfxSQLH_TYPE variable.
Ifx HostThe Host name or the IP Address of the machine on which the IDS database is residing.
Ifx Protocol TraceThe value of the IfxPROTOCOLTRACE variable.
Ifx Protocol Trace FileThe value of the IfxPROTOCOLTRACEFILE variable.
Server NameThe name of the IDS server that you are connecting to.
PasswordThe case-sensitive password used to connect to the database.
Confirm PasswordRe-type the password to confirm it.
Port NumberThe network port number that the database server is listening on.
Transaction TypeType of transactions that this connection pool supports.
  1. Leave the default values for the rest of the fields and click Deploy to deploy the JDBC connection pool.
  2. Create a Database Pool using JCC Drivers and database type of DB2 XA. As shown in Figure 7 and described in the accompanying table, for Step 1 of the Database Pool Creation Wizard, provide a name for the database pool and select DB2 XA as the database type.
    Figure 7. Create Database Pool Step 1 for DB2 XA database type
    Step 1 of wizard; Name of Database Pool is WASCE_IDS_JCC_DB2XA and Database type is DB2 XA
Field descriptions
Field Description
Name of database pool The name that applications use to refer to this database pool. Database pool names should be unique.
Database typeThe type of database.
  1. Select Next to create the database pool.
  2. From the screen for editing the connection properties of the new DB2 XA database pool, fill in the fields as shown in Figure 8 and described in the accompanying table.
    Figure 8. Connection properties for the database pool with database type of DB2 XA
    Connection properties for the database pool you created with database type of DB2 XA

    (See a larger version of Figure 8.)

Field descriptions
FieldDescription
Pool NameName of the Database pool. This value is copied from what you provided in Step 1 of the wizard. There is no need to change it.
Pool TypeThe resource adapter that is shown here depends on the Database Type that you select in Step 1 of the wizard. In this scenario, TranQL XA Resource Adapter for DB2 is shown for the Database Type of DB2 XA.
Driver JARA JAR repository that holds the JCC driver class. This is added to the ClassPath of the database pool. The list here includes JARs available under the repository or directory. For DB2, the JCC JAR added previously to the repository should be selected.
User NameThe log-in name used to connect to the DB2 database.
Database NameThe name of the DB2 database you want to connect to.
Driver TypeThe Type of driver used for making the connection with the datasource. The values for this field are either 2 or 4. The default value is 4.
Prepared Statement Cache Size Tells the driver how many prepared statements should be associated with each connection. By default, no statement caching takes place.
Trace FileThe name of the Tracefile to insert records into.
Server NameThe name or IP address of the host that the DB2 server needs to connect to.
Trace File AppendSpecifies whether to append to or overwrite the Trace File. A value of true means the Trace File is appended to; false means it is overwritten. The default is false.
PasswordThe case-sensitive password used to connect to the database.
Confirm PasswordRe-type the password to confirm it.
Port NumberThe network port number that the database server is listening on.
Transaction TypeType of transactions that this connection pool supports.
  1. Leave the default values for the rest of the fields and click Deploy to deploy the JCC connection pool.
  2. Create a Database Pool using JCC Drivers and database type of Other. As shown in Figure 9 and described in the accompanying table, for Step 1 of the Database Pool Creation Wizard, provide a name for the database pool and select Other as the database type.
    Figure 9. Create Database Pool Step 1 for Other database type
    Step 1 of wizard; Name of Database Pool is WASCE_IDS_JCC_OTHER and Database type is Other
Field descriptions
Field Description
Name of database poolThe name that applications use to refer to this database pool. Database pool names should be unique.
Database typeThe type of database.
  1. Select Next to create the database pool.
  2. For Step 2 of the Database Pool Creation Wizard, provide the driver and JAR configuration parameters as shown in Figure 10 and described in the accompanying table.
    Figure 10. Create Database Pool Step 2 for Other database type
    Driver and JAR properties for the database pool you created with database type of Other
Field descriptions
FieldDescription
JDBC Driver ClassThe value of the JDBC CLASS. For Informix, the value should be com.ibm.db2.jcc.DB2Driver.
Driver JARA JAR repository that holds the JCC driver class. This is added to the ClassPath of the database pool. The list here includes JARs available under the repository or directory. For Informix, the JCC JAR added previously to the repository should be selected.
DB UsernameThe log-in name used to connect to the Informix database.
DB PasswordThe case-sensitive password used to connect to the database.
Confirm PasswordRe-type the password to confirm it.
  1. Select Next to save the connection properties.
  2. For Step 3 of the Database Pool Creation Wizard, provide the final pool configuration parameters as shown in Figure 11 and described in the accompanying table.
    Figure 11. Create Database Pool Step 3 for Other database type
    Final pool configuration properties for the database pool you created with database type of Other
Field descriptions
FieldDescription
JDBC Connect URLThe system generated JDBC connect URL. Ensure the URL fits the syntax for your JDBC driver.
Driver StatusIndicates whether the Driver was successfully loaded or not.
Transaction TypeType of the transactions that this connection pool supports.
  1. Leave the default values for the rest of the fields and proceed by clicking one of the three buttons at the bottom of the screen:
    • Test Connection - Use this button to test the connection to the database. Once the connection is successful, the next screen provides the deployment option for this database pool.
    • Skip Test and Deploy - Use this button to deploy the database pool even if the database might not be available for testing at this particular time. If the deployment is successful, the console returns to the database pool list screen where the new pool is listed in the running state.
    • Skip Test and Show Plan - Use this button to show the deployment plan that Geronimo uses for this pool. The plan is an XML file that you can use in a command to deploy the database pool manually.
  2. After you successfully deploy the database pools, they will appear on the Database Pools screen with a state of running as shown in Figure 12.
    Figure 12. List of available database pools after deployment of Informix JDBC driver archives and IBM JCC driver archive
    Database Pools Screen shows current state of each available database pool including the JDBC and JCC driver archives you just deployed

    (See a larger version of Figure 12.)

Use a deployment plan to deploy a sample application

Use of a deployment plan is not mandatory to deploy all applications. However, most applications that need resource references to be resolved and require configuration specification for various modules in the application, do require a deployment plan.

A deployment plans is contained in an XML file. The Download section of this article contains three sample deployment plans. The plans are for a sample enterprise application called DayTrader, which is a trading application available for free download from the Apache Software Foundation (see Resources.) The first plan deploys the application with a connection to the IDS instance using the JDBC artifacts. The other two plans use JCC artifacts to connect to a running IDS instance.

WAS CE 2.1.1.1 has a new TranQL XA connector (tranql-connector-informix-xa-1.0.rar) specifically developed for Informix Dynamic Server. Listing 1 is a snippet from the plan named dayTrader2.1-Informix-JDBC-XA-plan.xml. It shows usage of this new connector and also some of the configuration property settings required to be able to connect to IDS using JDBC artifacts

Listing 1. Snippet from dayTrader2.1-Informix-JDBC-XA-plan.xml
<connector>TradeDataSource</connector>
<external-path xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"> 
<dep:groupId>org.tranql</dep:groupId> 
<dep:artifactId>tranql-connector-informix-xa</dep:artifactId> 
<dep:type>rar</dep:type> 
</external-path>
			
<name>jdbc/TradeDataSource</name> 
<config-property-setting name="Password">IDS4data</config-property-setting> 
<config-property-setting name="UserName">informix</config-property-setting> 
<config-property-setting name="DatabaseName">tradedb</config-property-setting> 
<config-property-setting name="ServerName">ids1150</config-property-setting> 
<config-property-setting name="PortNumber">16001</config-property-setting> 
<config-property-setting name="IfxHost">lxvm-l15.lenexa.ibm.com</config-property-setting>

Listing 2 is a snippet from the plan named dayTrader2.1-Informix-JCC_DB2-XA-plan.xml. It shows use of JCC artifacts. If you use JCC instead of JDBC, you must specify the Database Type to be DB2 XA when creating the database pool (see Figure 7). Also, the deployment plan needs to contain information similar to what is shown in Listing 2 to establish connectivity to IDS.

Listing 2. Snippet from dayTrader2.1-Informix-JCC_DB2-XA-plan.xml
<connector>TradeDataSource</connector> 
 <external-path xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"> 
 <dep:groupId>org.tranql</dep:groupId>  
 <dep:artifactId>tranql-connector-db2-xa</dep:artifactId>  
 <dep:type>rar</dep:type>  
 </external-path> 
				
<name>jdbc/TradeDataSource</name>  
 <config-property-setting name="UserName">informix</config-property-setting>  
 <config-property-setting name="Password">inform123</config-property-setting>  
 <config-property-setting name="PortNumber">9089</config-property-setting>  
 <config-property-setting name="ServerName">9.122.208.100</config-property-setting>  
 <config-property-setting name="DatabaseName">tradedb</config-property-setting>  
 <config-property-setting name="DriverType">4</config-property-setting>

Listing 3 is a snippet from the plan named dayTrader-IDS-JCC-OTHER-XA-plan.xml. You can also use this plan in a scenario where you want to use JCC artifacts to connect to IDS. If you use this plan you must specify the Database Type to be Other when creating the database pool (see Figure 9). Unlike the other two plans, this plan also defines a connection URL as shown in the snippet.

Listing 3. Snippet from dayTrader-IDS-JCC-OTHER-XA-plan.xml
 <connector>TradeDataSource</connector> 
 <external-path xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"> 
 <dep:groupId>org.tranql</dep:groupId>  
 <dep:artifactId>tranql-connector-ra</dep:artifactId>  
 <dep:type>rar</dep:type>  
 </external-path> 
			
<name>jdbc/TradeDataSource</name>  
<config-property-setting name="Password">IDS4data</config-property-setting>  
<config-property-setting name="Driver">
com.ibm.db2.jcc.DB2Driver
</config-property-setting>  
<config-property-setting name="UserName">informix</config-property-setting>  
<config-property-setting name="ConnectionURL">j
dbc:db2://lxvm-l150.lenexa.ibm.com:16002/tradedb
</config-property-setting>

Once the deployment plan is ready, you can use either of the following two methods to deploy the application:

  • From the IDS Console Navigation, navigate to Applications > Deploy New. This takes you to the Install New Application screen shown in Figure 13.
    Figure 13. Deploying the DayTrader application with IDS
    IDS Install New Application screen filled in with ear file for DayTrader application and the JDBC-XA deployment plan
    For the Archive field, specify the .ear file for the DayTrader application. For the Plan field, specify the relevant plan file based on your choice of driver archives (JCC or JDBC). When finished, select Install. As shown in Figure 14, the Install New Applications screens shows messages to indicate when the application has been successfully deployed and started.
    Figure 14. Successful Deployment of the DayTrader application with IDS
    DS Install New Application screen with messages indicating the application was successfully deployed and installed
  • From a command prompt, set geronimo_home to <absolute path for WebSphere Application Server Community Edition installation directory> and enter the following commands from <geronimo_home>/bin to install DayTrader:
    deploy -<user> system -<password> manager deploy
    <daytrader_home>\modules\ear\target\daytrader-ear-2.1.1.0.ear
    <daytrader_home>\plans\dayTrader-Informix_JDBC_XA-plan.xml

    where <daytrader_home> is the root directory for DayTrader application.

Once you install DayTrader using the XML plan, you can access it at:

http://<hostname>:<port>/daytrader.

To begin trading, navigate to Configure > (Re)- populate Trade Database. This creates a fictional set of users, stocks, prices, and other parameters. The DayTrader application is then ready to use for simulated trading.

Conclusion

IDS is a versatile relational database server that is powered with a wealth of features. It helps every database user, from an application user to an administrator, with complex activities. WebSphere Application Server Community Edition leverages some of the best open source technologies to provide an easy and quick opportunity to deploy a Java application on a Web server. This article explained how WebSphere Application Server Community Edition can be configured to communicate with IDS through JDBC and JCC. It illustrated how a user can rapidly deploy Java application in this type of environment.


Downloads

DescriptionNameSize
IDS-specific plan file -11dayTrader2.1-Informix-JDBC-XA-plan.xml26KB
IDS-specific plan file - 22dayTrader2.1-Informix-JCC_DB2-XA-plan.xml26KB
IDS-specific plan file - 33dayTrader-IDS-JCC-OTHER-XA-plan.xml26KB

Notes

  1. This is an IDS-specific plan file to connect to IDS using JDBC XA Drivers.
  2. This is an IDS-specific plan file to connect to IDS using JCC Drivers with the DB2 XA Adapter.
  3. This is an IDS-specific plan file to connect to IDS using JCC Drivers with a Generic Adapter.

Resources

Learn

Get products and technologies

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Information management on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Information Management, WebSphere
ArticleID=259595
ArticleTitle=Configure WebSphere Application Server Community Edition with Informix Dynamic Server
publish-date=05282009