Running the WSO2 Application Server on Apache Geronimo
- Davanum Srinivas
- - WSO2
Introduction
WSO2 Web Services Application Server 2.0 (WSAS)'s Servlet Edition supports
many of the well known Application servers like IBM Websphere, BEA Weblogic
and Redhat's JBoss. The install process does support the older Apache
Geronimo 1.1.1 version. This article is an effort to enumerate the steps
required to install WSAS 2.0 on the latest Geronimo 2.0.1
Background
Please download the following zip's from the Apache web site and unzip
them:
- Geronimo
- Geronimo 2.0.1 with Jetty 6 (zip) - WSOS Application
Server - Binary Distribution
Please ensure JDK 1.5 or above is in your PATH
Create a WSO2WSAS war for use with Geronimo
Run the install.bat file in wso2wsas directory and select the
Generic Server option, also specify a temporary directory in
which the installer can create the war. Here's a transcript (includes prompts
and responses). Please note that WSAS needs a directory to work off of (for
configuration, database etc) and we chose C:\GERONIMO-WSAS. We also choose
C:\GERONIMO-WSAS\TEMP as the directory to place the generated war
Depending on the operating system you are using, you should see a screen
similar to this:
C:\wso2wsas-2.0\bin>install ########################################################### # # # WSO2 WSAS v2.0 Installation # # # ########################################################### Using Java Home : C:\JDK15 Please select your installation mode : [1/2] 1) WSO2 WSAS Servlet Container Installation 2) WSO2 WSAS Eclipse WTP Plugins Installation : 1 Selection: WSO2 WSAS Servlet Container Installation WSO2 WSAS Home directory is where the WSO2 WSAS database, conf files, logs, and module & service repository will reside. Please enter the WSO2 WSAS Home directory [C:\Users\dims\.wso2wsas]:C:\GERONIMO-WSAS [echo] Creating WSO2 WSAS Home at C:\GERONIMO-WSAS... BUILD SUCCESSFUL Total time: 1 minute 23 seconds Please select your application server: 1. Tomcat Server 2. JBoss Server 3. Geronimo Server 4. Generic Server : 4 Installing on Generic Server... Starting Generic installation... Please enter your Application Server's WAR file deployment directory : C:\GERONIMO-WSAS\TEMP C:\GERONIMO-WSAS\TEMP does not exist. Create new directory? (y/n) y Serializing wso2wsas.properties file ... Creating wso2wsas.properties file... OK Creating Web Archive... OK Copying "wso2wsas.war" to "C:\GERONIMO-WSAS\TEMP" OK WSO2 WSAS Servlet Edition installation was successful. Please configure your J2EE app-server configuration files as described in the README.txt file. BUILD SUCCESSFUL Total time: 3 seconds Press any key to continue . . .
Replace hibernate jar in wso2wsas.war
The version of hibernate in WSAS is not usable under Geronimo, So let's
upgrade to the newer one. Here's a few command snippets:
C:\GERONIMO-WSAS\TEMP>jar -xvf wso2wsas.war C:\GERONIMO-WSAS\TEMP>del WEB-INF\lib\hibernate-3.1.3.jar C:\GERONIMO-WSAS\TEMP>copy c:\download\hibernate-3.2\hibernate3.jar WEB-INF\lib C:\GERONIMO-WSAS\TEMP>del wso2wsas.war C:\GERONIMO-WSAS\TEMP>jar -cvf wso2wsas.war *
Edit the WSAS Configuration to set the HTTP and HTTPS ports for
Geronimo
Please edit C:\GERONIMO-WSAS\conf\server.xml and replace the following
snippet
<!-- Uncomment this section and provide the correct HTTP port in the case of a generic server installation --> <!-- <Ports> <HTTP>9762</HTTP> <HTTPS>9443</HTTPS> </Ports> -->
with this one
<Ports> <HTTP>8080</HTTP> <HTTPS>8443</HTTPS> </Ports>
That's it folks! You can then point your browser to https://localhost:8080/axis2/ to
verify if all's well.
Start the Geronimo Server
Here's how we start the geronimo server with a simple run command:
C:\geronimo-jetty6-jee5-2.0.1\bin>geronimo run Using GERONIMO_BASE: C:\geronimo-jetty6-jee5-2.0.1 Using GERONIMO_HOME: C:\geronimo-jetty6-jee5-2.0.1 Using GERONIMO_TMPDIR: var\temp Using JRE_HOME: C:\JDK15\jre Booting Geronimo Kernel (in Java 1.5.0_11)... Starting Geronimo Application Server v2.0.1 [*******************************] 100% 55s Startup complete Listening on Ports: 1050 127.0.0.1 CORBA Naming Service 1099 0.0.0.0 RMI Naming 1527 0.0.0.0 Derby Connector 2001 127.0.0.1 OpenEJB ORB Adapter 4201 0.0.0.0 OpenEJB Daemon 6882 127.0.0.1 OpenEJB ORB Adapter 8009 0.0.0.0 Jetty Connector AJP13 8080 0.0.0.0 Jetty SelectChannel Connector HTTP 8443 0.0.0.0 Jetty Select Channel Connector HTTPS 9999 0.0.0.0 JMX Remoting Connector 61613 0.0.0.0 ActiveMQ Transport Connector 61616 0.0.0.0 ActiveMQ Transport Connector Started Application Modules: EAR: org.apache.geronimo.configs/webconsole-jetty6/2.0.1/car RAR: org.apache.geronimo.configs/activemq-ra/2.0.1/car RAR: org.apache.geronimo.configs/system-database/2.0.1/car WAR: org.apache.geronimo.configs/dojo-jetty6/2.0.1/car WAR: org.apache.geronimo.configs/remote-deploy-jetty/2.0.1/car WAR: org.apache.geronimo.configs/welcome-jetty/2.0.1/car Web Applications: / /console /console-standard /dojo /remote-deploy Geronimo Application Server started
Create the Data Sources Needed by WSAS
Creating data sources involves deploying a plan in Geronimo parlance.
Here's the plan XML that needs to be deployed. Please make sure you set the
directory path correctly in the ConnectionURL parameter.
<?xml version="1.0" encoding="UTF-8"?> <connector xmlns="https://geronimo.apache.org/xml/ns/j2ee/connector-1.2"> <dep:environment xmlns:dep="https://geronimo.apache.org/xml/ns/deployment-1.2"> <dep:moduleId> <dep:groupId>org.wso2.wsas</dep:groupId> <dep:artifactId>wso2wsas_db</dep:artifactId> <dep:version>1.0</dep:version> <dep:type>rar</dep:type> </dep:moduleId> <dep:dependencies> <dep:dependency> <dep:groupId>org.apache.derby</dep:groupId> <dep:artifactId>derby</dep:artifactId> <dep:version>10.2.2.0</dep:version> <dep:type>jar</dep:type> </dep:dependency> </dep:dependencies> </dep:environment> <resourceadapter> <outbound-resourceadapter> <connection-definition> <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface> <connectiondefinition-instance> <name>wso2wsas_db</name> <config-property-setting name="Password">wso2wsas</config-property-setting> <config-property-setting name="Driver">org.apache.derby.jdbc.EmbeddedDriver</config-property-setting> <config-property-setting name="UserName">wso2wsas</config-property-setting> <config-property-setting name="ConnectionURL">jdbc:derby:C:/GERONIMO-WSAS/database/WSO2WSAS_DB</config-property-setting> <connectionmanager> <local-transaction/> <single-pool> <max-size>10</max-size> <min-size>0</min-size> <match-one/> </single-pool> </connectionmanager> </connectiondefinition-instance> </connection-definition> </outbound-resourceadapter> </resourceadapter> </connector>
Once you have edited the plan, save it as
C:\GERONIMO-WSAS\wso2wsas-db-plan.xml and run the following command (The
Deployed line is the output from Geronimo):
C:\geronimo-jetty6-jee5-2.0.1>java -jar bin/deployer.jar --user system --password manager deploy C:\GERONIMO-WSAS\wso2wsas-db-plan.xml repository\org\tranql\tranql-connector-ra\1.3\tranql-connector-ra-1.3.rar Deployed org.wso2.wsas/wso2wsas_db/1.0/rar
Deploy the wso2wsas war
Now we are ready to deploy the WSO2WSAS war as shown below:
C:\geronimo-jetty6-jee5-2.0.1>java -jar bin/deployer.jar --user system --password manager deploy c:\GERONIMO-WSAS\TEMP\wso2wsas.war Deployed org.wso2.wsas/war/1.1/war @ /wso2wsas Deployed org.apache.geronimo.configs/axis/2.0.1/car Deployed org.apache.geronimo.configs/cxf/2.0.1/car
That's it!
Please point your browser to https://localhost:8443/wso2wsas/ and login as
admin/admin
Summary
The Apache Axis2 war distribution and Geronimo's stripped down little-G
distribution is a very handy combination for deploying Axis2 based Web
services.
Applies To
1. Axis2 1.3 / Geronimo 2.0.1