6 Deploying a Connect Web Cluster |
In order to deploy Connect Web in WebSphere, you must configure a JDBC Provider and a data source. Once these have been configured, Connect Web can be deployed. In the remainder of this section, we will explain how to accomplish these tasks in the WebSphere Administrative Console
After logging into the WebSphere Administrative Console, click on the Environment item in the left naviation menu. With the Environment item expanded, select "WebSphere variables" from the menu. Find the value of WAS_INSTALL ROOT (e.g. C:\IBM\WebSphere\AppServer). If you examine this directory, there will be a subdirectory named lib. Copy the jar files for the JDBC Driver to this lib subdirectory.
For Oracle, there will be a variable named ORACLE_JDBC_DRIVER_PATH. For Microsoft SQL Server, the correct variable will be MICROSOFT_JDBC_DRIVER_PATH. Set the value of this variable to "${WAS_INSTALL_ROOT}\lib". Save your changes to the master configuration.
Click the Security item in the Administrative Console. When it expands, click "Global security." Then expand the "Java Authentication and Authorization Service" item (in the Authentication box) and click "J2C authentication data." You will see a list of authentication identities. Click New to define a new identity that will be used by the Connect UI. As shown in the screen shot below, supply an alias for the identify, and the user name and password for the database. Then click OK or Apply, and save your changes to the master configuration.
Next, expand the Resources item, and then expand the JDBC item under Resources. Click
on "JDBC providers" to see a list of JDBC providers. In the Scope section, select
the Node level from the drop-down list. Then click New to create a new JDBC
provider. As shown in the screen shot below, specify the Database type, Provider
type, Implementation type, and Name. Click Next until you reach step 3, and review
the configuration. Finally, save your changes to the master configuration.
Now we can create the JNDI Data Source. In the Resources item, JDBC subitem, click
"Data sources." In the Scope section, select the Node level from the drop-down list.
Then click New to create a data source. As shown below, provide the data source name
and the JNDI name. The JNDI name must be "jdbc/BRICK_STREET_SOFTWARE_CONNECT_DS".
Click Next to continue.
In this screen, select the radio button for "Select an existing JDBC provider" and
select the JDBC provider configured previously.
In the next screen, enter the URL of the database; for example, jdbc:oracle:thin:@localhost:1521:ORCL for an Oracle database. Also, deselect the checkbox with the “Use this data source in container managed persistence (CMP)” label and click Next.
In the next screen, "Setup security aliases," in the “Component-managed
authentication alias” and “Container-managed authentication alias” drop-down lists,
choose the J2C identity name previously defined.
Finally, click Next to review the data source settings. Then click Finish and save to
the master configuration. In the data source list screen, test the connection to
make sure it was configured properly.
To deploy Connect Web, expand the Applications navigation item and click "New Application." The click "New Enterprise Application." In the next screen, you tell WebSphere where to find the connectweb.war file. Click the Browse button and select the location of the connectweb.war file, then click Next. In the next screen, select the Fast Path and click Next.
In the next screen:
In Step 1: Select installation options, keep the default values and click Next.
In Step 2: Map modules to servers, select the checkbox for the war module and click next.
In Step 3: Map virtual hosts for web modules, select the checkbox for the war module and click next.
In Step 4: Map context roots for Web modules, set the context root to "/connectweb" (or whatever URI you want) then click Next.
In Step 5: Summary, review the deployment settings and click Finish. If WebSphere is able to deploy the application successfully, save changes to the master configuration.
Once all changes have been made, restart the application server and ensure that the connectweb war is started. Then go to http://server:9080/connectweb/surveySuccess.jsp.