private class WriteableBeanDatabaseImpl.TwoPhaseResourceImpl extends java.lang.Object implements TwoPhaseResource
Modifier and Type | Field and Description |
---|---|
private java.util.LinkedList<BeanDatabaseUpdateListener> |
completedListeners |
Modifier | Constructor and Description |
---|---|
private |
TwoPhaseResourceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
activateDynamicConfiguration(TwoPhaseTransactionData dynamicConfiguration)
Once all TwoPhaseResource prepare methods have completed successfully the activate method
will be called on all registered TwoPhaseResource implementations.
|
void |
prepareDynamicConfiguration(TwoPhaseTransactionData dynamicConfiguration)
This method is called prior to any changes being made to the
ServiceLocator
but after the IdempotentFilters are called. |
void |
rollbackDynamicConfiguration(TwoPhaseTransactionData dynamicConfiguration)
If any TwoPhaseResource fails then all TwoPhaseResources that successfully completed their
prepare method will get this method invoked.
|
private java.util.LinkedList<BeanDatabaseUpdateListener> completedListeners
public void prepareDynamicConfiguration(TwoPhaseTransactionData dynamicConfiguration) throws MultiException
TwoPhaseResource
ServiceLocator
but after the IdempotentFilters are called. If this method throws any exception the
entire transaction will not go forward and the thrown exception will be thrown back
to the caller. If this method completes successfully then either the commit or rollback
methods will be called eventually once the final outcome of the transaction has been
established. This method is called with the write lock of the ServiceLocator heldprepareDynamicConfiguration
in interface TwoPhaseResource
dynamicConfiguration
- Information about the dynamic configuration for which this resource
was registeredMultiException
- If for some reason the transaction can not go through the expected
exception is a MultiException with enclosed exceptions detailing the reasons why the
transaction cannot complete. No subsequent TwoPhaseResource listeners will be invoked
once any TwoPhaseResource throws any exceptionpublic void activateDynamicConfiguration(TwoPhaseTransactionData dynamicConfiguration)
TwoPhaseResource
activateDynamicConfiguration
in interface TwoPhaseResource
dynamicConfiguration
- Information about the dynamic configuration for which this resource
was registeredpublic void rollbackDynamicConfiguration(TwoPhaseTransactionData dynamicConfiguration)
TwoPhaseResource
rollbackDynamicConfiguration
in interface TwoPhaseResource
dynamicConfiguration
- Information about the dynamic configuration for which this resource
was registered