By default, the IEP database is configured to use Java DB. Java DB is Sun's supported distribution of the open source Apache Derby database.
After installation, you can configure the IEP database to use Oracle instead.
The first task is to create an IEP user in the Oracle database. You run a provided SQL script that creates the IEP user and grants the appropriate privileges. The default version of the script contains the following SQL statements:
CREATE TABLESPACE "IEPSEDB_DB" DATAFILE 'IEPSEDB_DB1.dat' SIZE 2000M, 'IEPSEDB_DB2.dat' SIZE 2000M; CREATE USER IEPSEDB IDENTIFIED BY IEPSEDB DEFAULT TABLESPACE IEPSEDB_DB QUOTA UNLIMITED ON IEPSEDB_DB TEMPORARY TABLESPACE temp QUOTA 0M ON system; GRANT CONNECT TO IEPSEDB; GRANT RESOURCE TO IEPSEDB; GRANT CREATE VIEW TO IEPSEDB; grant select on sys.dba_pending_transactions to IEPSEDB; grant select on sys.pending_trans$ to IEPSEDB; grant select on sys.dba_2pc_pending to IEPSEDB; grant execute on sys.dbms_system to IEPSEDB; grant select on SYS.dba_2pc_neighbors to IEPSEDB; grant force any transaction to IEPSEDB; |
You then perform various tasks in the application server. For example, you create two sets of connection pools and JDBC resources. A connection pool is a group of reusable connections for a particular database. The server maintains a pool of available connections to increase performance. A JDBC resource provides applications with a means of connecting to a database.
You also enable automatic recovery of XA transactions. IEP uses automatic recovery of XA transactions to achieve message reliability.
Finally, you modify properties of the IEP Service Engine.
Go to http://wiki.open-esb.java.net/Wiki.jsp?page=HowToRunIEPOnOracle and download the create_iepse_user.sql script.
Open the create_iepse_user.sql script and review the instructions.
The names of the tablespace, data files, user, and password include the string IEPSEDB. If you want to change this string to a different string, then replace all occurrences of IEPSEDB with the new string.
Connect to the Oracle database as a user with the SYSDBA privilege.
Run the create_iepse_user.sql script.
Go to the computer where the application server is installed.
Place the Oracle database driver (for example, ojdbc14.jar) in the install-dir/appserver/lib directory.
Restart the application server.
Log in to the Sun Java System Application Server Admin Console.
Expand the Resources node and the JDBC node, and select the Connection Pools node.
Click New.
The New JDBC Connection Pool wizard appears.
In step 1 of the wizard, do the following:
In step 2 of the wizard, do the following:
Scroll down to the Additional Properties table.
In the User row, enter the user name of the IEP user (for example, IEPSEDB).
In the Password row, enter the password of the IEP user (for example, IEPSEDB).
In the URL row, enter the string for connecting to the database (for example, jdbc:oracle:thin:@myserver:1521:orcl).
Click Finish.
The connection pool is created.
Click the connection pool that you just created.
The Edit Connection Pool page appears.
Click Ping.
The Admin Console attempts to connect to the database.
If the connection does not succeed, check to see whether the database is running. Another possible cause is that the URL string is incorrect.
Expand the Resources node and the JDBC node, and select the JDBC Resources node.
Click New.
The New JDBC Resource page appears.
In the JNDI Name field, specify a unique name for the non-XA JDBC resource. By convention, the name begins with the jdbc/ string. For example:
jdbc/iepseOracleNonXA
You use the JNDI name in a later procedure.
In the Pool Name drop-down menu, select the non-XA connection pool that you created.
Click OK.
The JDBC resource is created.
Expand the Resources node and the JDBC node, and select the Connection Pools node.
Click New.
The New JDBC Connection Pool wizard appears.
In step 1 of the wizard, do the following:
In step 2 of the wizard, do the following:
Scroll down to the Connection Validation section.
Select the Enabled check box that appears to the right of the Allow Non Component Callers label.
Scroll down to the Additional Properties table.
In the User row, enter the user name of the IEP user (for example, IEPSEDB).
In the Password row, enter the password of the IEP user (for example, IEPSEDB).
In the URL row, enter the string for connecting to the database (for example, jdbc:oracle:thin:@myserver:1521:orcl).
Click Finish.
The connection pool is created.
Click the connection pool that you just created.
The Edit Connection Pool page appears.
Click Ping.
The Admin Console attempts to connect to the database.
If the connection does not succeed, check to see whether the database is running. Another possible cause is that the URL string is incorrect.
Expand the Resources node and the JDBC node, and select the JDBC Resources node.
Click New.
The New JDBC Resource page appears.
In the JNDI Name field, specify a unique name for the XA JDBC resource. By convention, the name begins with the jdbc/ string. For example:
jdbc/iepseOracleXA
You use the JNDI name in a later procedure.
In the Pool Name drop-down menu, select the XA connection pool that you created.
Click OK.
The JDBC resource is created.
Expand the Configuration node and select the Transaction Service node.
Select the Enabled check box that appears to the right of the On Restart label.
Click Save.
Go to the NetBeans IDE.
In the Services window, expand the Servers node, the GlassFish V2 node, the JBI node, and the Service Engines node.
Right-click the sun-iep-engine node and choose Properties.
The Properties dialog box appears.
Set the Non XA Data Source Name property to the non-XA JDBC resource that you created (for example, jdbc/iepseOracleNonXA).
Set the XA Data Source Name property to the XA JDBC resource that you created (for example, jdbc/iepseOracleXA).
Set the Database Schema Name property to the user name of the IEP user (for example, IEPSEDB).
In an Oracle database, the database schema name is identical to the user name.
Click OK.
If any Composite Application projects that contain event processes are currently deployed, then undeploy the projects.
In the Services window, expand the Servers node, the GlassFish V2 node, the JBI node, and the Service Engines node.
Right-click the sun-iep-engine node and choose Stop.
Right-click the sun-iep-engine node and choose Start.
If you undeployed any Composite Application projects, then you can now redeploy the projects.