Skip to main content

2 posts tagged with "transactionmanager"

View All Tags

Enum keys in TransactionManager contracts

· 5 min read
Alejandro Revilla
jPOS project founder

TransactionManager context contracts are a small feature with a large documentation payoff.

When a participant declares:

<requires>REQUEST</requires>
<provides>RESPONSE</provides>

the TransactionManager can do two useful things. First, it can abort early if a required input is missing. Second, when requires or optional is present, it can call the participant with a restricted clone of the Context and later merge back only the keys listed in provides.

That makes the TM configuration more than a list of Java classes. It becomes a readable contract for the transaction flow: this participant needs these inputs, may look at these optional values, and is expected to produce these outputs.