Package org.jboss.tm.iiop

Source Code of org.jboss.tm.iiop._TransactionServiceStub

/*      */ package org.jboss.tm.iiop;
/*      */
/*      */ import org.omg.CORBA.UNKNOWN;
/*      */ import org.omg.CORBA.portable.ApplicationException;
/*      */ import org.omg.CORBA.portable.InputStream;
/*      */ import org.omg.CORBA.portable.ObjectImpl;
/*      */ import org.omg.CORBA.portable.OutputStream;
/*      */ import org.omg.CORBA.portable.RemarshalException;
/*      */ import org.omg.CORBA.portable.ServantObject;
/*      */ import org.omg.CosTransactions.Control;
/*      */ import org.omg.CosTransactions.ControlHelper;
/*      */ import org.omg.CosTransactions.Coordinator;
/*      */ import org.omg.CosTransactions.CoordinatorHelper;
/*      */ import org.omg.CosTransactions.HeuristicHazard;
/*      */ import org.omg.CosTransactions.HeuristicHazardHelper;
/*      */ import org.omg.CosTransactions.HeuristicMixed;
/*      */ import org.omg.CosTransactions.HeuristicMixedHelper;
/*      */ import org.omg.CosTransactions.Inactive;
/*      */ import org.omg.CosTransactions.InactiveHelper;
/*      */ import org.omg.CosTransactions.NotPrepared;
/*      */ import org.omg.CosTransactions.NotPreparedHelper;
/*      */ import org.omg.CosTransactions.NotSubtransaction;
/*      */ import org.omg.CosTransactions.NotSubtransactionHelper;
/*      */ import org.omg.CosTransactions.PropagationContext;
/*      */ import org.omg.CosTransactions.PropagationContextHelper;
/*      */ import org.omg.CosTransactions.RecoveryCoordinator;
/*      */ import org.omg.CosTransactions.RecoveryCoordinatorHelper;
/*      */ import org.omg.CosTransactions.Resource;
/*      */ import org.omg.CosTransactions.ResourceHelper;
/*      */ import org.omg.CosTransactions.Status;
/*      */ import org.omg.CosTransactions.StatusHelper;
/*      */ import org.omg.CosTransactions.SubtransactionAwareResource;
/*      */ import org.omg.CosTransactions.SubtransactionAwareResourceHelper;
/*      */ import org.omg.CosTransactions.SubtransactionsUnavailable;
/*      */ import org.omg.CosTransactions.SubtransactionsUnavailableHelper;
/*      */ import org.omg.CosTransactions.Synchronization;
/*      */ import org.omg.CosTransactions.SynchronizationHelper;
/*      */ import org.omg.CosTransactions.SynchronizationUnavailable;
/*      */ import org.omg.CosTransactions.SynchronizationUnavailableHelper;
/*      */ import org.omg.CosTransactions.Terminator;
/*      */ import org.omg.CosTransactions.TerminatorHelper;
/*      */ import org.omg.CosTransactions.Unavailable;
/*      */ import org.omg.CosTransactions.UnavailableHelper;
/*      */
/*      */ public class _TransactionServiceStub extends ObjectImpl
/*      */   implements TransactionService
/*      */ {
/*   15 */   private String[] ids = { "IDL:org/jboss/tm/iiop/TransactionService:1.0", "IDL:omg.org/CosTransactions/Control:1.0", "IDL:org/jboss/tm/iiop/CoordinatorExt:1.0", "IDL:omg.org/CosTransactions/Terminator:1.0", "IDL:org/jboss/tm/iiop/TransactionFactoryExt:1.0", "IDL:omg.org/CosTransactions/TransactionFactory:1.0", "IDL:omg.org/CosTransactions/RecoveryCoordinator:1.0", "IDL:omg.org/CosTransactions/Coordinator:1.0" };
/*      */
/*   21 */   public static final Class _opsClass = TransactionServiceOperations.class;
/*      */
/*      */   public String[] _ids()
/*      */   {
/*   18 */     return this.ids;
/*      */   }
/*      */
/*      */   public Status get_top_level_status()
/*      */   {
/*   26 */     while (!_is_local())
/*      */     {
/*   28 */       InputStream _is = null;
/*      */       try
/*      */       {
/*   31 */         OutputStream _os = _request("get_top_level_status", true);
/*   32 */         _is = _invoke(_os);
/*   33 */         Status _result = StatusHelper.read(_is);
/*   34 */         Status localStatus1 = _result;
/*      */         return localStatus1;
/*      */       }
/*      */       catch (RemarshalException _rx)
/*      */       {
/*      */       }
/*      */       catch (ApplicationException _ax)
/*      */       {
/*   39 */         String _id = _ax.getId();
/*   40 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/*   44 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/*   49 */     ServantObject _so = _servant_preinvoke("get_top_level_status", _opsClass);
/*   50 */     if (_so == null)
/*   51 */       throw new UNKNOWN("local invocations not supported!"); TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     Status _result;
/*      */     try {
/*   56 */       _result = _localServant.get_top_level_status();
/*      */     }
/*      */     finally
/*      */     {
/*   60 */       _servant_postinvoke(_so);
/*      */     }
/*   62 */     return _result;
/*      */   }
/*      */
/*      */   public RecoveryCoordinator register_resource(Resource r)
/*      */     throws Inactive
/*      */   {
/*   73 */     while (!_is_local())
/*      */     {
/*   75 */       InputStream _is = null;
/*      */       try
/*      */       {
/*   78 */         OutputStream _os = _request("register_resource", true);
/*   79 */         ResourceHelper.write(_os, r);
/*   80 */         _is = _invoke(_os);
/*   81 */         RecoveryCoordinator _result = RecoveryCoordinatorHelper.read(_is);
/*   82 */         RecoveryCoordinator localRecoveryCoordinator1 = _result;
/*      */         return localRecoveryCoordinator1;
/*      */       }
/*      */       catch (RemarshalException _rx)
/*      */       {
/*      */       }
/*      */       catch (ApplicationException _ax)
/*      */       {
/*   87 */         String _id = _ax.getId();
/*   88 */         if (_id.equals("IDL:omg.org/CosTransactions/Inactive:1.0"))
/*      */         {
/*   90 */           throw InactiveHelper.read(_ax.getInputStream());
/*      */         }
/*   92 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/*   96 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/*  101 */     ServantObject _so = _servant_preinvoke("register_resource", _opsClass);
/*  102 */     if (_so == null)
/*  103 */       throw new UNKNOWN("local invocations not supported!"); TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     RecoveryCoordinator _result;
/*      */     try {
/*  108 */       _result = _localServant.register_resource(r);
/*      */     }
/*      */     finally
/*      */     {
/*  112 */       _servant_postinvoke(_so);
/*      */     }
/*  114 */     return _result;
/*      */   }
/*      */
/*      */   public Status replay_completion(Resource r)
/*      */     throws NotPrepared
/*      */   {
/*  125 */     while (!_is_local())
/*      */     {
/*  127 */       InputStream _is = null;
/*      */       try
/*      */       {
/*  130 */         OutputStream _os = _request("replay_completion", true);
/*  131 */         ResourceHelper.write(_os, r);
/*  132 */         _is = _invoke(_os);
/*  133 */         Status _result = StatusHelper.read(_is);
/*  134 */         Status localStatus1 = _result;
/*      */         return localStatus1;
/*      */       }
/*      */       catch (RemarshalException _rx)
/*      */       {
/*      */       }
/*      */       catch (ApplicationException _ax)
/*      */       {
/*  139 */         String _id = _ax.getId();
/*  140 */         if (_id.equals("IDL:omg.org/CosTransactions/NotPrepared:1.0"))
/*      */         {
/*  142 */           throw NotPreparedHelper.read(_ax.getInputStream());
/*      */         }
/*  144 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/*  148 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/*  153 */     ServantObject _so = _servant_preinvoke("replay_completion", _opsClass);
/*  154 */     if (_so == null)
/*  155 */       throw new UNKNOWN("local invocations not supported!"); TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     Status _result;
/*      */     try {
/*  160 */       _result = _localServant.replay_completion(r);
/*      */     }
/*      */     finally
/*      */     {
/*  164 */       _servant_postinvoke(_so);
/*      */     }
/*  166 */     return _result;
/*      */   }
/*      */
/*      */   public Control create_subtransaction()
/*      */     throws SubtransactionsUnavailable, Inactive
/*      */   {
/*  177 */     while (!_is_local())
/*      */     {
/*  179 */       InputStream _is = null;
/*      */       try
/*      */       {
/*  182 */         OutputStream _os = _request("create_subtransaction", true);
/*  183 */         _is = _invoke(_os);
/*  184 */         Control _result = ControlHelper.read(_is);
/*  185 */         Control localControl1 = _result;
/*      */         return localControl1;
/*      */       }
/*      */       catch (RemarshalException _rx)
/*      */       {
/*      */       }
/*      */       catch (ApplicationException _ax)
/*      */       {
/*  190 */         String _id = _ax.getId();
/*  191 */         if (_id.equals("IDL:omg.org/CosTransactions/SubtransactionsUnavailable:1.0"))
/*      */         {
/*  193 */           throw SubtransactionsUnavailableHelper.read(_ax.getInputStream());
/*      */         }
/*  195 */         if (_id.equals("IDL:omg.org/CosTransactions/Inactive:1.0"))
/*      */         {
/*  197 */           throw InactiveHelper.read(_ax.getInputStream());
/*      */         }
/*  199 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/*  203 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/*  208 */     ServantObject _so = _servant_preinvoke("create_subtransaction", _opsClass);
/*  209 */     if (_so == null)
/*  210 */       throw new UNKNOWN("local invocations not supported!"); TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     Control _result;
/*      */     try {
/*  215 */       _result = _localServant.create_subtransaction();
/*      */     }
/*      */     finally
/*      */     {
/*  219 */       _servant_postinvoke(_so);
/*      */     }
/*  221 */     return _result;
/*      */   }
/*      */
/*      */   public void commit(boolean report_heuristics)
/*      */     throws HeuristicHazard, HeuristicMixed
/*      */   {
/*  232 */     while (!_is_local())
/*      */     {
/*  234 */       InputStream _is = null;
/*      */       try {
/*  237 */         OutputStream _os = _request("commit", true);
/*  238 */         _os.write_boolean(report_heuristics);
/*  239 */         _is = _invoke(_os);
/*      */         return; } catch (RemarshalException _rx) {
/*      */       } catch (ApplicationException _ax) {
/*  245 */         String _id = _ax.getId();
/*  246 */         if (_id.equals("IDL:omg.org/CosTransactions/HeuristicHazard:1.0"))
/*      */         {
/*  248 */           throw HeuristicHazardHelper.read(_ax.getInputStream());
/*      */         }
/*  250 */         if (_id.equals("IDL:omg.org/CosTransactions/HeuristicMixed:1.0"))
/*      */         {
/*  252 */           throw HeuristicMixedHelper.read(_ax.getInputStream());
/*      */         }
/*  254 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/*  258 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/*  263 */     ServantObject _so = _servant_preinvoke("commit", _opsClass);
/*  264 */     if (_so == null)
/*  265 */       throw new UNKNOWN("local invocations not supported!");
/*  266 */     TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     try
/*      */     {
/*  269 */       _localServant.commit(report_heuristics);
/*      */     }
/*      */     finally
/*      */     {
/*  273 */       _servant_postinvoke(_so);
/*      */     }
/*      */   }
/*      */
/*      */   public boolean is_related_transaction(Coordinator tc)
/*      */   {
/*  286 */     while (!_is_local())
/*      */     {
/*  288 */       InputStream _is = null;
/*      */       try
/*      */       {
/*  291 */         OutputStream _os = _request("is_related_transaction", true);
/*  292 */         CoordinatorHelper.write(_os, tc);
/*  293 */         _is = _invoke(_os);
/*  294 */         boolean _result = _is.read_boolean();
/*  295 */         boolean bool1 = _result;
/*      */         return bool1;
/*      */       }
/*      */       catch (RemarshalException _rx)
/*      */       {
/*      */       }
/*      */       catch (ApplicationException _ax)
/*      */       {
/*  300 */         String _id = _ax.getId();
/*  301 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/*  305 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/*  310 */     ServantObject _so = _servant_preinvoke("is_related_transaction", _opsClass);
/*  311 */     if (_so == null)
/*  312 */       throw new UNKNOWN("local invocations not supported!"); TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     boolean _result;
/*      */     try {
/*  317 */       _result = _localServant.is_related_transaction(tc);
/*      */     }
/*      */     finally
/*      */     {
/*  321 */       _servant_postinvoke(_so);
/*      */     }
/*  323 */     return _result;
/*      */   }
/*      */
/*      */   public void rollback_only()
/*      */     throws Inactive
/*      */   {
/*  334 */     while (!_is_local())
/*      */     {
/*  336 */       InputStream _is = null;
/*      */       try {
/*  339 */         OutputStream _os = _request("rollback_only", true);
/*  340 */         _is = _invoke(_os);
/*      */         return;
/*      */       } catch (RemarshalException _rx) {
/*      */       } catch (ApplicationException _ax) {
/*  346 */         String _id = _ax.getId();
/*  347 */         if (_id.equals("IDL:omg.org/CosTransactions/Inactive:1.0"))
/*      */         {
/*  349 */           throw InactiveHelper.read(_ax.getInputStream());
/*      */         }
/*  351 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/*  355 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/*  360 */     ServantObject _so = _servant_preinvoke("rollback_only", _opsClass);
/*  361 */     if (_so == null)
/*  362 */       throw new UNKNOWN("local invocations not supported!");
/*  363 */     TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     try
/*      */     {
/*  366 */       _localServant.rollback_only();
/*      */     }
/*      */     finally
/*      */     {
/*  370 */       _servant_postinvoke(_so);
/*      */     }
/*      */   }
/*      */
/*      */   public boolean is_ancestor_transaction(Coordinator tc)
/*      */   {
/*  383 */     while (!_is_local())
/*      */     {
/*  385 */       InputStream _is = null;
/*      */       try
/*      */       {
/*  388 */         OutputStream _os = _request("is_ancestor_transaction", true);
/*  389 */         CoordinatorHelper.write(_os, tc);
/*  390 */         _is = _invoke(_os);
/*  391 */         boolean _result = _is.read_boolean();
/*  392 */         boolean bool1 = _result;
/*      */         return bool1;
/*      */       }
/*      */       catch (RemarshalException _rx)
/*      */       {
/*      */       }
/*      */       catch (ApplicationException _ax)
/*      */       {
/*  397 */         String _id = _ax.getId();
/*  398 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/*  402 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/*  407 */     ServantObject _so = _servant_preinvoke("is_ancestor_transaction", _opsClass);
/*  408 */     if (_so == null)
/*  409 */       throw new UNKNOWN("local invocations not supported!"); TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     boolean _result;
/*      */     try {
/*  414 */       _result = _localServant.is_ancestor_transaction(tc);
/*      */     }
/*      */     finally
/*      */     {
/*  418 */       _servant_postinvoke(_so);
/*      */     }
/*  420 */     return _result;
/*      */   }
/*      */
/*      */   public boolean is_same_transaction(Coordinator tc)
/*      */   {
/*  431 */     while (!_is_local())
/*      */     {
/*  433 */       InputStream _is = null;
/*      */       try
/*      */       {
/*  436 */         OutputStream _os = _request("is_same_transaction", true);
/*  437 */         CoordinatorHelper.write(_os, tc);
/*  438 */         _is = _invoke(_os);
/*  439 */         boolean _result = _is.read_boolean();
/*  440 */         boolean bool1 = _result;
/*      */         return bool1;
/*      */       }
/*      */       catch (RemarshalException _rx)
/*      */       {
/*      */       }
/*      */       catch (ApplicationException _ax)
/*      */       {
/*  445 */         String _id = _ax.getId();
/*  446 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/*  450 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/*  455 */     ServantObject _so = _servant_preinvoke("is_same_transaction", _opsClass);
/*  456 */     if (_so == null)
/*  457 */       throw new UNKNOWN("local invocations not supported!"); TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     boolean _result;
/*      */     try {
/*  462 */       _result = _localServant.is_same_transaction(tc);
/*      */     }
/*      */     finally
/*      */     {
/*  466 */       _servant_postinvoke(_so);
/*      */     }
/*  468 */     return _result;
/*      */   }
/*      */
/*      */   public Terminator get_terminator()
/*      */     throws Unavailable
/*      */   {
/*  479 */     while (!_is_local())
/*      */     {
/*  481 */       InputStream _is = null;
/*      */       try
/*      */       {
/*  484 */         OutputStream _os = _request("get_terminator", true);
/*  485 */         _is = _invoke(_os);
/*  486 */         Terminator _result = TerminatorHelper.read(_is);
/*  487 */         Terminator localTerminator1 = _result;
/*      */         return localTerminator1;
/*      */       }
/*      */       catch (RemarshalException _rx)
/*      */       {
/*      */       }
/*      */       catch (ApplicationException _ax)
/*      */       {
/*  492 */         String _id = _ax.getId();
/*  493 */         if (_id.equals("IDL:omg.org/CosTransactions/Unavailable:1.0"))
/*      */         {
/*  495 */           throw UnavailableHelper.read(_ax.getInputStream());
/*      */         }
/*  497 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/*  501 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/*  506 */     ServantObject _so = _servant_preinvoke("get_terminator", _opsClass);
/*  507 */     if (_so == null)
/*  508 */       throw new UNKNOWN("local invocations not supported!"); TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     Terminator _result;
/*      */     try {
/*  513 */       _result = _localServant.get_terminator();
/*      */     }
/*      */     finally
/*      */     {
/*  517 */       _servant_postinvoke(_so);
/*      */     }
/*  519 */     return _result;
/*      */   }
/*      */
/*      */   public int hash_transaction()
/*      */   {
/*  530 */     while (!_is_local())
/*      */     {
/*  532 */       InputStream _is = null;
/*      */       try
/*      */       {
/*  535 */         OutputStream _os = _request("hash_transaction", true);
/*  536 */         _is = _invoke(_os);
/*  537 */         int _result = _is.read_ulong();
/*  538 */         int i = _result;
/*      */         return i;
/*      */       }
/*      */       catch (RemarshalException _rx)
/*      */       {
/*      */       }
/*      */       catch (ApplicationException _ax)
/*      */       {
/*  543 */         String _id = _ax.getId();
/*  544 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/*  548 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/*  553 */     ServantObject _so = _servant_preinvoke("hash_transaction", _opsClass);
/*  554 */     if (_so == null)
/*  555 */       throw new UNKNOWN("local invocations not supported!"); TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     int _result;
/*      */     try {
/*  560 */       _result = _localServant.hash_transaction();
/*      */     }
/*      */     finally
/*      */     {
/*  564 */       _servant_postinvoke(_so);
/*      */     }
/*  566 */     return _result;
/*      */   }
/*      */
/*      */   public Status get_status()
/*      */   {
/*  577 */     while (!_is_local())
/*      */     {
/*  579 */       InputStream _is = null;
/*      */       try
/*      */       {
/*  582 */         OutputStream _os = _request("get_status", true);
/*  583 */         _is = _invoke(_os);
/*  584 */         Status _result = StatusHelper.read(_is);
/*  585 */         Status localStatus1 = _result;
/*      */         return localStatus1;
/*      */       }
/*      */       catch (RemarshalException _rx)
/*      */       {
/*      */       }
/*      */       catch (ApplicationException _ax)
/*      */       {
/*  590 */         String _id = _ax.getId();
/*  591 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/*  595 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/*  600 */     ServantObject _so = _servant_preinvoke("get_status", _opsClass);
/*  601 */     if (_so == null)
/*  602 */       throw new UNKNOWN("local invocations not supported!"); TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     Status _result;
/*      */     try {
/*  607 */       _result = _localServant.get_status();
/*      */     }
/*      */     finally
/*      */     {
/*  611 */       _servant_postinvoke(_so);
/*      */     }
/*  613 */     return _result;
/*      */   }
/*      */
/*      */   public int hash_top_level_tran()
/*      */   {
/*  624 */     while (!_is_local())
/*      */     {
/*  626 */       InputStream _is = null;
/*      */       try
/*      */       {
/*  629 */         OutputStream _os = _request("hash_top_level_tran", true);
/*  630 */         _is = _invoke(_os);
/*  631 */         int _result = _is.read_ulong();
/*  632 */         int i = _result;
/*      */         return i;
/*      */       }
/*      */       catch (RemarshalException _rx)
/*      */       {
/*      */       }
/*      */       catch (ApplicationException _ax)
/*      */       {
/*  637 */         String _id = _ax.getId();
/*  638 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/*  642 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/*  647 */     ServantObject _so = _servant_preinvoke("hash_top_level_tran", _opsClass);
/*  648 */     if (_so == null)
/*  649 */       throw new UNKNOWN("local invocations not supported!"); TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     int _result;
/*      */     try {
/*  654 */       _result = _localServant.hash_top_level_tran();
/*      */     }
/*      */     finally
/*      */     {
/*  658 */       _servant_postinvoke(_so);
/*      */     }
/*  660 */     return _result;
/*      */   }
/*      */
/*      */   public Coordinator get_coordinator()
/*      */     throws Unavailable
/*      */   {
/*  671 */     while (!_is_local())
/*      */     {
/*  673 */       InputStream _is = null;
/*      */       try
/*      */       {
/*  676 */         OutputStream _os = _request("get_coordinator", true);
/*  677 */         _is = _invoke(_os);
/*  678 */         Coordinator _result = CoordinatorHelper.read(_is);
/*  679 */         Coordinator localCoordinator1 = _result;
/*      */         return localCoordinator1;
/*      */       }
/*      */       catch (RemarshalException _rx)
/*      */       {
/*      */       }
/*      */       catch (ApplicationException _ax)
/*      */       {
/*  684 */         String _id = _ax.getId();
/*  685 */         if (_id.equals("IDL:omg.org/CosTransactions/Unavailable:1.0"))
/*      */         {
/*  687 */           throw UnavailableHelper.read(_ax.getInputStream());
/*      */         }
/*  689 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/*  693 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/*  698 */     ServantObject _so = _servant_preinvoke("get_coordinator", _opsClass);
/*  699 */     if (_so == null)
/*  700 */       throw new UNKNOWN("local invocations not supported!"); TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     Coordinator _result;
/*      */     try {
/*  705 */       _result = _localServant.get_coordinator();
/*      */     }
/*      */     finally
/*      */     {
/*  709 */       _servant_postinvoke(_so);
/*      */     }
/*  711 */     return _result;
/*      */   }
/*      */
/*      */   public void register_synchronization(Synchronization sync)
/*      */     throws SynchronizationUnavailable, Inactive
/*      */   {
/*  722 */     while (!_is_local())
/*      */     {
/*  724 */       InputStream _is = null;
/*      */       try {
/*  727 */         OutputStream _os = _request("register_synchronization", true);
/*  728 */         SynchronizationHelper.write(_os, sync);
/*  729 */         _is = _invoke(_os);
/*      */         return; } catch (RemarshalException _rx) {
/*      */       } catch (ApplicationException _ax) {
/*  735 */         String _id = _ax.getId();
/*  736 */         if (_id.equals("IDL:omg.org/CosTransactions/SynchronizationUnavailable:1.0"))
/*      */         {
/*  738 */           throw SynchronizationUnavailableHelper.read(_ax.getInputStream());
/*      */         }
/*  740 */         if (_id.equals("IDL:omg.org/CosTransactions/Inactive:1.0"))
/*      */         {
/*  742 */           throw InactiveHelper.read(_ax.getInputStream());
/*      */         }
/*  744 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/*  748 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/*  753 */     ServantObject _so = _servant_preinvoke("register_synchronization", _opsClass);
/*  754 */     if (_so == null)
/*  755 */       throw new UNKNOWN("local invocations not supported!");
/*  756 */     TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     try
/*      */     {
/*  759 */       _localServant.register_synchronization(sync);
/*      */     }
/*      */     finally
/*      */     {
/*  763 */       _servant_postinvoke(_so);
/*      */     }
/*      */   }
/*      */
/*      */   public boolean is_top_level_transaction()
/*      */   {
/*  776 */     while (!_is_local())
/*      */     {
/*  778 */       InputStream _is = null;
/*      */       try
/*      */       {
/*  781 */         OutputStream _os = _request("is_top_level_transaction", true);
/*  782 */         _is = _invoke(_os);
/*  783 */         boolean _result = _is.read_boolean();
/*  784 */         boolean bool1 = _result;
/*      */         return bool1;
/*      */       }
/*      */       catch (RemarshalException _rx)
/*      */       {
/*      */       }
/*      */       catch (ApplicationException _ax)
/*      */       {
/*  789 */         String _id = _ax.getId();
/*  790 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/*  794 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/*  799 */     ServantObject _so = _servant_preinvoke("is_top_level_transaction", _opsClass);
/*  800 */     if (_so == null)
/*  801 */       throw new UNKNOWN("local invocations not supported!"); TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     boolean _result;
/*      */     try {
/*  806 */       _result = _localServant.is_top_level_transaction();
/*      */     }
/*      */     finally
/*      */     {
/*  810 */       _servant_postinvoke(_so);
/*      */     }
/*  812 */     return _result;
/*      */   }
/*      */
/*      */   public Status get_parent_status()
/*      */   {
/*  823 */     while (!_is_local())
/*      */     {
/*  825 */       InputStream _is = null;
/*      */       try
/*      */       {
/*  828 */         OutputStream _os = _request("get_parent_status", true);
/*  829 */         _is = _invoke(_os);
/*  830 */         Status _result = StatusHelper.read(_is);
/*  831 */         Status localStatus1 = _result;
/*      */         return localStatus1;
/*      */       }
/*      */       catch (RemarshalException _rx)
/*      */       {
/*      */       }
/*      */       catch (ApplicationException _ax)
/*      */       {
/*  836 */         String _id = _ax.getId();
/*  837 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/*  841 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/*  846 */     ServantObject _so = _servant_preinvoke("get_parent_status", _opsClass);
/*  847 */     if (_so == null)
/*  848 */       throw new UNKNOWN("local invocations not supported!"); TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     Status _result;
/*      */     try {
/*  853 */       _result = _localServant.get_parent_status();
/*      */     }
/*      */     finally
/*      */     {
/*  857 */       _servant_postinvoke(_so);
/*      */     }
/*  859 */     return _result;
/*      */   }
/*      */
/*      */   public TransactionDesc create_transaction(int time_out)
/*      */   {
/*  870 */     while (!_is_local())
/*      */     {
/*  872 */       InputStream _is = null;
/*      */       try
/*      */       {
/*  875 */         OutputStream _os = _request("create_transaction", true);
/*  876 */         _os.write_ulong(time_out);
/*  877 */         _is = _invoke(_os);
/*  878 */         TransactionDesc _result = TransactionDescHelper.read(_is);
/*  879 */         TransactionDesc localTransactionDesc1 = _result;
/*      */         return localTransactionDesc1;
/*      */       }
/*      */       catch (RemarshalException _rx)
/*      */       {
/*      */       }
/*      */       catch (ApplicationException _ax)
/*      */       {
/*  884 */         String _id = _ax.getId();
/*  885 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/*  889 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/*  894 */     ServantObject _so = _servant_preinvoke("create_transaction", _opsClass);
/*  895 */     if (_so == null)
/*  896 */       throw new UNKNOWN("local invocations not supported!"); TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     TransactionDesc _result;
/*      */     try {
/*  901 */       _result = _localServant.create_transaction(time_out);
/*      */     }
/*      */     finally
/*      */     {
/*  905 */       _servant_postinvoke(_so);
/*      */     }
/*  907 */     return _result;
/*      */   }
/*      */
/*      */   public PropagationContext get_txcontext()
/*      */     throws Unavailable
/*      */   {
/*  918 */     while (!_is_local())
/*      */     {
/*  920 */       InputStream _is = null;
/*      */       try
/*      */       {
/*  923 */         OutputStream _os = _request("get_txcontext", true);
/*  924 */         _is = _invoke(_os);
/*  925 */         PropagationContext _result = PropagationContextHelper.read(_is);
/*  926 */         PropagationContext localPropagationContext1 = _result;
/*      */         return localPropagationContext1;
/*      */       }
/*      */       catch (RemarshalException _rx)
/*      */       {
/*      */       }
/*      */       catch (ApplicationException _ax)
/*      */       {
/*  931 */         String _id = _ax.getId();
/*  932 */         if (_id.equals("IDL:omg.org/CosTransactions/Unavailable:1.0"))
/*      */         {
/*  934 */           throw UnavailableHelper.read(_ax.getInputStream());
/*      */         }
/*  936 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/*  940 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/*  945 */     ServantObject _so = _servant_preinvoke("get_txcontext", _opsClass);
/*  946 */     if (_so == null)
/*  947 */       throw new UNKNOWN("local invocations not supported!"); TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     PropagationContext _result;
/*      */     try {
/*  952 */       _result = _localServant.get_txcontext();
/*      */     }
/*      */     finally
/*      */     {
/*  956 */       _servant_postinvoke(_so);
/*      */     }
/*  958 */     return _result;
/*      */   }
/*      */
/*      */   public String get_transaction_name()
/*      */   {
/*  969 */     while (!_is_local())
/*      */     {
/*  971 */       InputStream _is = null;
/*      */       try
/*      */       {
/*  974 */         OutputStream _os = _request("get_transaction_name", true);
/*  975 */         _is = _invoke(_os);
/*  976 */         String _result = _is.read_string();
/*  977 */         String str1 = _result;
/*      */         return str1;
/*      */       }
/*      */       catch (RemarshalException _rx)
/*      */       {
/*      */       }
/*      */       catch (ApplicationException _ax)
/*      */       {
/*  982 */         String _id = _ax.getId();
/*  983 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/*  987 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/*  992 */     ServantObject _so = _servant_preinvoke("get_transaction_name", _opsClass);
/*  993 */     if (_so == null)
/*  994 */       throw new UNKNOWN("local invocations not supported!"); TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     String _result;
/*      */     try {
/*  999 */       _result = _localServant.get_transaction_name();
/*      */     }
/*      */     finally
/*      */     {
/* 1003 */       _servant_postinvoke(_so);
/*      */     }
/* 1005 */     return _result;
/*      */   }
/*      */
/*      */   public TransactionId get_transaction_id()
/*      */   {
/* 1016 */     while (!_is_local())
/*      */     {
/* 1018 */       InputStream _is = null;
/*      */       try
/*      */       {
/* 1021 */         OutputStream _os = _request("get_transaction_id", true);
/* 1022 */         _is = _invoke(_os);
/* 1023 */         TransactionId _result = TransactionIdHelper.read(_is);
/* 1024 */         TransactionId localTransactionId1 = _result;
/*      */         return localTransactionId1;
/*      */       }
/*      */       catch (RemarshalException _rx)
/*      */       {
/*      */       }
/*      */       catch (ApplicationException _ax)
/*      */       {
/* 1029 */         String _id = _ax.getId();
/* 1030 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/* 1034 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/* 1039 */     ServantObject _so = _servant_preinvoke("get_transaction_id", _opsClass);
/* 1040 */     if (_so == null)
/* 1041 */       throw new UNKNOWN("local invocations not supported!"); TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     TransactionId _result;
/*      */     try {
/* 1046 */       _result = _localServant.get_transaction_id();
/*      */     }
/*      */     finally
/*      */     {
/* 1050 */       _servant_postinvoke(_so);
/*      */     }
/* 1052 */     return _result;
/*      */   }
/*      */
/*      */   public Control recreate(PropagationContext ctx)
/*      */   {
/* 1063 */     while (!_is_local())
/*      */     {
/* 1065 */       InputStream _is = null;
/*      */       try
/*      */       {
/* 1068 */         OutputStream _os = _request("recreate", true);
/* 1069 */         PropagationContextHelper.write(_os, ctx);
/* 1070 */         _is = _invoke(_os);
/* 1071 */         Control _result = ControlHelper.read(_is);
/* 1072 */         Control localControl1 = _result;
/*      */         return localControl1;
/*      */       }
/*      */       catch (RemarshalException _rx)
/*      */       {
/*      */       }
/*      */       catch (ApplicationException _ax)
/*      */       {
/* 1077 */         String _id = _ax.getId();
/* 1078 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/* 1082 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/* 1087 */     ServantObject _so = _servant_preinvoke("recreate", _opsClass);
/* 1088 */     if (_so == null)
/* 1089 */       throw new UNKNOWN("local invocations not supported!"); TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     Control _result;
/*      */     try {
/* 1094 */       _result = _localServant.recreate(ctx);
/*      */     }
/*      */     finally
/*      */     {
/* 1098 */       _servant_postinvoke(_so);
/*      */     }
/* 1100 */     return _result;
/*      */   }
/*      */
/*      */   public Control create(int time_out)
/*      */   {
/* 1111 */     while (!_is_local())
/*      */     {
/* 1113 */       InputStream _is = null;
/*      */       try
/*      */       {
/* 1116 */         OutputStream _os = _request("create", true);
/* 1117 */         _os.write_ulong(time_out);
/* 1118 */         _is = _invoke(_os);
/* 1119 */         Control _result = ControlHelper.read(_is);
/* 1120 */         Control localControl1 = _result;
/*      */         return localControl1;
/*      */       }
/*      */       catch (RemarshalException _rx)
/*      */       {
/*      */       }
/*      */       catch (ApplicationException _ax)
/*      */       {
/* 1125 */         String _id = _ax.getId();
/* 1126 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/* 1130 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/* 1135 */     ServantObject _so = _servant_preinvoke("create", _opsClass);
/* 1136 */     if (_so == null)
/* 1137 */       throw new UNKNOWN("local invocations not supported!"); TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     Control _result;
/*      */     try {
/* 1142 */       _result = _localServant.create(time_out);
/*      */     }
/*      */     finally
/*      */     {
/* 1146 */       _servant_postinvoke(_so);
/*      */     }
/* 1148 */     return _result;
/*      */   }
/*      */
/*      */   public void register_subtran_aware(SubtransactionAwareResource r)
/*      */     throws NotSubtransaction, Inactive
/*      */   {
/* 1159 */     while (!_is_local())
/*      */     {
/* 1161 */       InputStream _is = null;
/*      */       try {
/* 1164 */         OutputStream _os = _request("register_subtran_aware", true);
/* 1165 */         SubtransactionAwareResourceHelper.write(_os, r);
/* 1166 */         _is = _invoke(_os);
/*      */         return; } catch (RemarshalException _rx) {
/*      */       } catch (ApplicationException _ax) {
/* 1172 */         String _id = _ax.getId();
/* 1173 */         if (_id.equals("IDL:omg.org/CosTransactions/NotSubtransaction:1.0"))
/*      */         {
/* 1175 */           throw NotSubtransactionHelper.read(_ax.getInputStream());
/*      */         }
/* 1177 */         if (_id.equals("IDL:omg.org/CosTransactions/Inactive:1.0"))
/*      */         {
/* 1179 */           throw InactiveHelper.read(_ax.getInputStream());
/*      */         }
/* 1181 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/* 1185 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/* 1190 */     ServantObject _so = _servant_preinvoke("register_subtran_aware", _opsClass);
/* 1191 */     if (_so == null)
/* 1192 */       throw new UNKNOWN("local invocations not supported!");
/* 1193 */     TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     try
/*      */     {
/* 1196 */       _localServant.register_subtran_aware(r);
/*      */     }
/*      */     finally
/*      */     {
/* 1200 */       _servant_postinvoke(_so);
/*      */     }
/*      */   }
/*      */
/*      */   public boolean is_descendant_transaction(Coordinator tc)
/*      */   {
/* 1213 */     while (!_is_local())
/*      */     {
/* 1215 */       InputStream _is = null;
/*      */       try
/*      */       {
/* 1218 */         OutputStream _os = _request("is_descendant_transaction", true);
/* 1219 */         CoordinatorHelper.write(_os, tc);
/* 1220 */         _is = _invoke(_os);
/* 1221 */         boolean _result = _is.read_boolean();
/* 1222 */         boolean bool1 = _result;
/*      */         return bool1;
/*      */       }
/*      */       catch (RemarshalException _rx)
/*      */       {
/*      */       }
/*      */       catch (ApplicationException _ax)
/*      */       {
/* 1227 */         String _id = _ax.getId();
/* 1228 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/* 1232 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/* 1237 */     ServantObject _so = _servant_preinvoke("is_descendant_transaction", _opsClass);
/* 1238 */     if (_so == null)
/* 1239 */       throw new UNKNOWN("local invocations not supported!"); TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     boolean _result;
/*      */     try {
/* 1244 */       _result = _localServant.is_descendant_transaction(tc);
/*      */     }
/*      */     finally
/*      */     {
/* 1248 */       _servant_postinvoke(_so);
/*      */     }
/* 1250 */     return _result;
/*      */   }
/*      */
/*      */   public void rollback()
/*      */   {
/* 1261 */     while (!_is_local())
/*      */     {
/* 1263 */       InputStream _is = null;
/*      */       try {
/* 1266 */         OutputStream _os = _request("rollback", true);
/* 1267 */         _is = _invoke(_os);
/*      */         return;
/*      */       } catch (RemarshalException _rx) {
/*      */       } catch (ApplicationException _ax) {
/* 1273 */         String _id = _ax.getId();
/* 1274 */         throw new RuntimeException("Unexpected exception " + _id);
/*      */       }
/*      */       finally
/*      */       {
/* 1278 */         _releaseReply(_is);
/*      */       }
/*      */
/*      */     }
/*      */
/* 1283 */     ServantObject _so = _servant_preinvoke("rollback", _opsClass);
/* 1284 */     if (_so == null)
/* 1285 */       throw new UNKNOWN("local invocations not supported!");
/* 1286 */     TransactionServiceOperations _localServant = (TransactionServiceOperations)_so.servant;
/*      */     try
/*      */     {
/* 1289 */       _localServant.rollback();
/*      */     }
/*      */     finally
/*      */     {
/* 1293 */       _servant_postinvoke(_so);
/*      */     }
/*      */   }
/*      */ }

/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/jboss-embedded-all.jar
* Qualified Name:     org.jboss.tm.iiop._TransactionServiceStub
* JD-Core Version:    0.6.0
*/
TOP

Related Classes of org.jboss.tm.iiop._TransactionServiceStub

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.