When you work with policy sets in the administrative console,
you can configure the WS-Transaction policy type for the WS-AtomicTransaction
(WS-AT) and the WS-BusinessActivity (WS-BA) protocols. You can configure
whether a client propagates, and a server receives, a WS-AT context,
and whether a client propagates, and a server receives, a WS-BA context.
Before you begin
You must be working with a policy set that includes the
WS-Transaction policy type.
Do not edit the policies associated
with the provided default policy sets. To modify the WS-Transaction
policy settings, use a copy of a default policy set or create a new
policy set.
About this task
You can configure the policies for the WS-AtomicTransaction
and WS-BusinessActivity protocols. The WS-AT protocol supports coordination
of activities so that either all the activities occur, or none of
them occur. The WS-BA protocol supports coordination of activities
that are more loosely coupled than atomic transactions and that therefore
require a compensation process if a failure occurs in the business
activity.
When you add a WS-Transaction policy, it is equivalent
to setting the following deployment descriptors that are associated
with an EJB or web module:
- Use Web Services Atomic Transaction
- Send Web Services Atomic Transaction on requests
- Execute using Web Services Atomic Transaction on incoming requests
A WS-BA context is sent if the client is running in a
BusinessActivity scope (BAScope). A provider runs in a BAScope if
it receives a message that contains a WS-BA context, as long as the
provider is set to run Enterprise JavaBeans (EJB)
methods in a Business Activity scope.
Procedure
- In the navigation pane of the administrative console, click . The WS-Transactions settings pane is displayed.
- In the WS-AtomicTransaction section, select the option
you require:
- Mandatory. For a client, the client
always propagates a WS-AT context on an outbound request. For a server,
any request that is received must include a WS-AT context, otherwise
the request is rejected.
- Supports. For a client, the client
can propagate a WS-AT context on an outbound request when that context
is available. For a server, if a request includes a WS-AT context,
the context is imported and established on the thread before the request
is processed.
- Never. For a client, the client never
propagates a WS-AT context on an outbound request. For a server, any
request that is received must not include a WS-AT context, otherwise
the request is rejected.
- In the WS-BusinessActivity section, select the option you
require:
- Mandatory. For a client, the client
always propagates a WS-BA context on an outbound request. For a server,
any request that is received must include a WS-BA context, otherwise
the request is rejected.
- Supports. For a client, the client
can propagate a WS-BA context on an outbound request when that context
is available. For a server, if a request includes a WS-BA context,
the context is imported and established on the thread before the request
is processed.
- Never. For a client, the client never
propagates a WS-BA context on an outbound request. For a server, any
request that is received must not include a WS-BA context, otherwise
the request is rejected.
- Click OK.
- Save your changes to the master configuration.
Results
After you configure the WS-Transaction policy, the associated
policy set uses this policy to support WS-AtomicTransaction and WS-BusinessActivity.