|
jPOS 1.6.1 API Documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jpos.util.SimpleLogSource
org.jpos.bsh.BSHTransactionParticipant
public class BSHTransactionParticipant
A TransactionParticipant which�s prepare, commit and abort methods can be
specified through beanshell scripts.
To indicate what code to execute for any of the methods just add an element
named 'prepare', 'commit' or 'abort' contained in that of the participant.
See BSHMethod for details on the syntax of these elemets. The value to return
in the prepare method should be stored in the script variable named "result".
None of these tags are mandatory.
You can subclass BSHTransactionParticipant and override the default...
methods. That way you can provide default behaviour for a participant and
override it at deploy time through scripts.
BSHMethod| Field Summary |
|---|
| Fields inherited from interface org.jpos.transaction.TransactionConstants |
|---|
ABORTED, NO_JOIN, PAUSE, PREPARED, READONLY, RETRY |
| Constructor Summary | |
|---|---|
BSHTransactionParticipant()
Creates a new instance of BSHTransactionParticipant |
|
| Method Summary | |
|---|---|
void |
abort(long id,
java.io.Serializable context)
Called by TransactionManager upon transaction commit. |
void |
commit(long id,
java.io.Serializable context)
Called by TransactionManager upon transaction commit. |
int |
prepare(long id,
java.io.Serializable context)
Called by TransactionManager in preparation for a transaction |
int |
prepareForAbort(long id,
java.io.Serializable context)
Called by TransactionManager in preparation for a transaction that is known to abort. |
void |
setConfiguration(org.jdom.Element e)
|
| Methods inherited from class org.jpos.util.SimpleLogSource |
|---|
error, error, getLogger, getRealm, info, info, setLogger, setRealm, warning, warning |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BSHTransactionParticipant()
| Method Detail |
|---|
public void abort(long id,
java.io.Serializable context)
TransactionParticipant
abort in interface TransactionParticipantid - the Transaction identifiercontext - transaction context
public void commit(long id,
java.io.Serializable context)
TransactionParticipant
commit in interface TransactionParticipantid - the Transaction identifiercontext - transaction context
public int prepare(long id,
java.io.Serializable context)
TransactionParticipant
prepare in interface TransactionParticipantid - the Transaction identifiercontext - transaction context
public int prepareForAbort(long id,
java.io.Serializable context)
AbortParticipant
prepareForAbort in interface AbortParticipantid - the Transaction identifiercontext - transaction context
public void setConfiguration(org.jdom.Element e)
throws ConfigurationException
setConfiguration in interface XmlConfigurableConfigurationException
|
jPOS.org | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||