Tuesday, October 7, 2008

Deploying WSO2 ESB on an IBM WebSphere Application Server

Applies To
1. WSO2 Enterprise Service Bus (ESB) Version 1.7
2. WebSphere Application Server Version 6.1

Downloading and Installing WebSphere Application Server


Download the WebSphere Application Server Version 6.1 and execute the setup to install it on your local machine.

Creating a profile


Before deploying the WSO2 ESB application we need to create a profile through the Profile Management Tool. This is described in detail in the tutorial Running WSO2 WSAS on an IBM WebSphere Application Server under the heading Creating an IBM WebSphere Application Server Profile by Upul Godage.

NOTE: Make sure you set the HTTPS transport port to 9444.

Starting the Websphere Application server


Once you have created the profile start the application server through Start -> All Programs -> IBM WebSphere -> Application Server V6.1 -> Profiles -> [your_profile] -> Start the server.

Login into the Administrative Console


When the server is started successfully access the Administrative Console through Start -> All Programs -> IBM WebSphere -> Application Server V6.1 -> Profiles -> [your_profile] -> Administrative Console.
Once clicked it would open up a web browser. Enter the username and password that we gave in the Administrative Security step when creating the profile and then click on the button Log in.


E.g.:-
User ID: admin
Password: admin



Downloading WSO2 ESB and creating a war file


Download WSO2 ESB version 1.7 from the WSO2 site and extract it to a preferred location of yours. (E.g.:- C:\wso2esb-1.7.1). From this point onwards I will be referring to this folder as ESB_HOME. Before creating the war file you need to change some of the configuration files. Let us look at these files one by one.

1. axis2.xml
a) Open the axis2.xml located at ESB_HOME/webapp/WEB-INF/classes/conf
b) Search all the places where it specifies the jks file locations and replace them with the absolute paths.


E.g.:-
Change
<Location>webapp/WEB-INF/classes/conf/identity.jks</Location>

to

<Location>C:/wso2esb-1.7.1/webapp/WEB-INF/classes/conf/identity.jks</Location>




2. web.xml
a) Open the web.xml file located at ESB_HOME/webapp/WEB-INF
b) Specify the absolute location of the ESB_HOME

E.g.:-
Replace
<init-param>
<param-name>esb.home</param-name>
<param-value>.</param-value>
</init-param>

with

<init-param>
<param-name>esb.home</param-name>
<param-value>C:/wso2esb-1.7.1</param-value>
</init-param>




Next we have to start up a Derby server for WSO2 ESB to connect to. Since we have an issue in getting the Derby server which resides in Websphere up and running, we will be starting an external Derby server.
To do this, download the latest Derby binary and extract to a preferred location of yours. For testing purposes we will be using version 10.3.1.4. Then go to the folder DERBY_HOME/bin folder and type the following command.

NetworkServerControl start -p 1528


To direct the WSO2 ESB to connect to the external Derby server you need to set the StartEmbeddedDerby property to 'false' of the ESB_HOME/webapp/WEB-INF/classes/conf/server.xml file
<StartEmbeddedDerby>false</StartEmbeddedDerby>

You are all set to create the war file. Now go to the folder 'webapp' of your ESB_HOME and open a command window.

Type the following command and it will create esb.war file in ESB_HOME/webapp folder
jar -cvf esb.war *

Installing the WSO2 ESB appliacation on IBM Websphere


Follow the step described below to successfully install the WSO2 ESB application.

1. Once logged in to the Administrative Console, click on Applications -> Install New Application

2. Under Preparing for the application installation browse for the esb.war file that you created above. Specify the context root as esb. If you need to see the steps when installing the WSO2 ESB Application, select the combo box option Show me all installation options and parameters and click Next.

3. From the page loaded to generate default bindings and mappings click on Next without changing any options

4. Click on Continue given under Application Security Warnings page

5. When Install New Application -> Select installation options is loaded specify a name that you prefer as the Application name. Tick the check box Enable class reloading and specify the Reload interval in seconds as 60 seconds and then click on Next

6. Under Install New Application -> Map modules to servers do not select any options and just click on the button Next

7. When the page Install New Application -> Provide JSP reloading options for Web modules loads click on the button Next without selecting anything

8. Next do not select any options given under the page Install New Application -> Map shared libraries and simply click on Next

9. When the page Install New Application -> Initialize parameters for servlets is loaded check whether the specified parameters are correct and click on Next

10. Click on Next without selecting any options when Install New Application -> Map virtual hosts for Web modules page is loaded

11. Verify whether the value given as the context root is correct in the page Install New Application -> Map context roots for Web modules and click on Next

12. When the Install New Application -> Summary page loads, go through the values which you have specified and if they are correct click on Finish

Once you click on Continue you will get a message as follows. Therefore click on Save and the application will be installed successfully.

Configuring the WSO2 ESB Application


Go to Applications -> Enterprise Applications and click on the esb entry from the list of applications available.
Then refer the section Configuring IBM WebSphere Application Server in the tutorial Running WSO2 WSAS on an IBM WebSphere Application Server by Upul Godage.

Follow the steps specified and once you are done with setting all the properties select the esb application from the Enterprise Applications list and click on Start. This will start the WSO2 ESB server. If the server starts successfully you can try accessing the WSO2 ESB Administration Console through https://localhost:9444/esb

1 comment:

Frederic said...

Hi,
Ave you a little procedure to deploy WSO2 Governance Registry on WebSphere ?

In advance, Thank you.

Sincerely yours,
Frederic