EJB Configuration Shared Resource

Use an EJB Configuration shared resource to specify the connection configuration for the JNDI server.

General

Field Module Property? Description
Package No Name of the package where the new shared resource is added.
Name No The name to be displayed as the label for the shared resource.
Description No Short description of the shared resource.

Advance Configuration

Field Module Property? Description
Use Shared JNDI Configuration No When this check box is selected, the JNDI Configuration field is displayed. You can use it to choose a JNDI Configuration resource.

When this check box is clear, the JNDI Context Factory, JNDI Context URL, JNDI User Name, and JNDI Password fields are displayed.

JNDI Configuration No Specifies a JNDI Configuration resource.
Note: This field is displayed only when the Use Shared JNDI Configuration check box is selected.
JNDI Context Factory Yes Select an initial context factory supplied by each supported application server vendor from the list. Different initial context factories other than the default options are available in this list:
  • org.jnp.interfaces.NamingContextFactory

    JBoss Application Server version 6.x
  • org.jboss.naming.remote.client.InitialContextFactory

    JBoss Application Server version 7.1.x and WildFly 8.x
  • weblogic.jndi.WLInitialContextFactory

    Oracle WebLogic Server 12.x
  • com.ibm.websphere.naming.WsnInitialContextFactory

    IBM WebSphere Application Server 8.x
  • Others (Unsupported)

    For other application servers
Note: This field is displayed only when the Use Shared JNDI Configuration check box is clear.
JNDI Context URL Yes Specify the URL of the server.

See related JNDI provider documentation for the syntax of the URL.

Note: This field is displayed only when the Use Shared JNDI Configuration check box is clear.
JNDI User Name Yes Specify the user name to use when logging into the JNDI server. If the JNDI provider does not require access control, this field can be empty.
Note: This field is displayed only when the Use Shared JNDI Configuration check box is clear.
JNDI Password Yes Specify the password to use when logging into the JNDI server. If the JNDI provider does not require access control, this field can be empty.
Note: This field is displayed only when the Use Shared JNDI Configuration check box is clear.

EJB Configuration

Field Module Property? Description
Max Connections Yes Maximum number of naming contexts that are created and cached in the connection pool.
See Pooling and Caching for more information.
Note: If this field is set to zero, the naming context is not cached, and a new context is created for each lookup operation.
Connection Retries Yes Maximum number of attempts can be made to connect to the application server, or to create the naming context.
Note: If this field is set to zero, only one attempt can be made to establish a connection.
Retry Interval (ms) Yes The time interval, in milliseconds, of making each connection attempt to the application server, or to create the naming context.
Note: If this field is set to zero, the new connection attempt is started immediately.
Test Connection No Press the button to test the connection configuration for the JNDI server.

Pooling and Caching

Creating an InitialContext class requires a large amount of overhead. Therefore, contexts can be cached and placed in a pool to improve performance over time. Define the Max Connections field to specify the maximum number of InitialContext that the plug-in creates at any given time.

The InitialContext is created when you start a process during initializing the EJB2Home activity or EJB3Remote activity, and all created contexts are placed into the pool. When you want to use a context, fetch an existing context from the pool to obtain a reference to the EJB 2.x home object or EJB 3.x remote object. Once the EJB 2.x home object or EJB 3.x remote object is obtained, the context is released back into the pool. If all contexts are being used, TIBCO ActiveMatrix BusinessWorks Plug-in for EJB blocks any new requests until a context is freed from the pool.

All contexts are cached for reuse by subsequent process instances. If you specify zero in the Max Connections field, contexts are not cached, and each request creates a new InitalContext.

If a context becomes stale (for example, the server is restarted), TIBCO ActiveMatrix BusinessWorks Plug-in for EJB attempts to create a new context to replace the stale context in the pool. Use the Connection Retries field to define the maximum number of attempts to reestablish the context.