Setting Up a Thick Client Development Environment
Setting up your system for developing applications requires several additional tasks after you have installed and configured the IBM® FileNet® P8 Platform. (See the IBM FileNet P8 Platform Installation and Upgrade Guide for information on installing and configuring the IBM FileNet P8 Platform. To download this document from the IBM support page, see Accessing IBM FileNet Documentation.)
This section describes the tasks you need to perform when setting up a thick client workstation for your application development environment. The following environments are addressed: Enterprise Java™ Beans (EJB) transport protocol with WebSphere; EJB transport protocol with WebLogic; EJB or Content Engine Web Service (CEWS) transport protocol with JBoss (FileNet P8 4.0.1 and later only); and CEWS transport protocol (non-application-server dependent).
NOTE To continue with the tasks in this section, you should have already installed and configured the Content Engine client software.
EJB transport protocol with WebSphere
- Install the IBM WebSphere® Application Client for WebSphere Application Server (WAS) on your development client workstation.
Note that the Application Client version must match the WAS version.
- Set up the environment to use the Java Runtime Environment (JRE) that you installed in step 1. Make sure to set the JAVA_HOME environment variable and JRE bin in the path.
- Update the sas.client.props (which you installed in step 1) with the following values:
com.ibm.CORBA.securityServerHost=<hostname>
com.ibm.CORBA.securityServerPort=<portnumber>
com.ibm.CORBA.loginSource=none
where: - hostname is the computer running WebSphere and on which the Content Engine is deployed.
- portnumber is the port number used by the computer identified by hostname (change this value if it differs from the default of 2809)
Setting the loginSource
value from prompt
(the default) to none
can prevent repeated login prompts for user ID and password.
When you run your program, make sure that you:
- Add the following Java Virtual Machine (JVM) argument:
-Dcom.ibm.CORBA.ConfigURL=C:\IBM\WebSphere\AppClient\properties\sas.client.props
The sas.client.props file is located in the directory in which the WebSphere client is installed. Make sure you provide the correct path.
- Add the appropriate JAR files using one of the approaches listed below:
- Follow the WebSphere instructions for setting up and running a thick application client on a client machine. (See your WebSphere documentation. Note that WebSphere documentation refers to this environment as a "thin" client, not a thick client.)
- Use the
-Djava.ext.dirs
command line option to include the JAR files from the following directories: <WebSphere install path>\AppClient\lib, <WebSphere Install path>\AppClient\jre\lib\ext, and <WebSphere Install path>\AppClient\plugins. Example (Windows):
-Djava.ext.dirs=C:\Program Files\IBM\WebSphere\6.1.0.5\AppClient\java\jre\lib\ext;C:\Program Files\IBM\WebSphere\6.1.0.5\AppClient\lib;C:\Program Files\IBM\WebSphere\6.1.0.5\AppClient\plugins
The WebSphere setupClient script creates environment variables that point to the home locations of these directories. You can substitute those variables for the explicit path in your command. Examples:
Windows:
-Djava.ext.dirs=%WS6_JAVA_HOME%\AppClient\java\jre\lib\ext;%WS6_HOME%\AppClient\lib;%WS6_HOME%\AppClient\plugins
UNIX:
-Djava.ext.dirs=$WS6_JAVA_HOME$/AppClient/java/jre/lib/ext;$WS6_HOME$/AppClient/lib;$WS6_HOME$/AppClient/plugins
- Explicitly add all of the JAR files in the
<WebSphere install path>\AppClient\lib and <WebSphere install path>\AppClient\plugins directories to your classpath.
- Pass the correct URI to the connection.
A typical URI is "iiop://<hostname>:<port>/FileNet/Engine", where hostname and port must match the host name and port number specified in the BOOTSTRAP_ADDRESS configuration parameter from the WebSphere administration console under Server > Ports.
TIP From a Windows® command line on your client development workstation, double-check the host name by issuing a ping command. The network name of the server, returned from using ping on the client, must match the host specified for the BOOTSTRAP_ADDRESS.
Other issues
Based on your environment, be aware of the following issues that require additional steps to be taken:
- If you do not use
UserContext.createSubject
, then the caller must initialize the ORB before making the Java Authentication and Authorization Service (JAAS) login call, as shown in the following example:
Context ic = new InitialContext();
ic.lookup("");
- If you use a JAAS stanza other than the FileNetP8 stanza, or if you use an authentication scheme other than username and password, then you must supply a JAAS configuration file. You specify that file using a standard command line argument, as shown in the example below:
-Djava.security.auth.login.config=C:\jaas.conf.WebSphere
EJB transport protocol with WebLogic
- Install a supported JRE on your development client workstation.
NOTE Both JRocket or Sun JREs are acceptable. However, JRocket with IIOP in WebLogic 9.x has known problems and is not recommended.
- Add the following to your Java Naming and Directory Interface (JNDI) configuration by selecting one of the following two approaches:
- Supply the following JVM arguments:
-Djava.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
-Djava.naming.provider.url=t3://hostname:7001
- Add the following values to a jndi.properties file that is in the classpath:
java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
java.naming.provider.url=t3://hostname:7001
NOTE The jndi.properties file must be in the classpath. You could either include the file in a JAR file and add the JAR file to the classpath, or you could create a directory under the classpath and put the file in that directory.
- Use the t3 protocol.
Add the weblogic.jar to the classpath. Then specify the t3 protocol by providing a URI of "t3://hostname:7001/FileNet/Engine" in the Content Engine API Connection class. Note that you can use IIOP as the protocol with the wlclient.jar, but it is generally not recommended. IIOP is slower than and not as functional as the t3 protocol. The following code snippet illustrates how to provide the URI for the connection:
// Get the connection
String uri = "t3://remotehost:7001/FileNet/Engine";
Connection conn = Factory.Connection.getConnection(uri);
- Specify the location of a JAAS configuration file. You specify that file using a standard command line argument, as shown in the example below:
-Djava.security.auth.login.config=C:\jaas.conf.WebLogic
NOTE The JAAS configuration files are contained in the Jace.jar. With this command, you identify the configuration file to use.
EJB or CEWS transport protocol with JBoss
- Install a supported JRE on your development client workstation.
- Add the jbossall-client.jar file from C:\<JBOSS_HOME>\client directory to the classpath.
- Add the following values to your JNDI configuration by selecting one of the following two approaches:
- Supply the following JVM arguments:
-Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-Djava.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
-Djava.naming.provider.url=jnp://<hostname>:1099
- Add the following values to a jndi.properties file that is in the classpath:
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=jnp://<hostname>:1099
NOTE The jndi.properties file must be in the classpath. You could either include the file in a JAR file and add the JAR file to the classpath, or you could create a directory under the classpath and put the file in that directory.
- Modify your junit.properties file as follows:
- For EJB protocol:
jnp://<hostname>:1099/FileNet/Engine
- For WSI protocol:
URI: http://<hostname>:8080/wsi/FNCEWS40DIME/
- Specify the location of a JAAS configuration file. You specify that file using a standard command line argument, as shown in the example below:
-Djava.security.auth.login.config=C:\jaas.conf.JBoss
NOTE The JAAS configuration files are contained in the Jace.jar. With this command, you identify the configuration file to use.
CEWS transport protocol (non-application-server dependent)
When setting up a thick client development machine using the CEWS protocol, the following tasks are required.
NOTE Examples assume a default directory of C:\Program Files. If your directory structure is not the default, modify the path in the examples to reflect your directory structure.