+

Search Tips   |   Advanced Search

ActivitySession and transaction container policies in combination

This topic provides details about the relationship between the deployment descriptor properties that determine how the container manages ActivitySession boundaries.

If an enterprise bean uses ActivitySessions, how the EJB container manages ActivitySession boundaries when delegating a method invocation depends on both the ActivitySession kind and Container transaction type deployment descriptor attributes configured for the enterprise bean. The following table lists the relationship between these two properties.

In each row, the final column describes the behavior that the EJB container takes with respect to global transaction and ActivitySession context, based on the following abbreviations:

Sn

An ActivitySession, where n indicates the ActivitySession instance.

Tn

A transaction, where n indicates the transaction instance.

In every case where the container does not start or leave a global transaction context associated with the thread, it starts (or obtains from the bean instance) a local transaction containment and associates that with the thread. The duration of the local transaction containment is determined by a combination of the local-transaction boundary descriptor (configured as part of the application deployment descriptor, and not shown in the following table) and the presence or not of an ActivitySession context, as described in ActivitySessions and transaction contexts.

The rows highlighted in bold are not allowed.

Bean ActivitySession policy(ActivitySession kind) Bean transaction policy(Container transaction type) Received contexts Container behavior
Required Required None Start S1, Start T1
S1 Start T1
T1 Suspend T1, Start S1, Start T2
S1, T1 No Action
Requires new None Start S1, Start T1
S1 Start T1
T1 Suspend T1, Start S1, Start T2
S1, T1 Suspend T1, Start T2
Supports None Start S1
S1 No Action
T1 Suspend T1, Start S1
S1, T1 No Action
Not supported None Start S1
S1 No Action
T1 Suspend T1, Start S1
S1, T1 Suspend T1
Mandatory None Exception
S1 Exception
T1 Exception
S1, T1 No action
Never None Start S1
S1 No Action
T1 Suspend T1, Start S1
S1, T1 Exception
Requires new Required None Start S1 + T1
S1 Suspend S1, Start S2 + T1
T1 Suspend T1, Start S1 + T2
S1 + T1 Suspend S1 + T1, Start S2 + T2
Requires new None Start S1 + T1
S1 Suspend S1, Start S2 + T1
T1 Suspend T1, Start S1 + T2
S1 + T1 Suspend S1 + T1, Start S2 + T2
Supports None Start S1
S1 Suspend S1, Start S2
T1 Suspend T1, Start S1
S1, T1 Suspend S1 + T1, Start S2
Not supported None Start S1
S1 Suspend S1, Start S2
T1 Suspend T1, Start S1
S1, T1 Suspend S1 + T1, Start S2
Mandatory None Exception
S1 Exception
T1 Exception
S1, T1 Exception
Never None Start S1
S1 Suspend S1, Start S2
T1 Suspend T1, Start S1
S1, T1 Suspend S1 + T1, Start S2
Supports Required None Start T1
S1 Start T1
T1 No Action
S1, T1 No Action
Requires new None Start T1
S1 Start T1
T1 Suspend T1, Start T2
S1, T1 Suspend T1, Start T2
Supports None No Action
S1 No Action
T1 No Action
S1, T1 No Action
Not supported None No Action
S1 No Action
T1 Suspend T1
S1, T1 Suspend T1
Mandatory None Exception
S1 Exception
T1 No Action
S1, T1 No Action
Never None No Action
S1 No Action
T1 Exception
S1, T1 Exception
Not supported Required None Start T1
S1 Suspend S1, Start T1
T1 No Action
S1, T1 Suspend S1 + T1, Start T2
Requires new None Start T1
S1 Suspend S1, Start T1
T1 Suspend T1, Start T2
S1, T1 Suspend S1 + T1, Start T2
Supports None No Action
S1 Suspend S1
T1 No Action
S1, T1 Suspend S1 + T1
Not supported None No Action
S1 Suspend S1
T1 Suspend T1
S1, T1 Suspend S1 + T1
Mandatory None Exception
S1 Exception
T1 No Action
S1,T1 Exception
Never None No Action
S1 Suspend S1
T1 Exception
S1, T1 Suspend S1 + T1
Mandatory Required None Exception
S1 Start T1
T1 Exception
S1, T1 No Action
Requires new None Exception
S1 Start T1
T1 Exception
S1, T1 Suspend T1, Start T2
Supports None Exception
S1 No Action
T1 Exception
S1, T1 No Action
Not supported None Exception
S1 No Action
T1 Exception
S1, T1 Suspend T1
Mandatory None Exception
S1 Exception
T1 Exception
S1, T1 No Action
Never None Exception
S1 No Action
T1 Exception
S1,T1 Exception
Never Required None Start T1
S1 Exception
T1 No Action
S1, T1 Exception
Requires new None Start T1
S1 Exception
T1 Suspend T1, Start T2
S1,T1 Exception
Supports None No Action
S1 Exception
T1 No Action
S1,T1 Exception
Not supported None No Action
S1 Exception
T1 Suspend T1
S1,T1 Exception
Mandatory None Exception
S1 Exception
T1 No Action
S1,T1 Exception
Never None No Action
S1 Exception
T1 Exception
S1,T1 Exception
Bean managed Bean managed None No Action
S1 Suspend S1
T1 Suspend T1
S1, T1 Suspend S1 + T1


Related concepts

  • ActivitySession and transaction contexts


    Related tasks

  • Set EJB module ActivitySession deployment attributes Reference topic