Deploy/container/WebSphere
From Omar Wiki
This page describes how to use IBM WebSphere web container for deploying freebXML Registry server code.
Contents |
Overview and Concepts
IBM WebSphere is a commercial product that provides a web container.IBM WebSphere Application Server is a commercial product that provides a web container, EJB container, and J2C container and supports various Java and Web services standards. In the current version of WebSphere V6.1, it supports J2EE 1.4 and Java 1.5.
Known Versions Supported
I have deployed omar 3.0 on two major versions of Websphere, V6.0 and V6.1. The overall context of our deployment environment is:
Database: Oracle 9.2.0.6 on Windows 2000 professional edition and Solaris.
Operating System: Windows 2000 professional edition and Sun Solaris 9.
Deploying OMAR
Here I will only focus on WebSphere V6.1 specific deployment steps, please refer to http://ebxmlrr.sourceforge.net/3.0/SetupGuide.html for general omar setup guide.
Use 'war' ant target to get a deployable omar.war file, now you are ready to deploy to WebSphere. There are different approaches to deploy an application in WebSphere, either use command line ‘wsadmin script’ (jacl and jython), or admin console web application. Since IBM WebSphere will gradually stop phasing out jacl wsadmin scripting, here I will provide a jython sample script - install.py to give a idea that how I deploy Omar to WebSphere V6.1
AdminApp.install('ears/omar.war', ['-server', ServerName, '-appname', 'omar', '-contextroot', 'omar', '-MapModulesToServers', [['.*', '.*', 'WebSphere:cell=' + cellName + ',node=' + nodeName + ',server=' + ogServerName]], '-MapResRefToEJB', [['.*', '.*', '.*', 'jdbc/omar-registry', 'javax.sql.DataSource', ''''jdbc/omar-registry'''']], '-MapWebModToVH', [['.*', '.*', VirtualHostName]]])
deploymentId = AdminConfig.getid('/Deployment:omar/')
deployedObject = AdminConfig.showAttribute(deploymentId, 'deployedObject')
modules = AdminConfig.showAttribute(deployedObject, 'modules')
moduleId = modules[1:-1]
classloader = AdminConfig.showAttribute(moduleId, 'classloader')
print AdminConfig.showall(classloader)
AdminConfig.modify(classloader, [['mode', ''''PARENT_LAST'''']])
print AdminConfig.showall(classloader)
print
I list two important pieces in bold text, once is JDBC data source name and another is specifying WebSphere class loader mechanism for Omar application.
Please follow IBM WebSphere jython document to materialize other parts such as creation of JDBC provider and data source, etc. whatever applicable to a typical web application.
It will be more visual and easy adoptable to anyone who is unfamiliar to wsadmin jython script to use admin console web application for deployment of Omar. Simply follows the link Applications -> Install New Application, correctly provide whichever context root (such as omar), server name, host name and jdbc data source name. After successfully installation of Omar, follow the link Enterprise Applications -> Modules -> Manage Modules -> Select omar.war -> General Properties -> Class loader order, choose 'class loaded application class loader first' to finish class loader mechanism modification.
Verify Omar installation by checking out WebUI, soap endpoint and Java UI respectively.
Links
- IBM WebSphere homepage
- [WebSphere Application Server V6 System Management and Configuration Handbook]http://www.redbooks.ibm.com/abstracts/SG246451.html?Open
- [Web Services Handbook for WebSphere Application Server 6.1]http://www.redbooks.ibm.com/abstracts/SG247257.html?Open
