EJB2Home
The EJB2Home activity connects to an EJB server for EJB 2.x, performs a JNDI lookup operation to obtain a reference to a home object, and obtains a reference to a remote object from the home object. Use this activity to invoke any method defined by the home object.
You can also use this activity to invoke a method on the EJB home. Once this activity is executed, use the EJB2Remote activity to invoke methods on the remote object without performing additional remote lookups.
It is optional to cache the home object and the stateless remote objects to reuse them across process instances. However, this improves the performance because further remote lookups are not necessary.
General
The General tab contains the following fields:
Field | Module Property? | Description |
---|---|---|
Name | No | Name to be displayed as the label for the activity in the process. |
EJB Connection | Yes | An EJB Configuration shared resource defines a set of relationships and their participating entities.
Click
See Creating an EJB Connection Shared Resource for detailed instructions. |
JNDI Name | Yes | The name registered with the JNDI server for the EJB. |
Home Interface Class | No | Name of the home interface for the EJB (the interface which extends
javax.ejb.EJBHome).
Click
|
Home Interface Method | No | Method of the home interface to call. The list provides the methods contained in the selected interface class in the Home Interface Class field. |
Advanced
The Advanced tab contains the following fields:
Field | Module Property? | Description |
---|---|---|
Cache Home Object | No |
Specifies whether the home object is to be cached for use by process instances. If unchecked, each process instance performs a JNDI lookup to obtain the home object reference. If checked, process instances reuse the cached home object reference. Choosing to cache the home or remote object improves performance over time. However, the home or remote object might become "stale". That is, the object changes on the EJB server, and the cached object no longer matches the object on the server. If the EJB2Home activity encounters a stale home object in the cache, the activity attempts to recreate the home object. The Connection Retries field of the EJB Configuration shared resource specifies the number of retries that the EJB2Home activity will attempt before failing to recreate the home object. If the EJB2Home activity is successful in recreating the home object, the activity succeeds and a new home object is placed in the cache. If the activity cannot recreate the home object after the maximum number of retries, the activity fails and takes the error transition. |
Cache Stateless Remote Object | No |
Specifies whether the remote object is to be cached for use by process instances. The remote object is only cached for stateless session enterprise beans. If unchecked, each process instance obtains a new remote object reference. If checked, process instances reuse the cached remote object reference. If the process instance encounters a stale cached remote object, the object is removed from the cache, an error is returned, and the activity fails. However, subsequent process instances will attempt to recreate the remote object. |
Fault
The Fault tab lists exceptions that are thrown by this activity:
Error Schema Element | Data Type | Description |
---|---|---|
errorCode | string | The error code returned by the plug-in. |
errorMessage | string | The error message returned by the plug-in. |
errorStackTrace | string | The complete stack trace that causes the exception. |
exceptionClassName | string | The class name of the root exception that causes the exception. |