|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atomikos.icatch.jaxws.GenericSOAPImportingTransactionManager
public abstract class GenericSOAPImportingTransactionManager
A generic superclass to implement the common import logic. All the transaction preference logic is implemented here, so each protocol can reuse it.
Field Summary |
---|
Fields inherited from interface com.atomikos.icatch.jaxws.SOAPImportingTransactionManager |
---|
PROPAGATION_MANDATORY, PROPAGATION_NEVER, PROPAGATION_NOT_SUPPORTED, PROPAGATION_REQUIRED, PROPAGATION_REQUIRES_NEW, PROPAGATION_SUPPORTS |
Constructor Summary | |
---|---|
GenericSOAPImportingTransactionManager()
|
Method Summary | |
---|---|
protected CompositeTransaction |
createNewTransaction(long timeout)
Creates a new transaction (and suspends any existing transaction if needed). |
protected abstract javax.xml.soap.SOAPHeaderElement |
findPropagationHeader(javax.xml.soap.SOAPMessage msg)
Finds a (protocol-specific) propagation header. |
protected CompositeTransaction |
findTransaction(String tid)
Finds a given transaction |
protected String |
getParentTid(CompositeTransaction ct)
Finds the parent of a given transaction. |
protected Properties |
getProperties()
|
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. |
protected abstract CompositeTransaction |
importTransactionFromHeader(javax.xml.soap.SOAPHeaderElement header,
boolean orphanCheck,
boolean heurCommit)
Does the actual import |
protected abstract void |
insertExtentHeader(javax.xml.soap.SOAPMessage msg,
String tid,
String parentTid,
String rootTid,
HeuristicMessage[] tags,
Hashtable table,
long timeout)
Inserts the appropriate extent header into the message. |
protected abstract void |
removePropagationHeader(javax.xml.soap.SOAPMessage msg)
Removes the propagation header from the message. |
protected void |
setProperties(Properties p)
Sets the properties to use for NEW transactions. |
void |
terminated(String tid,
javax.xml.soap.SOAPMessage msg,
boolean commit)
Terminates the local work and inserts the extent information into a SOAP message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GenericSOAPImportingTransactionManager()
Method Detail |
---|
protected void setProperties(Properties p)
p
- protected Properties getProperties()
protected CompositeTransaction findTransaction(String tid) throws RollbackException
tid
-
RollbackException
- If not foundprotected CompositeTransaction createNewTransaction(long timeout)
timeout
- The timeout in millis.
protected String getParentTid(CompositeTransaction ct)
ct
-
public CompositeTransaction importTransaction(int preference, long newTransactionTimeout, javax.xml.soap.SOAPMessage msg, boolean orphancheck, boolean heur_commit) throws javax.xml.soap.SOAPException, javax.xml.ws.soap.SOAPFaultException, PropagationException
SOAPImportingTransactionManager
NOTE: this method does not need nor guarantee any thread associations for the transaction.
importTransaction
in interface SOAPImportingTransactionManager
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.
javax.xml.soap.SOAPException
- On SOAP parsing errors.
javax.xml.ws.soap.SOAPFaultException
- If the message header could not be parsed.
PropagationException
- If the message contents are incompatible with the supplied
propagation preference.SOAPImportingTransactionManager
public void terminated(String tid, javax.xml.soap.SOAPMessage msg, boolean commit) throws SysException, RollbackException
SOAPImportingTransactionManager
NOTE: this method does not need nor guarantee any thread associations for the transaction.
terminated
in interface SOAPImportingTransactionManager
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.
SysException
- Unexpected error.
RollbackException
- If the transaction has timed out.SOAPImportingTransactionManager
protected abstract javax.xml.soap.SOAPHeaderElement findPropagationHeader(javax.xml.soap.SOAPMessage msg) throws javax.xml.soap.SOAPException
msg
-
javax.xml.soap.SOAPException
protected abstract CompositeTransaction importTransactionFromHeader(javax.xml.soap.SOAPHeaderElement header, boolean orphanCheck, boolean heurCommit) throws javax.xml.ws.soap.SOAPFaultException, javax.xml.soap.SOAPException, PropagationException
header
-
javax.xml.ws.soap.SOAPFaultException
javax.xml.soap.SOAPException
PropagationException
protected abstract void removePropagationHeader(javax.xml.soap.SOAPMessage msg) throws javax.xml.soap.SOAPException
msg
-
javax.xml.soap.SOAPException
protected abstract void insertExtentHeader(javax.xml.soap.SOAPMessage msg, String tid, String parentTid, String rootTid, HeuristicMessage[] tags, Hashtable table, long timeout) throws javax.xml.soap.SOAPException
msg
- The messagetid
- The local TID of the imported txparentTid
- The parent TID at the senderrootTid
- The root TIDtags
- The tagstable
- The count-> participant informationtimeout
- The timeout in millis to wait (if applicable)
javax.xml.soap.SOAPException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |