IBM FileNet P8, Version 5.2.1            

Developing a Cross-Release Application

Starting with the 5.2.1 version of the Content Platform Engine server, the Content Engine Java™ API supports the Cross-Release Class Loading feature, referred to as CRCL. CRCL allows a single instance of a Java application to connect to multiple Content Platform Engine server releases. For example, an application can have simultaneous connections to 5.0, 5.1, and 5.2.1 versions of the Content Platform Engine server. The application does not need to be restarted or reconfigured to switch Content Platform Engine servers.

Only the Content Engine Java API provides cross-release class loading support. This support is not included in the Content Engine .NET API or the Process Engine API.

A cross-release application must meet the following requirements:

The following code snippet shows how ConfigurationParameter.CONNECTION_IMPLEMENTATION_API_URLS and ConfigurationParameter.CONNECTION_IMPLEMENTATION_API_LOCATIONS are used to associate Connection URLs with locations to Jace.jar files. Both provide a list of key/value pairs. For ConfigurationParameter.CONNECTION_IMPLEMENTATION_API_URLS, the key is the Content Platform Engine connection URL and the value is a Content Platform Engine release number (fictional for this example). For ConfigurationParameter.CONNECTION_IMPLEMENTATION_API_LOCATIONS, the key is the Content Platform Engine release number, and the value is the path to a Jace.jar file for that release.

CRCL uses these two parameters together to create a many-to-one map between Content Platform Engine Connection URLs and copies of Jace.jar for the implementation APIs. For a Connection object, the URL is used to find the corresponding implementation API JAR file. CRCL matches the value of the Content Platform Engine connection with the key of the JAR file location. In the example, CRCL matches the URL http://svr1:9080/wsi/FNCEWS40SOAP/ with /my/vault/Jace-6.0.2.3.jar, and the URL iiop://svr2:2809/FileNet/Engine with /my/vault/7.11.0.0/Jace.jar.

Any Connection with a URL that cannot be matched with a JAR location, or with a URL that is not present in the key/value mapping, falls back to using the visible API.

...
String urlMapping = "~http://svr1:9080/wsi/FNCEWS40SOAP/ ~ 6.0.2.3" +
                    "~iiop://svr2:2809/FileNet/Engine ~ 7.11.0.0";
String pathMapping = "^6.0.2.3 ^ /my/vault/Jace-6.0.2.3.jar" +
                     "^7.11.0.0 ^ /my/vault/7.11.0.0/Jace.jar";

ConfigurationParameters parameters = new ConfigurationParameters();
parameters.setParameter(ConfigurationParameter.CONNECTION_IMPLEMENTATION_API_URLS, urlMapping);
parameters.setParameter(ConfigurationParameter.CONNECTION_IMPLEMENTATION_API_LOCATIONS, pathMapping);

To continue with this example, the client creates two Connection objects, one for Content Platform Engine release 6.0.2.3 and one for Content Platform Engine release 7.11.0.0. Each Connection is configured with the ConfigurationParameters object, mapping the URLs to the applicable implementation JARs. For each Connection, CRCL loads the server-appropriate implementation classes.

crcl.connectToSvr1(parameters);
crcl.connectToSvr2(parameters);

// Connect to svr1.
public void connectToSvr1(ConfigurationParameters parameters)
{
   svr1Conn = Factory.Connection.getConnection(<svr1Uri>, parameters);
   Subject subject = UserContext.createSubject(svr1Conn, <username>, <password>, <jaasStanza>);
   UserContext.get().pushSubject(subject);

   try 
   {
      // do work on svr1
   }
   finally
   {
      UserContext.get().popSubject();
   }
}

// Connect to svr2.
public void connectToSvr2(ConfigurationParameters parameters)
{
   svr2Conn = Factory.Connection.getConnection(<svr2Uri>, parameters);
   Subject subject = UserContext.createSubject(svr2Conn, <username>, <password>, <jaasStanza>);
   UserContext.get().pushSubject(subject);

   try 
   {
      // do work on svr2
   }
   finally
   {
      UserContext.get().popSubject();
   }
}


Last updated: October 2015
gs_concepts_setup_cross_release.htm

© Copyright IBM Corporation 2015.