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.
Advance Configuration
EJB Configuration
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.
|
Connection Retries | Yes | The maximum number of attempts can be made to connect to the application server, or to create the naming context. |
Retry Interval (ms) | Yes | The time interval, in milliseconds, of making each connection attempt to the application server, or to create the naming context. |
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.