001 package org.omg.CosTransactions; 002 003 004 /** 005 * Generated from IDL interface "SubtransactionAwareResource". 006 * 007 * @author JacORB IDL compiler V 2.3.0 (JBoss patch 6), 06-Jun-2007 008 * @version generated at Jun 18, 2012 10:37:00 AM 009 */ 010 011 public class _SubtransactionAwareResourceStub 012 extends org.omg.CORBA.portable.ObjectImpl 013 implements org.omg.CosTransactions.SubtransactionAwareResource 014 { 015 private String[] ids = {"IDL:CosTransactions/SubtransactionAwareResource:1.0","IDL:CosTransactions/Resource:1.0"}; 016 public String[] _ids() 017 { 018 return ids; 019 } 020 021 public final static java.lang.Class _opsClass = org.omg.CosTransactions.SubtransactionAwareResourceOperations.class; 022 public void rollback_subtransaction() 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_subtransaction", 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_subtransaction", _opsClass ); 049 if( _so == null ) 050 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 051 SubtransactionAwareResourceOperations _localServant = (SubtransactionAwareResourceOperations)_so.servant; 052 try 053 { 054 _localServant.rollback_subtransaction(); 055 } 056 finally 057 { 058 _servant_postinvoke(_so); 059 } 060 return; 061 } 062 063 } 064 065 } 066 067 public void rollback() throws org.omg.CosTransactions.HeuristicHazard,org.omg.CosTransactions.HeuristicMixed,org.omg.CosTransactions.HeuristicCommit 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( "rollback", true); 077 _is = _invoke(_os); 078 return; 079 } 080 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 081 catch( org.omg.CORBA.portable.ApplicationException _ax ) 082 { 083 String _id = _ax.getId(); 084 if( _id.equals("IDL:CosTransactions/HeuristicHazard:1.0")) 085 { 086 throw org.omg.CosTransactions.HeuristicHazardHelper.read(_ax.getInputStream()); 087 } 088 else if( _id.equals("IDL:CosTransactions/HeuristicMixed:1.0")) 089 { 090 throw org.omg.CosTransactions.HeuristicMixedHelper.read(_ax.getInputStream()); 091 } 092 else if( _id.equals("IDL:CosTransactions/HeuristicCommit:1.0")) 093 { 094 throw org.omg.CosTransactions.HeuristicCommitHelper.read(_ax.getInputStream()); 095 } 096 throw new RuntimeException("Unexpected exception " + _id ); 097 } 098 finally 099 { 100 this._releaseReply(_is); 101 } 102 } 103 else 104 { 105 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "rollback", _opsClass ); 106 if( _so == null ) 107 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 108 SubtransactionAwareResourceOperations _localServant = (SubtransactionAwareResourceOperations)_so.servant; 109 try 110 { 111 _localServant.rollback(); 112 } 113 finally 114 { 115 _servant_postinvoke(_so); 116 } 117 return; 118 } 119 120 } 121 122 } 123 124 public void commit_subtransaction(org.omg.CosTransactions.Coordinator parent) 125 { 126 while(true) 127 { 128 if(! this._is_local()) 129 { 130 org.omg.CORBA.portable.InputStream _is = null; 131 try 132 { 133 org.omg.CORBA.portable.OutputStream _os = _request( "commit_subtransaction", true); 134 org.omg.CosTransactions.CoordinatorHelper.write(_os,parent); 135 _is = _invoke(_os); 136 return; 137 } 138 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 139 catch( org.omg.CORBA.portable.ApplicationException _ax ) 140 { 141 String _id = _ax.getId(); 142 throw new RuntimeException("Unexpected exception " + _id ); 143 } 144 finally 145 { 146 this._releaseReply(_is); 147 } 148 } 149 else 150 { 151 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "commit_subtransaction", _opsClass ); 152 if( _so == null ) 153 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 154 SubtransactionAwareResourceOperations _localServant = (SubtransactionAwareResourceOperations)_so.servant; 155 try 156 { 157 _localServant.commit_subtransaction(parent); 158 } 159 finally 160 { 161 _servant_postinvoke(_so); 162 } 163 return; 164 } 165 166 } 167 168 } 169 170 public void commit() throws org.omg.CosTransactions.NotPrepared,org.omg.CosTransactions.HeuristicHazard,org.omg.CosTransactions.HeuristicMixed,org.omg.CosTransactions.HeuristicRollback 171 { 172 while(true) 173 { 174 if(! this._is_local()) 175 { 176 org.omg.CORBA.portable.InputStream _is = null; 177 try 178 { 179 org.omg.CORBA.portable.OutputStream _os = _request( "commit", true); 180 _is = _invoke(_os); 181 return; 182 } 183 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 184 catch( org.omg.CORBA.portable.ApplicationException _ax ) 185 { 186 String _id = _ax.getId(); 187 if( _id.equals("IDL:CosTransactions/NotPrepared:1.0")) 188 { 189 throw org.omg.CosTransactions.NotPreparedHelper.read(_ax.getInputStream()); 190 } 191 else if( _id.equals("IDL:CosTransactions/HeuristicHazard:1.0")) 192 { 193 throw org.omg.CosTransactions.HeuristicHazardHelper.read(_ax.getInputStream()); 194 } 195 else if( _id.equals("IDL:CosTransactions/HeuristicMixed:1.0")) 196 { 197 throw org.omg.CosTransactions.HeuristicMixedHelper.read(_ax.getInputStream()); 198 } 199 else if( _id.equals("IDL:CosTransactions/HeuristicRollback:1.0")) 200 { 201 throw org.omg.CosTransactions.HeuristicRollbackHelper.read(_ax.getInputStream()); 202 } 203 throw new RuntimeException("Unexpected exception " + _id ); 204 } 205 finally 206 { 207 this._releaseReply(_is); 208 } 209 } 210 else 211 { 212 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "commit", _opsClass ); 213 if( _so == null ) 214 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 215 SubtransactionAwareResourceOperations _localServant = (SubtransactionAwareResourceOperations)_so.servant; 216 try 217 { 218 _localServant.commit(); 219 } 220 finally 221 { 222 _servant_postinvoke(_so); 223 } 224 return; 225 } 226 227 } 228 229 } 230 231 public org.omg.CosTransactions.Vote prepare() throws org.omg.CosTransactions.HeuristicHazard,org.omg.CosTransactions.HeuristicMixed 232 { 233 while(true) 234 { 235 if(! this._is_local()) 236 { 237 org.omg.CORBA.portable.InputStream _is = null; 238 try 239 { 240 org.omg.CORBA.portable.OutputStream _os = _request( "prepare", true); 241 _is = _invoke(_os); 242 org.omg.CosTransactions.Vote _result = org.omg.CosTransactions.VoteHelper.read(_is); 243 return _result; 244 } 245 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 246 catch( org.omg.CORBA.portable.ApplicationException _ax ) 247 { 248 String _id = _ax.getId(); 249 if( _id.equals("IDL:CosTransactions/HeuristicHazard:1.0")) 250 { 251 throw org.omg.CosTransactions.HeuristicHazardHelper.read(_ax.getInputStream()); 252 } 253 else if( _id.equals("IDL:CosTransactions/HeuristicMixed:1.0")) 254 { 255 throw org.omg.CosTransactions.HeuristicMixedHelper.read(_ax.getInputStream()); 256 } 257 throw new RuntimeException("Unexpected exception " + _id ); 258 } 259 finally 260 { 261 this._releaseReply(_is); 262 } 263 } 264 else 265 { 266 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "prepare", _opsClass ); 267 if( _so == null ) 268 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 269 SubtransactionAwareResourceOperations _localServant = (SubtransactionAwareResourceOperations)_so.servant; 270 org.omg.CosTransactions.Vote _result; 271 try 272 { 273 _result = _localServant.prepare(); 274 } 275 finally 276 { 277 _servant_postinvoke(_so); 278 } 279 return _result; 280 } 281 282 } 283 284 } 285 286 public void commit_one_phase() throws org.omg.CosTransactions.HeuristicHazard 287 { 288 while(true) 289 { 290 if(! this._is_local()) 291 { 292 org.omg.CORBA.portable.InputStream _is = null; 293 try 294 { 295 org.omg.CORBA.portable.OutputStream _os = _request( "commit_one_phase", true); 296 _is = _invoke(_os); 297 return; 298 } 299 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 300 catch( org.omg.CORBA.portable.ApplicationException _ax ) 301 { 302 String _id = _ax.getId(); 303 if( _id.equals("IDL:CosTransactions/HeuristicHazard:1.0")) 304 { 305 throw org.omg.CosTransactions.HeuristicHazardHelper.read(_ax.getInputStream()); 306 } 307 throw new RuntimeException("Unexpected exception " + _id ); 308 } 309 finally 310 { 311 this._releaseReply(_is); 312 } 313 } 314 else 315 { 316 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "commit_one_phase", _opsClass ); 317 if( _so == null ) 318 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 319 SubtransactionAwareResourceOperations _localServant = (SubtransactionAwareResourceOperations)_so.servant; 320 try 321 { 322 _localServant.commit_one_phase(); 323 } 324 finally 325 { 326 _servant_postinvoke(_so); 327 } 328 return; 329 } 330 331 } 332 333 } 334 335 public void forget() 336 { 337 while(true) 338 { 339 if(! this._is_local()) 340 { 341 org.omg.CORBA.portable.InputStream _is = null; 342 try 343 { 344 org.omg.CORBA.portable.OutputStream _os = _request( "forget", true); 345 _is = _invoke(_os); 346 return; 347 } 348 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 349 catch( org.omg.CORBA.portable.ApplicationException _ax ) 350 { 351 String _id = _ax.getId(); 352 throw new RuntimeException("Unexpected exception " + _id ); 353 } 354 finally 355 { 356 this._releaseReply(_is); 357 } 358 } 359 else 360 { 361 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "forget", _opsClass ); 362 if( _so == null ) 363 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 364 SubtransactionAwareResourceOperations _localServant = (SubtransactionAwareResourceOperations)_so.servant; 365 try 366 { 367 _localServant.forget(); 368 } 369 finally 370 { 371 _servant_postinvoke(_so); 372 } 373 return; 374 } 375 376 } 377 378 } 379 380 }