Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 1 Preparing Databases and Web Containers for Deployment : Preparing a Web Container for Deployment

Preparing a Web Container for Deployment
To connect to the database, TIBCO ActiveMatrix Runtime UDDI Server will use the JNDI resource that has been set up in one of the following web containers.
Apache Tomcat
To run TIBCO ActiveMatrix Runtime UDDI Server on the Apache Tomcat server, complete the following preparatory steps:
Install a Supported Web Container
For this release, Apache Tomcat 5.5 and 6.0 are supported.
Configure the JDBC Driver
You need to add the JDBC driver of the database you worked with to the classpath of the Apache Tomcat server.
Define a JNDI Resource
You need to define a JNDI resource in the Apache Tomcat server that points to the database you worked with.
After performing the srvconfig command to configure the uddi.war file, the context.xml file for the supported database will be created in the following directory:
TIBCO_HOME/RuntimeUDDIServer/3.1/war/dist/Tomcat/DATABASE_TYPE
This context.xml file contains the sample JNDI resource for the specified database.
You need to modify the properties in the context.xml file according to your database server settings, and then overwrite the file into the following Tomcat configuration directory:
TOMCAT_HOME/conf
If your web contain has been used for other applications and has some specific configurations written in the context.xml file, you cannot directly overwrite the context.xml file using the file located in the following directory: TIBCO_HOME/RuntimeUDDIServer/3.1/war/dist/Tomcat/DATABASE_TYPE.
Work with Oracle 11g RAC
To run TIBCO ActiveMatrix Runtime UDDI Server on the Apache Tomcat server 6.0 with Oracle 11g RAC using a thin driver (You do not need an Oracle client), complete the following steps:
1.
Copy Oracle JDBC driver ojdbc5.jar or ojdbc6.jar to the TOMCAT_HOME/lib directory.
2.
Modify the resource element in the TOMCAT_HOME/conf/context.xml file:
<Resource name="jdbc/UddiDatabase" auth="Container"
type="javax.sql.DataSource" maxActive="100"
maxIdle="30" maxWait="10000" username="username" password="password"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=ON)(FAILOVER=ON)
(ADDRESS=(PROTOCOL=TCP)(HOST=rac1Host)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=rac2Host)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=serviceName)
(failover_mode=(type=select)(method=basic)(retries=20)(delay=20))))"/>
To run TIBCO ActiveMatrix Runtime UDDI Server on the Apache Tomcat server 6.0 with Oracle 11g RAC using a thick driver (You need an Oracle client), complete the following steps:
1.
Install an Oracle 10g or 11g client, select the Enterprise mode, and make sure the Oracle BIN folder has been set in the system variable (path for Windows platform, and PATH for UNIX platform).
2.
Copy ojdbc6.jar for JRE 1.6.0 to TOMCAT_HOME/lib.
3.
Modify the resource element in the TOMCAT_HOME/conf/context.xml file:
<Resource name="jdbc/UddiDatabase" auth="Container"
type="javax.sql.DataSource" maxActive="100"
maxIdle="30" maxWait="10000" username="username" password="password"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:oci:@(DESCRIPTION=(LOAD_BALANCE=ON)(FAILOVER=ON)
(ADDRESS=(PROTOCOL=TCP)(HOST=rac1Host)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=rac2Host)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=serviceName)
(failover_mode=(type=select)(method=basic)(retries=20)(delay=20))))"/>
JBoss
To run TIBCO ActiveMatrix Runtime UDDI Server on the JBoss web container, complete the following preparatory steps:
Install a Supported Web Container
For this release, JBoss 5.0.0 is supported.
Configure the JDBC Driver
Add the JDBC driver of the database you worked with to the classpath of the JBoss web container: JBOSS_HOME/server/default/lib
Define a JNDI Resource
Define a JNDI resource in the JBoss web container that points to the database you worked with.
Complete the following steps:
1.
Copy the tamrus-DATABASE_TYPE-ds.xml file in the TIBCO_HOME/RuntimeUDDIServer/3.1/war/dist/JBoss/DATABASE_TYPE directory to the JBOSS_HOME/server/default/deploy directory.
After performing the srvconfig command to configure the uddi.war file, the tamrus-DATABASE_TYPE-ds.xml file for the supported database will be created in the following directory:
TIBCO_HOME/RuntimeUDDIServer/3.1/war/dist/JBoss/DATABASE_TYPE
This tamrus-DATABASE_TYPE-ds.xml file contains the sample JNDI resource for the specified database. For example, the tamrus-mssql-ds.xml file is used to configure the JNDI resource in Microsoft SQL Server.
You need to modify the properties in the tamrus-DATABASE_TYPE-ds.xml file according to your database server settings.
2.
Append the following content in the login-config.xml file that is available in the following directory:
JBOSS_HOME/server/default/conf
<application-policy name="tamrus-login">
<authentication>
<login-module
           code="com.novell.uddi3.security.InternalJAASModule"
           flag="required">
