/* */ package com.arjuna.ats.internal.jta.transaction.arjunacore.subordinate.jca;
/* */
/* */ import com.arjuna.ats.arjuna.common.Uid;
/* */ import com.arjuna.ats.arjuna.state.InputObjectState;
/* */ import com.arjuna.ats.arjuna.state.OutputObjectState;
/* */ import com.arjuna.ats.jta.xa.XidImple;
/* */ import java.io.IOException;
/* */ import javax.transaction.xa.Xid;
/* */
/* */ public class SubordinateAtomicAction extends com.arjuna.ats.internal.jta.transaction.arjunacore.subordinate.SubordinateAtomicAction
/* */ {
/* */ private Xid _theXid;
/* */
/* */ public SubordinateAtomicAction()
/* */ {
/* */ }
/* */
/* */ public SubordinateAtomicAction(Uid actId)
/* */ {
/* 60 */ super(actId);
/* */
/* 62 */ activate();
/* */ }
/* */
/* */ public SubordinateAtomicAction(int timeout, Xid xid)
/* */ {
/* 67 */ super(timeout);
/* */
/* 69 */ this._theXid = new XidImple(xid);
/* */ }
/* */
/* */ public String type()
/* */ {
/* 84 */ return getType();
/* */ }
/* */
/* */ public static final String getType()
/* */ {
/* 89 */ return "/StateManager/BasicAction/TwoPhaseCoordinator/AtomicAction/SubordinateAtomicAction/JCA";
/* */ }
/* */
/* */ public final Xid getXid()
/* */ {
/* 94 */ return this._theXid;
/* */ }
/* */
/* */ public boolean save_state(OutputObjectState os, int t)
/* */ {
/* 99 */ if (this._theXid != null)
/* */ {
/* */ try
/* */ {
/* 103 */ os.packBoolean(true);
/* */
/* 105 */ ((XidImple)this._theXid).packInto(os);
/* */ }
/* */ catch (IOException ex)
/* */ {
/* 109 */ return false;
/* */ }
/* */ }
/* */
/* 113 */ return super.save_state(os, t);
/* */ }
/* */
/* */ public boolean restore_state(InputObjectState os, int t)
/* */ {
/* */ try
/* */ {
/* 120 */ boolean haveXid = os.unpackBoolean();
/* */
/* 122 */ if (haveXid)
/* */ {
/* 124 */ this._theXid = new XidImple();
/* */
/* 126 */ ((XidImple)this._theXid).unpackFrom(os);
/* */ }
/* */ }
/* */ catch (IOException ex)
/* */ {
/* 131 */ return false;
/* */ }
/* */
/* 134 */ return super.restore_state(os, t);
/* */ }
/* */ }
/* Location: /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/jboss-embedded-all.jar
* Qualified Name: com.arjuna.ats.internal.jta.transaction.arjunacore.subordinate.jca.SubordinateAtomicAction
* JD-Core Version: 0.6.0
*/