Setting up your system for developing applications requires several additional tasks after you have installed and configured the IBM® FileNet® P8 Platform. (See Installing or upgrading IBM FileNet P8 for information on installing and configuring the IBM FileNet P8 Platform.)
This section describes the tasks that you need to perform when you set up a thick client workstation for your application development environment. The following environments are addressed: Enterprise Java Beans (EJB) transport protocol with WebSphere® Application Server; EJB transport protocol with WebLogic Application Server; EJB or Content Engine Web Service (CEWS) transport protocol with JBoss Application Server (FileNet P8 4.0.1 and later only); and CEWS transport protocol (non-application-server dependent).
Note that the application client version must match the WebSphere Application Server version.
where:
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:
Windows: -Dcom.ibm.CORBA.ConfigURL=file:C:\IBM\WebSphere\AppClient\properties\sas.client.props
AIX®: -Dcom.ibm.CORBA.ConfigURL=file:/usr/IBM/WebSphere/AppClient/properties/sas.client.props
non-Windows: -Dcom.ibm.CORBA.ConfigURL=file:/opt/IBM/WebSphere/AppClient/properties/sas.client.props
Windows: WebSphere install path\AppClient\lib, WebSphere Install path\AppClient\java\jre\lib\ext, and WebSphere Install path\AppClient\plugins
non-Windows: WebSphere install path/AppClient/lib, WebSphere Install path/AppClient/java/jre/lib/ext, and WebSphere Install path/AppClient/plugins
Example (Windows):
-Djava.ext.dirs=C:\Program Files\IBM\WebSphere\AppClient\java\jre\lib\ext;C:\Program Files\IBM\WebSphere\AppClient\lib;C:\Program Files\IBM\WebSphere\AppClient\plugins
Example (AIX):
-Djava.ext.dirs=/usr/IBM/WebSphere/AppClient/java/jre/lib/ext:/usr/IBM/WebSphere/AppClient/lib:/usr/IBM/WebSphere/AppClient/plugins
Example (Other non-Windows):
-Djava.ext.dirs=/opt/IBM/WebSphere/AppClient/java/jre/lib/ext:/opt/IBM/WebSphere/AppClient/lib:/opt/IBM/WebSphere/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.
Example (Windows) -Djava.ext.dirs=%WAS_HOME%\AppClient\java\jre\lib\ext;%WAS_HOME%\AppClient\lib;%WAS_HOME%\AppClient\plugins
Example (non-Windows) -Djava.ext.dirs=$WAS_HOME/AppClient/java/jre/lib/ext:$WAS_HOME/AppClient/lib:$WAS_HOME/AppClient/plugins
WebSphere library directory:
Windows: WebSphere install path\AppClient\lib
non-Windows: WebSphere install path/AppClient/lib
WebSphere plugin directory:
Windows: WebSphere install path\AppClient\plugins
non-Windows: WebSphere install path/AppClient/plugins
A typical URI is "iiop://hostname:port/FileNet/Engine", where hostname and port must match the host name and port number that is specified in the BOOTSTRAP_ADDRESS configuration parameter from the WebSphere administration console under .
Other issues
Based on your environment, be aware of the following issues that require additional steps to be taken:
Context ic = new InitialContext();
ic.lookup("");
-Djava.security.auth.login.config=jaas.conf.WebSphere
-Djava.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
-Djava.naming.provider.url=t3://hostname:7001
java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
java.naming.provider.url=t3://hostname:7001
Add the weblogic.jar file to the class path (or wlfullclient.jar for WebLogic version 10.x and later). 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 wlclient.jar, but it is 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);
-Djava.security.auth.login.config=jaas.conf.WebLogic
-Djava.naming.factory.initial=org.jboss.naming.NamingContextFactory
-Djava.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
-Djava.naming.provider.url=jnp://hostname:1099
java.naming.factory.initial=org.jboss.naming.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=jnp://hostname:1099
jnp://hostname:1099/FileNet/Engine
URI: http://hostname:8080/wsi/FNCEWS40MTOM/
-Djava.security.auth.login.config=jaas.conf.JBoss
When you set up a thick client development machine by using the CEWS protocol, the following tasks are required:
Here is the stanza that must exist in the JAAS configuration file:
FileNetP8WSI {
com.filenet.api.util.WSILoginModule required;
};
Here is the command-line argument to provide to the JVM that tells the system which JAAS configuration file to use:
-Djava.security.auth.login.config=jaas.conf
Use "FileNetP8WSI"in the constructor of the LoginContext JAAS class.
Subject subject =UserContext.createSubject(connection, "userid", "password","FileNetP8WSI");
UserContext uc = UserContext.get();
uc.pushSubject(sub);
try {
// your code here
}
finally
{
uc.popSubject();
}