|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atomikos.icatch.jaxws.GenericImportingTransactionHandler
public abstract class GenericImportingTransactionHandler
A generic superclass for common handler features. Subclasses inherit the following config parameters:
importPreference | This parameter indicates the desired behaviour of the handler. The
possible values are similar to the standard J2EE(TM) transaction attributes
(i.e.: Mandatory, Required, RequiresNew, Supports, NotSupported, Never). For
instance, if this parameter is set to Mandatory then every incoming
SOAP message must have transaction headers, or the handler will reject the
message by generating a SOAPFaultException. The default value is Required.
NOTE: the values of this parameter are case sensitive! It is important to realize that the preferences that ignore the transaction headers of the incoming messages (like RequiresNew) may be impractical if the client message has a transaction context header with mustUnderstand set to true. Nevertheless, in the spirit of web service autonomy we do provide these preferences: the service provider (the party that installs the importing handler) is the one that decides what kind of transaction scope to allow. |
newTransactionTimeout | The timeout (in milliseconds) of new transactions that are started by this handler. Defaults to 60000. For imported transactions, the timeout is indicated in the headers of the message and limited by the com.atomikos.icatch.max_timeout init parameter set in the transaction service core. |
commitOnHeuristicTimeout | This parameter should be set to true or false. If true, then heuristic timeout will lead to positive termination (confirm or commit). If false, then heuristic timeout will lead to negative termination (rollback or cancel). Default is false. |
checkOrphans | This parameter should be set to true or false. If true, then extra checks will be performed by the transaction service in order to avoid anomalies that can be caused by lost response messages. This is a unique feature only offered by Atomikos, and can be set to make non-reliable messaging platforms safer from the transactional point of view. If enabled, your application can safely retry failed remote calls within the same transaction. If you don't retry any calls then you don't need to enable this feature. Default is false. |
Field Summary | |
---|---|
static String |
ATOMIKOS_ACTOR
Constant indicating the ATOMIKOS actor URI. |
protected javax.xml.soap.SOAPFactory |
factory
|
protected boolean |
heuristic_commit
|
static String |
IMPORT_PREFERENCE_MANDATORY
Value of the import preference parameter to indicate that a transaction must be present in the incoming message. |
static String |
IMPORT_PREFERENCE_NEVER
Value of the import preference parameter to indicate that a transaction is not allowed. |
static String |
IMPORT_PREFERENCE_NOT_SUPPORTED
Value of the import preference parameter to indicate that a transaction is not supported (and ignored). |
static String |
IMPORT_PREFERENCE_REQUIRED
Value of the import preference parameter to indicate that a transaction is required. |
static String |
IMPORT_PREFERENCE_REQUIRES_NEW
Value of the import preference parameter to indicate that a new transaction should be created, even if a context is included in the incoming message. |
static String |
IMPORT_PREFERENCE_SUPPORTS
Value of the import preference parameter to indicate that a transaction is supported but not required. |
protected long |
new_transaction_timeout
|
protected boolean |
orphan_check
|
protected int |
preference
|
Constructor Summary | |
---|---|
GenericImportingTransactionHandler()
|
Method Summary | |
---|---|
void |
close(javax.xml.ws.handler.MessageContext ctx)
|
static int |
convertPreference(String preference)
Converts a string parameter value to a integer preference as needed by the API. |
protected javax.xml.ws.soap.SOAPFaultException |
createSOAPFaultException(String reason,
QName code)
|
protected abstract boolean |
getActiveRecovery()
Checks if active transactions are recoverable. |
boolean |
getCheckOrphans()
|
boolean |
getCommitOnHeuristicTimeout()
|
protected CompositeTransaction |
getCompositeTransaction()
|
int |
getImportPreference()
|
long |
getNewTransactionTimeout()
|
protected abstract SOAPImportingTransactionManager |
getSOAPImportingTransactionManager()
|
boolean |
handleFault(javax.xml.ws.handler.soap.SOAPMessageContext ctx)
|
boolean |
handleMessage(javax.xml.ws.handler.soap.SOAPMessageContext ctx)
Extracts/inserts the protocol-specific transaction context (if any) and (re)creates a transaction in the local VM. |
protected boolean |
isRollbackOnly(CompositeTransaction ct)
|
void |
setCheckOrphans(boolean value)
Sets whether orphans should be checked or not. |
void |
setCommitOnHeuristicTimeout(boolean value)
Sets if heuristic timeout means commit or rollback. |
void |
setImportPreference(String importPreference)
Sets the desired import preference. |
void |
setNewTransactionTimeout(long milliseconds)
Sets the timeout (in millis) of newly started transactions. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.xml.ws.handler.soap.SOAPHandler |
---|
getHeaders |
Field Detail |
---|
public static final String ATOMIKOS_ACTOR
public static final String IMPORT_PREFERENCE_REQUIRES_NEW
public static final String IMPORT_PREFERENCE_REQUIRED
public static final String IMPORT_PREFERENCE_MANDATORY
public static final String IMPORT_PREFERENCE_NEVER
public static final String IMPORT_PREFERENCE_SUPPORTS
public static final String IMPORT_PREFERENCE_NOT_SUPPORTED
protected boolean heuristic_commit
protected boolean orphan_check
protected int preference
protected long new_transaction_timeout
protected javax.xml.soap.SOAPFactory factory
Constructor Detail |
---|
public GenericImportingTransactionHandler()
Method Detail |
---|
public static int convertPreference(String preference)
preference
-
protected javax.xml.ws.soap.SOAPFaultException createSOAPFaultException(String reason, QName code)
protected CompositeTransaction getCompositeTransaction()
protected boolean isRollbackOnly(CompositeTransaction ct)
public void setCommitOnHeuristicTimeout(boolean value)
value
- public void setCheckOrphans(boolean value)
value
- public void setNewTransactionTimeout(long milliseconds)
milliseconds
- public void setImportPreference(String importPreference)
importPreference
- public boolean getCommitOnHeuristicTimeout()
public long getNewTransactionTimeout()
public boolean getCheckOrphans()
public int getImportPreference()
SOAPImportingTransactionManager
protected abstract boolean getActiveRecovery()
protected abstract SOAPImportingTransactionManager getSOAPImportingTransactionManager()
public boolean handleMessage(javax.xml.ws.handler.soap.SOAPMessageContext ctx) throws javax.xml.ws.ProtocolException
handleMessage
in interface javax.xml.ws.handler.Handler<javax.xml.ws.handler.soap.SOAPMessageContext>
javax.xml.ws.ProtocolException
javax.xml.ws.soap.SOAPFaultException
public boolean handleFault(javax.xml.ws.handler.soap.SOAPMessageContext ctx) throws javax.xml.ws.ProtocolException
handleFault
in interface javax.xml.ws.handler.Handler<javax.xml.ws.handler.soap.SOAPMessageContext>
javax.xml.ws.ProtocolException
public void close(javax.xml.ws.handler.MessageContext ctx)
close
in interface javax.xml.ws.handler.Handler<javax.xml.ws.handler.soap.SOAPMessageContext>
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |