001 package org.omg.CosTransactions;
002
003
004 /**
005 * Generated from IDL interface "Terminator".
006 *
007 * @author JacORB IDL compiler V 2.3.0 (JBoss patch 6), 06-Jun-2007
008 * @version generated at Sep 6, 2011 5:12:30 AM
009 */
010
011 public class _TerminatorStub
012 extends org.omg.CORBA.portable.ObjectImpl
013 implements org.omg.CosTransactions.Terminator
014 {
015 private String[] ids = {"IDL:CosTransactions/Terminator:1.0"};
016 public String[] _ids()
017 {
018 return ids;
019 }
020
021 public final static java.lang.Class _opsClass = org.omg.CosTransactions.TerminatorOperations.class;
022 public void rollback()
023 {
024 while(true)
025 {
026 if(! this._is_local())
027 {
028 org.omg.CORBA.portable.InputStream _is = null;
029 try
030 {
031 org.omg.CORBA.portable.OutputStream _os = _request( "rollback", true);
032 _is = _invoke(_os);
033 return;
034 }
035 catch( org.omg.CORBA.portable.RemarshalException _rx ){}
036 catch( org.omg.CORBA.portable.ApplicationException _ax )
037 {
038 String _id = _ax.getId();
039 throw new RuntimeException("Unexpected exception " + _id );
040 }
041 finally
042 {
043 this._releaseReply(_is);
044 }
045 }
046 else
047 {
048 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "rollback", _opsClass );
049 if( _so == null )
050 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
051 TerminatorOperations _localServant = (TerminatorOperations)_so.servant;
052 try
053 {
054 _localServant.rollback();
055 }
056 finally
057 {
058 _servant_postinvoke(_so);
059 }
060 return;
061 }
062
063 }
064
065 }
066
067 public void commit(boolean report_heuristics) throws org.omg.CosTransactions.HeuristicHazard,org.omg.CosTransactions.HeuristicMixed
068 {
069 while(true)
070 {
071 if(! this._is_local())
072 {
073 org.omg.CORBA.portable.InputStream _is = null;
074 try
075 {
076 org.omg.CORBA.portable.OutputStream _os = _request( "commit", true);
077 _os.write_boolean(report_heuristics);
078 _is = _invoke(_os);
079 return;
080 }
081 catch( org.omg.CORBA.portable.RemarshalException _rx ){}
082 catch( org.omg.CORBA.portable.ApplicationException _ax )
083 {
084 String _id = _ax.getId();
085 if( _id.equals("IDL:CosTransactions/HeuristicHazard:1.0"))
086 {
087 throw org.omg.CosTransactions.HeuristicHazardHelper.read(_ax.getInputStream());
088 }
089 else if( _id.equals("IDL:CosTransactions/HeuristicMixed:1.0"))
090 {
091 throw org.omg.CosTransactions.HeuristicMixedHelper.read(_ax.getInputStream());
092 }
093 throw new RuntimeException("Unexpected exception " + _id );
094 }
095 finally
096 {
097 this._releaseReply(_is);
098 }
099 }
100 else
101 {
102 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "commit", _opsClass );
103 if( _so == null )
104 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
105 TerminatorOperations _localServant = (TerminatorOperations)_so.servant;
106 try
107 {
108 _localServant.commit(report_heuristics);
109 }
110 finally
111 {
112 _servant_postinvoke(_so);
113 }
114 return;
115 }
116
117 }
118
119 }
120
121 }