com.atomikos.icatch.jaxws
Interface SOAPImportingTransactionManager

All Known Implementing Classes:
GenericSOAPImportingTransactionManager, SOAPImportingTransactionManagerImp, SOAPImportingTransactionManagerImp

public interface SOAPImportingTransactionManager

An interface for explicit import of transactions.


Field Summary
static int PROPAGATION_MANDATORY
          Constant indicating that a propagation is mandatory; if none exists then import will throw an exception.
static int PROPAGATION_NEVER
          Constant indicating that a propagation should not be present during import.
static int PROPAGATION_NOT_SUPPORTED
          Constant indicating that any propagation should be ignored during import.
static int PROPAGATION_REQUIRED
          Constant indicating that a propagation is required; if none exists it will be created during import.
static int PROPAGATION_REQUIRES_NEW
          Constant indicating that any propagation (if present) will be ignored and a new transaction should be created instead.
static int PROPAGATION_SUPPORTS
          Constant indicating that a propagation will be used if present.
 
Method Summary
 CompositeTransaction importTransaction(int preference, long newTransactionTimeout, javax.xml.soap.SOAPMessage msg, boolean orphancheck, boolean heur_commit)
          Extracts the portable propagation information contained in an incoming SOAP message and creates a local transaction for it.
 void terminated(String tid, javax.xml.soap.SOAPMessage msg, boolean commit)
          Terminates the local work and inserts the extent information into a SOAP message.
 

Field Detail

PROPAGATION_REQUIRED

static final int PROPAGATION_REQUIRED
Constant indicating that a propagation is required; if none exists it will be created during import.

See Also:
Constant Field Values

PROPAGATION_MANDATORY

static final int PROPAGATION_MANDATORY
Constant indicating that a propagation is mandatory; if none exists then import will throw an exception.

See Also:
Constant Field Values

PROPAGATION_NEVER

static final int PROPAGATION_NEVER
Constant indicating that a propagation should not be present during import. If one is found then an exception will be thrown.

See Also:
Constant Field Values

PROPAGATION_REQUIRES_NEW

static final int PROPAGATION_REQUIRES_NEW
Constant indicating that any propagation (if present) will be ignored and a new transaction should be created instead.

See Also:
Constant Field Values

PROPAGATION_SUPPORTS

static final int PROPAGATION_SUPPORTS
Constant indicating that a propagation will be used if present. If not present, no transaction will be created during import.

See Also:
Constant Field Values

PROPAGATION_NOT_SUPPORTED

static final int PROPAGATION_NOT_SUPPORTED
Constant indicating that any propagation should be ignored during import. No transaction will be created during import.

See Also:
Constant Field Values
Method Detail

importTransaction

CompositeTransaction importTransaction(int preference,
                                       long newTransactionTimeout,
                                       javax.xml.soap.SOAPMessage msg,
                                       boolean orphancheck,
                                       boolean heur_commit)
                                       throws javax.xml.ws.soap.SOAPFaultException,
                                              javax.xml.soap.SOAPException,
                                              PropagationException
Extracts the portable propagation information contained in an incoming SOAP message and creates a local transaction for it. This is an alternative to the normal import of a portable propagation.

NOTE: this method does not need nor guarantee any thread associations for the transaction.

Parameters:
preference - The propagation preference, being one of the predefined PROPAGATION_* values.
newTransactionTimeout - Timeout (in millis) of new transactions (that may or may not be created according to the preference parameter).
msg - The incoming SOAP message.
orphancheck - True if orphan checks need to be enabled.
heur_commit - True if heuristic means commit. False otherwise.
Returns:
CompositeTransaction The new transaction, or null if none was created.
Throws:
javax.xml.ws.soap.SOAPFaultException - If the message header could not be parsed.
javax.xml.soap.SOAPException - On SOAP parsing errors.
PropagationException - If the message contents are incompatible with the supplied propagation preference.

terminated

void terminated(String tid,
                javax.xml.soap.SOAPMessage msg,
                boolean commit)
                throws SysException,
                       RollbackException
Terminates the local work and inserts the extent information into a SOAP message. An extent is only inserted if the local work was done in the transaction propagation context of the caller (this also depends on the preference with which the import was done).

NOTE: this method does not need nor guarantee any thread associations for the transaction.

Parameters:
tid - The id of the transation from which to take the extent.
msg - The SOAP message, which is about to be returned to the remote client.
commit - True iff the invocation had no errors. Implies that the local subtx is committed. If false, then the local work will be rolled back and NO extent will be added to the response message.
Throws:
SysException - Unexpected error.
RollbackException - If the transaction has timed out.


Copyright © 2012. All Rights Reserved.