The J2eeIntegrate tool creates an application around WSO2 SOA Enablement Server for Java that can be integrated with a J2EE server. This application is typically a servlet plus resources such as a directory, and utilized archives (JAR, EAR, WAR, etc.). J2eeIntegrate provides instructions for deployment of WSO2 SOA Enablement Server for Java to a J2EE environment. It also modifies WSO2 SOA Enablement Server for Java to use a number of JMS providers for SOAP messaging over JMS. The deployment of WSO2 SOA Enablement Server for Java in a J2EE environment is also called porting. Please see Porting WSO2 SOA Enablement Server for a detailed treatment of porting.
The user must still port WSO2 SOA Enablement Server to the J2EE server using environment-specific tools, as described in Individual Porting Guides for Each Supported AS.
With this tool, WSO2 SOA Enablement Server is now portable as a self-contained application.
J2eeIntegrate replaces the makeEar scripts from earlier versions of WSO2 SOA Enablement Server.
There are two types of porting of WSO2 SOA Enablement Server for Java to J2EE: shared and self-contained. Self-contained is the default type.
Self-contained porting of WSO2 SOA Enablement Server has all the resources needed to run WSO2 SOA Enablement Server, including the app and conf directories (usually in the root of the web application). This means that the ported WSO2 SOA Enablement Server is independent of any WSO2 SOA Enablement Server installation and does not modify any shared resources.
Shared porting has its WSO2 SOA Enablement Server location set to the installation directory (WASP_HOME), but the app directory is copied into WASP_HOME/conf/porting/app-shared.
When you deploy a Web service to a self-contained WSO2 SOA Enablement Server, it goes into the /app subdirectory of the WSO2 SOA Enablement Server servlet within the application server. On the other hand, if you deploy it to a shared porting, it is deployed into the WASP_HOME/conf/porting/app-shared directory.
A shared porting of WSO2 SOA Enablement Server shares a copy of the WASP_HOME/app directory in WASP_HOME/conf/porting/app-shared. Every time the J2eeIntegrate tool runs, the content of the directory is updated from WASP_HOME/app. Every timewasp.xml is deleted, J2EE components are copied and modified according to the application server. This means that the JNDI names of JMS administered objects are modified in the JMS transport component, along with the values in the deployment descriptor of the JTA component.
![]() | Note |
---|---|
If you use shared porting, you share all the contents of the WASP_HOME/conf/porting/app-shared directory. This may lead to exceptions if components are configured to work only on a standalone WSO2 SOA Enablement Server. However, deployment should work if performed immediately after installation. |
Porting in most environments is not a straightforward operation, and differs according to the environment. Therefore, you must provide additional steps, as per the instructions provided by this tool. These lead to successful porting in most cases. If porting fails, you may be trying to port WSO2 SOA Enablement Server into an environment that has been modified in such a way that WSO2 SOA Enablement Server cannot run. For more information, consult the chapter Manual Porting.
WSO2 SOA Enablement Server for Java comes with support for self-contained WSO2 SOA Enablement Server client portings. To create a self-contained client porting with the J2eeIntegrate tool, invoke the following command:
WASP_HOME/bin/J2eeIntegrate --installation-type TARGET_SERVER --self-contained-client
![]() | Note |
---|---|
TARGET_SERVER is a supported application server or servlet container. |
You can port this self-contained application only to an application server (or servlet container) that is compliant with the Servlet 2.3 (or higher) specification. This is because our self-contained application contains an implementation of the javax.servlet.ServletContextListener interface.
When you create a self-contained client application with our J2eeIntegrate tool, it consists of the following parts:
conf - Directory holding all necessary client configuration files.
WEB-INF/web.xml - File defining this client web application.
WEB-INF/lib - Directory holding all necessary client libraries.
WEB-INF/classes - Directory holding sample servlets and the WSO2 filter for correct WSO2 SOA Enablement Server client initialization.
Each time a WSO2 SOA Enablement Server client starts it requires wasp.location, wasp.config.location and other essential properties to be specified. The com.systinet.transport.servlet.server.Initializer context listener (located in WEB-INF/classes) performs this task. This listener initializes the WSO2 SOA Enablement Server client before it boots. It extracts WSO2 SOA Enablement Server client configuration files into the filesystem and then sets up the necessary WSO2 SOA Enablement Server properties.
![]() | Caution |
---|---|
You must not remove the com.systinet.transport.servlet.server.Initializer filter from your web application or you will get WSO2 SOA Enablement Server client startup exceptions. |
The j2eeintegrate tool has the following options:
--installation-type=, -i type=server_or_JMS_provider
The type of environment in which WSO2 SOA Enablement Server will be ported. It can be either an application server or JMS provider. If the user specifies a JMS-type provider, the --modify-environment switch is default. The list of possible values is included in the instructions provided by the tool. You may also find them in the Guides for Application Servers.
--self-contained-client
Creates self-contained WSO2 SOA Enablement Server client web application with sample servlets. This option can be used only in combination with the previous --installation-type option. If you use other options (specified below), they will be ignored.
![]() | Important |
---|---|
Target application server or servlet container must be compliant with Servlet 2.3 specification. |
--without-jms
If specified, JMS transport support will not be configured or used.
--http-port=port_number
If you are deploying WSO2 SOA Enablement Server on an application server running on a non-default HTTP port, specify the port using this switch.
--https-port=port_number
Same as --http-port= but for HTTPS protocol.
--jms-topic
Use this option if you are deploying WSO2 SOA Enablement Server for Java on an application server and you want to use a JMS topic other than the default one.
--jms-queue
Same as --jms-topic but for JMS queue.
--jms-topic-connection-factory
Use this option if you are deploying WSO2 SOA Enablement Server on an application server and you want to use a JMS topic connection factory other than the default one.
--jms-queue-connection-factory
Same as --jms-topic-connection-factory but for JMS queue connection factory.
--jms-username
Use this option to set up a JMS username other than the default one.
--jms-password
Use this option to set up a JMS password other than the default one.
--shared
Switches to 'shared' porting.
--modify-environment
Modifies the following files:
WASP_HOME\bin\env.bat (WASP_HOME/bin/env.sh)
WASP_HOME\demo\env.properties (WASP_HOME/demo/env.properties)
WASP_HOME\demo\env.bat (WASP_HOME/demo/env.sh)
It adds necessary application server-specific jar files to the WSO2 SOA Enablement Server classpath and to the demos classpath if necessary, and sets ports, context, JMS factories and queues needed to execute integration tests successfully.
![]() | Important |
---|---|
In case of porting to an application server, SSJ modifies a log4j.appender file defined in the log4j configuration file when its path is not in the absolute form. The path is then modified by using the SSJ’s runtime location. To avoid this, define the path in its absolute form. |