English

Problem: Deploying ArcGIS 10 Java Web ADF Web Mapping Applications to WebSphere v7.x is very slow

Description

At ArcGIS 10, the Java Web ADF updates Java Server Faces (JSF) libraries to 1.2. This results in an updated Document Type Declaration (DTD) in the applications web.xml and faces-config.xml. JSF 1.2 works with Servlet 2.5 and JSP 2.1 specifications, and it requires application servers that support these specifications.

Cause

Servlet 2.5 adds support for annotations whereby applications servers are able to scan all the classes in the .war file to process the annotations. This process may take an exceptionally long time to deploy in WebSphere v7, exclusively.

All other supported applications servers deploy Esri applications without incident.

Solution or Workaround

Upgrade WebSphere v7 to Fix Pack v7.0.0.11 and WebSphere Java SDK 1.6.0 SR7

IBM recommended fixes are publicly available at 'Recommended fixes for WebSphere Application Server'.

Workaround:
If it is not possible to upgrade to the Fix Pack provided in the Solution section above, execute the following deployment steps:

1. Extract the arcobjects.jar from the Java Web ADF Web Mapping Application (WMA) or custom Java Web ADF application.

Note:
When creating a WMA in Manager or an IDE Plug-in using an ArcGIS Server Local connection, arcobjects.jar is bundled in the application's WEB-INF\lib folder. To remove this library, open the *.war file generated using the jar extract function: jar x[v]f jarfile [inputfiles] [-Joption].

To extract the contents of the WMA .war file, replace ‘jarfile’ with the name of the WMA application. Once all the contents are extracted, navigate into the extracted application's ‘WEB-INF’\lib\’ folder to remove the arcobjects.jar file.


2. Re-jar the application without arcobjects.jar.

Note:
Re-jar the WMA application without arcobjects.jar with the following command: jar c[v0M]f jarfile [-C dir] inputfiles [-Joption]
Replace ‘jarfile’ with the name of the WMA application. There are many ways to accomplish this task including using ZIP file manager programs.

For a complete listing of the Java Archive Tool used here, refer to Standard Java Documentation.

Once arcobjects.jar has been removed from the WMA application, the application can be deployed to WebSphere using the normal deployment process and the application can be started.


3. Deploy arcobjects.jar as a shared library in WebSphere.

Note:
Add arcobjects.jar to WebSphere shared libraries. Shared libraries can be used by multiple applications and can be defined using the WebSphere administrative console under ‘Environment > Shared Libraries’.


Steps to define and manage shared libraries:

A. Open the WebSphere administrative console.
B. Click ‘Environment > Shared libraries’ in the console navigation tree to access the Shared Libraries page.
C. Ensure the scope is associated with the appropriate cell, node, and server. By default, a shared library is accessible to applications deployed on the same node as the shared library.
D. Click ‘New’.
E. On the ‘General Properties’ page for the shared library, specify the name, classpath, and any other variables for the library file that are required. A typical ArcObjects definition is offered in the screen shot below:

[O-Image]

F. Click ‘Apply’.


4. Associate a Java Web ADF Application with an ArcObjects shared library.

A. Deploy the WMA without the arcobjects.jar file, if it is not already deployed.
B. In WebSphere Administrative Console, click ‘Applications > Application Types > WebSphere enterprise applications in the console navigation tree.
C. Click on the installed WMA application that is to be used with the shared arcobjects.jar library.
D. Under ‘References’, click ‘Shared library references’ to access the Library reference page.
E. Select the application or module that is to be associated with the shared library and click ‘Reference shared libraries’.
F. On the Shared Library Mappings page, select the ArcObjects shared library in the Available list and click ‘>>’ to add it to the selected list and click ‘OK’.
G. Save the changes to the configuration.

Results
When running the application, classes represented in the arcobjects.jar file are loaded into the application class loader and are available to the application.

To verify association between an application and the ArcObjects shared library, examine the class loader in the Class loader viewer provided by the WebSphere administrative console. Click ‘Troubleshooting > Class loader viewer’. Navigate the resulting tree to find the server/module and application. Click on the application and select ‘Table View’ from the Enterprise Applications Topology page. The classpath of the application module class loader lists the classes used by the ArcObjects shared library.