Class HasEntry
java.lang.Object
org.jpos.transaction.participant.HasEntry
- All Implemented Interfaces:
Configurable, GroupSelector, TransactionConstants, TransactionParticipant
HasEntry is a general purpose GroupSelector that can be used to
verify that a given object is available in the context.
It checks the Context for the given entry ('name' property) and returns
the content of the 'yes' or 'no' properties as the group list.
If "yes" or "no" is not specified, it returns the constant UNKNOWN
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabort(long id, Serializable o) Called by TransactionManager upon transaction commit.voidcommit(long id, Serializable o) Called by TransactionManager upon transaction commit.intprepare(long id, Serializable o) Called by TransactionManager in preparation for a transactionselect(long id, Serializable ser) void
-
Field Details
-
YES
-
NO
-
UNKNOWN
-
-
Constructor Details
-
HasEntry
public HasEntry()
-
-
Method Details
-
prepare
Description copied from interface:TransactionParticipantCalled by TransactionManager in preparation for a transaction- Specified by:
preparein interfaceTransactionParticipant- Parameters:
id- the Transaction identifiero- transaction context- Returns:
- PREPARED or ABORTED (| NO_JOIN | READONLY)
-
select
- Specified by:
selectin interfaceGroupSelector- Parameters:
id- transaction idser- transaction context- Returns:
- group name or null for no-action
-
commit
Description copied from interface:TransactionParticipantCalled by TransactionManager upon transaction commit. Warning: implementation should be able to handle multiple calls with the same transaction id (rare crash recovery)- Specified by:
commitin interfaceTransactionParticipant- Parameters:
id- the Transaction identifiero- transaction context
-
abort
Description copied from interface:TransactionParticipantCalled by TransactionManager upon transaction commit. Warning: implementation should be able to handle multiple calls with the same transaction id (rare crash recovery)- Specified by:
abortin interfaceTransactionParticipant- Parameters:
id- the Transaction identifiero- transaction context
-
setConfiguration
- Specified by:
setConfigurationin interfaceConfigurable- Parameters:
cfg- Configuration object
-