2008/10/07
7 Oct, 2008

How to Install WSO2 ESB on IBM WebSphere Application Server

  • Evanthika Amarasiri
  • Senior Technical Lead - WSO2

Applies To

  1. WSO2 Enterprise Service Bus (ESB) Version 1.7.1
  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 titled 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 successfully deployed, 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 the latest WSO2 ESB version 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.

  • axis2.xml
  1. Open the axis2.xml located at ESB_HOME/webapp/WEB-INF/classes/conf
  2. 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>  
  • web.xml
  1. Open the web.xml file located at ESB_HOME/webapp/WEB-INF
  2. 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 'webapp' folder 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.

Finally, click on Save and the application will be installed successfully.

Configuring the WSO2 ESB Application

  1. Go to Applications -> Enterprise Applications and click on the ESB entry from the list of applications available.
  2. Refer the section Configuring IBM WebSphere Application Server in the tutorial titled Running WSO2 WSAS on an IBM WebSphere Application Server by Upul Godage.
  3. 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

Author

Evanthika Amarasiri is a Software Engineer at WSO2. evanthika at wso2 dot com

 

About Author

  • Evanthika Amarasiri
  • Senior Technical Lead
  • WSO2