</login-module>
</authentication>
</application-policy>
When configuring the uddi.war file using the customized JAAS Login Module for authentication, change the login-module class shown above to the Customized JAAS Login Module implementation class name.
IBM WebSphere
To run TIBCO ActiveMatrix Runtime UDDI Server on the IBM WebSphere server, complete the following preparatory steps:
Install a Supported Web Container
For this release, IBM WebSphere 7.0 is supported.
Configure the JDBC Driver
You need to add the JDBC driver of the database you worked with to the classpath of the IBM WebSphere web container WEBSPHERE_HOME/server/server_config/lib/
Define a JNDI Resource
To configure the JNDI resource in the IBM WebSphere server, follow these steps:
1.
2.
Expand the Environment tree in the left pane and click WebSphere variable to open the WebSphere Variables page on the right, as shown in Figure 2.
Figure 2 Integrated Solutions Console
 
3.
Select the scope for the new variable, and then click the New button to create a variable. For example, create JDBC_DRIVERS_PATH as the new variable that points to the directory where the JDBC driver is stored.
4.
a.
Expand the Resources tree in the left pane and click JDBC > JDBC providers. The JDBC providers page appears on the right.
b.
c.
In the Create new JDBC provider pane, select the associated database type in the Database type drop-down list. DB2, Oracle, Sybase, and SQL Server can be selected from the Database type drop-down list.
For example, if you select SQL Server as the database type, then select Microsoft SQL Server JDBC Driver as the provider type and Connection pool data source as the implementation type. Click the Next button. In the next page, enter ${JDBC_DRIVERS_PATH}/sqljdbc.jar for the JDBC driver in the Class path field.
MySQL is not a default item listed in the Database type drop-down list. If you want to create a JDBC provider for MySQL, select User-defined in the Database type drop-down list, enter com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource in the Implementation class name field, and enter MySQL JDBC Provider as the name. Click the Next button. In the next page, enter ${JDBC_DRIVERS_PATH}/mysql-connector-java-5.1.7-bin.jar for the JDBC driver in the Class path field.
d.
Click the Next button to create other configurations and then finish the operation.
5.
a.
Expand the Resources tree in the left pane, and then click JDBC > Data sources. The Data sources page appears on the right.
b.
c.
In the Enter basic data source information pane, enter the name of the data source in the Data source name field and enter jdbc/UddiDatabase in the JNDI name field.
d.
Click the Next button. In the next page, select the JDBC provider created in step 4.
e.
Click the Next button. In the next page, enter the corresponding value in the Database name, Port number, and Server name fields.
f.
Click the Next button to create other configurations and then finish the operation.
g.
Expand the Resources tree in the left pane, and then click JDBC > Data source to open the Data sources page in the right pane. Click the newly created data source to open the configuration page.
h.
Click Custom properties in the Additional Properties area.
i.
For SQL Server, Oracle, Sybase, or DB2 provider, in the Custom properties pane, click the New button. Under the Configuration tab, enter user in the Name field and the username used to access the database in the Value field. Click the OK button to save the configuration.
In the Custom properties pane, click the New button. Under the Configuration tab, enter password in the Name field and the password used to access the database in the Value field. Click the OK button to save the configuration.
j.
For a MySQL JDBC provider, you also need to specify the URL and driverType properties in addition to the user and password properties.
In the Custom properties pane, click the New button. Under the Configuration tab, enter URL in the Name field and jdbc:mysql://localhost:3306/uddi in the Value field. Click the OK button to save the configuration.
In the Custom properties pane, click the New button. Under the Configuration tab, enter driverType in the Name field and com.mysql.jdbc.Driver in the Value field. Click the OK button to save the configuration.
k.
For a IBM DB2 JDBC provider, you also need to specify the currentSchema property in addition to the user and password properties.
In the Custom properties pane, click the New button. Under the Configuration tab, enter currentSchema in the Name field and specify the value, for example UDDI, in the Value field. Click the OK button to save the configuration.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved