Class XAOnePhaseResource
java.lang.Object
com.arjuna.ats.internal.jta.resources.arjunacore.XAOnePhaseResource
- All Implemented Interfaces:
ExceptionDeferrer
,OnePhaseResource
One Phase resource wrapper for XAResources.
- Since:
- ATS 4.1
- Version:
- $Id$
- Author:
- Kevin Conner (Kevin.Conner@arjuna.com)
-
Constructor Summary
ConstructorDescriptionDefault constructor for deserialising resource.XAOnePhaseResource
(XAResource xaResource, Xid xid, Object[] params) Construct the one phase wrapper for the specified resource. -
Method Summary
Modifier and TypeMethodDescriptionint
commit()
Commit the one phase resource.void
getDeferredThrowables
(List<Throwable> list) Adds all supressed throwables of this ExceptionDeferrer to the given list in order of appearance.void
Pack the state of the resource.int
rollback()
Commit the one phase resource.toString()
void
Unpack the state of the resource.
-
Constructor Details
-
XAOnePhaseResource
public XAOnePhaseResource()Default constructor for deserialising resource. -
XAOnePhaseResource
Construct the one phase wrapper for the specified resource.- Parameters:
xaResource
- The XA resource being wrapped.xid
- The transaction identifier.params
- additional params to pass through.
-
-
Method Details
-
commit
public int commit()Commit the one phase resource.- Specified by:
commit
in interfaceOnePhaseResource
- Returns:
- TwoPhaseOutcome.FINISH_OK, TwoPhaseOutcome.ONE_PHASE_ERROR or TwoPhaseOutcome.FINISH_ERROR
-
rollback
public int rollback()Commit the one phase resource.- Specified by:
rollback
in interfaceOnePhaseResource
- Returns:
- TwoPhaseOutcome.FINISH_OK or TwoPhaseOutcome.FINISH_ERROR
-
pack
Pack the state of the resource.- Specified by:
pack
in interfaceOnePhaseResource
- Parameters:
os
- The object output state.- Throws:
IOException
-
unpack
Unpack the state of the resource.- Specified by:
unpack
in interfaceOnePhaseResource
- Parameters:
is
- The object input state.- Throws:
IOException
-
toString
-
getDeferredThrowables
Description copied from interface:ExceptionDeferrer
Adds all supressed throwables of this ExceptionDeferrer to the given list in order of appearance.- Specified by:
getDeferredThrowables
in interfaceExceptionDeferrer
- Parameters:
list
-
-