The following procedure shows you how to configure your PAPI Java client to connect to a specific J2EE Process Engine
running in a remote location, using JNDI.
Follow this procedure for each of the J2EE Process Engines that you need to access from your PAPI client:
- Create a properties file that contains the JNDI properties PAPI needs to connect to the remote
J2EE Process Engine.
You must specify the following basic properties:
- java.naming.factory.initial
- java.naming.provider.url
Note: If your remote server needs additional properties to connect using JNDI, specify this
properties as well.
- Copy this file to a location that is accessible to your PAPI Client.
- Provide the PAPI client access to the file that contains the JNDI properties. You can set this
property in the code of the PAPI client using system properties, or you can pass it as an argument
using the -D option of the java command.
| Property |
Description |
| fuego.j2ee.initialctx.ENGINE_ID.file |
Specifies the name of file that contains the JNDI properties to connect to the application
server where the specified J2EE Process Engine runs. You must specify the value of this property using the
absolute path of the file.
|
| fuego.j2ee.initialctx.ENGINE_ID.resource |
Specifies the name of the resource that contains the JNDI properties to connect to the
application server where the specified J2EE Process Engine runs. PAPI obtains the resource using the method
getResource() of the context ClassLoader. You must add
this resource to the CLASSPATH.
|
| fuego.j2ee.initialctx.ENGINE_ID.url |
The URL of the file that contains the jndi properties to connect to the application
server where J2EE Process Engine runs. |
The following example shows you how to specify the file that contains the jndi properties to connect to
the server where the J2EE Process Engine "engine1" runs, using the property fuego.j2ee.initialctx.
ENGINE_ID.file.
-
Using system properties in the Java code of the PAPI client:
System.setProperty("fuego.j2ee.initialctx.engine1.file", "C:\\engine1.properties");
-
Using the option -D when running the PAPI client:
java -Dfuego.j2ee.initialctx.engine1.file=C:\\engine1.properties
The following example shows you how to specify the resource that contains the jndi properties to connect to
the server where the J2EE Process Engine "engine1" runs, using the property fuego.j2ee.initialctx.
ENGINE_ID.resource.
-
Using system properties in the Java code of the PAPI client:
System.setProperty("fuego.j2ee.initialctx.engine1.resource", "engine1.properties");
-
Using the option -D when running the PAPI client:
java -Dfuego.j2ee.initialctx.engine1.resource=engine1.properties
The following example shows you how to specify the URL that contains the jndi properties to connect to
the server where the J2EE Process Engine "engine1" runs, using the property fuego.j2ee.initialctx.
ENGINE_ID.url.
-
Using system properties in the Java code of the PAPI client:
System.setProperty("fuego.j2ee.initialctx.engine1.url", "http://server/conf/engine1.properties");
-
Using the option -D when running the PAPI client:
java -Dfuego.j2ee.initialctx.engine1.url=http://server/conf/engine1.properties