EJB Configuration Shared Resource

You can use an EJB Configuration shared resource to specify the connection configuration for a JNDI server.

General

In the General panel, you can specify the package that stores the EJB Configuration shared resource and the shared resource name.

The following table lists the configurations in the General panel of the EJB Configuration shared resource:
Field Module Property? Description
Package No The 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 in the process.
Description No A short description for this shared resource.

Advance Configuration

The following table lists the configurations in the Advance Configuration panel of the EJB Configuration shared resource:
Field Module Property? Description
Use Shared JNDI Configuration No If this check box is selected, the JNDI Configuration field is displayed. You can use it to choose a JNDI Configuration resource.

If this check box is cleared, 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.5.5.9
  • Others (Unsupported)

    For other application servers
Note: This field is displayed only when the Use Shared JNDI Configuration check box is cleared.
JNDI Context URL Yes Specifies 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 cleared.
JNDI User Name Yes Specifies the user name to be used when logging in to 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 cleared.
JNDI Password Yes Specifies the password to be used when logging in to 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 cleared.

EJB Configuration

The following table lists the configurations in the EJB Configuration panel of the EJB Configuration shared resource:
Field Module Property? Description
Max Connections Yes The 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 The 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 Used 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 classses that the plug-in creates at any given time.

The InitialContext class is created when you start a process during initializing the EJB2Home activity or EJB3Remote activity, and all created contexts are placed into the pool. If 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. After 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 InitialContext class.

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.