001 package org.omg.CosTransactions; 002 003 004 /** 005 * org/omg/CosTransactions/_SubtransactionAwareResourceImplBase.java . 006 * Generated by the IDL-to-Java compiler (portable), version "3.2" 007 * from /builddir/build/BUILD/geronimo-specs-1.6/geronimo-spec-corba/src/main/idl/CosTransactions.idl 008 * Monday, June 18, 2012 10:36:15 AM CEST 009 */ 010 011 public abstract class _SubtransactionAwareResourceImplBase extends org.omg.CORBA.portable.ObjectImpl 012 implements org.omg.CosTransactions.SubtransactionAwareResource, org.omg.CORBA.portable.InvokeHandler 013 { 014 015 // Constructors 016 public _SubtransactionAwareResourceImplBase () 017 { 018 } 019 020 private static java.util.Hashtable _methods = new java.util.Hashtable (); 021 static 022 { 023 _methods.put ("commit_subtransaction", new java.lang.Integer (0)); 024 _methods.put ("rollback_subtransaction", new java.lang.Integer (1)); 025 _methods.put ("prepare", new java.lang.Integer (2)); 026 _methods.put ("rollback", new java.lang.Integer (3)); 027 _methods.put ("commit", new java.lang.Integer (4)); 028 _methods.put ("commit_one_phase", new java.lang.Integer (5)); 029 _methods.put ("forget", new java.lang.Integer (6)); 030 } 031 032 public org.omg.CORBA.portable.OutputStream _invoke (String $method, 033 org.omg.CORBA.portable.InputStream in, 034 org.omg.CORBA.portable.ResponseHandler $rh) 035 { 036 org.omg.CORBA.portable.OutputStream out = null; 037 java.lang.Integer __method = (java.lang.Integer)_methods.get ($method); 038 if (__method == null) 039 throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); 040 041 switch (__method.intValue ()) 042 { 043 case 0: // CosTransactions/SubtransactionAwareResource/commit_subtransaction 044 { 045 org.omg.CosTransactions.Coordinator parent = org.omg.CosTransactions.CoordinatorHelper.read (in); 046 this.commit_subtransaction (parent); 047 out = $rh.createReply(); 048 break; 049 } 050 051 case 1: // CosTransactions/SubtransactionAwareResource/rollback_subtransaction 052 { 053 this.rollback_subtransaction (); 054 out = $rh.createReply(); 055 break; 056 } 057 058 case 2: // CosTransactions/Resource/prepare 059 { 060 try { 061 org.omg.CosTransactions.Vote $result = null; 062 $result = this.prepare (); 063 out = $rh.createReply(); 064 org.omg.CosTransactions.VoteHelper.write (out, $result); 065 } catch (org.omg.CosTransactions.HeuristicMixed $ex) { 066 out = $rh.createExceptionReply (); 067 org.omg.CosTransactions.HeuristicMixedHelper.write (out, $ex); 068 } catch (org.omg.CosTransactions.HeuristicHazard $ex) { 069 out = $rh.createExceptionReply (); 070 org.omg.CosTransactions.HeuristicHazardHelper.write (out, $ex); 071 } 072 break; 073 } 074 075 case 3: // CosTransactions/Resource/rollback 076 { 077 try { 078 this.rollback (); 079 out = $rh.createReply(); 080 } catch (org.omg.CosTransactions.HeuristicCommit $ex) { 081 out = $rh.createExceptionReply (); 082 org.omg.CosTransactions.HeuristicCommitHelper.write (out, $ex); 083 } catch (org.omg.CosTransactions.HeuristicMixed $ex) { 084 out = $rh.createExceptionReply (); 085 org.omg.CosTransactions.HeuristicMixedHelper.write (out, $ex); 086 } catch (org.omg.CosTransactions.HeuristicHazard $ex) { 087 out = $rh.createExceptionReply (); 088 org.omg.CosTransactions.HeuristicHazardHelper.write (out, $ex); 089 } 090 break; 091 } 092 093 case 4: // CosTransactions/Resource/commit 094 { 095 try { 096 this.commit (); 097 out = $rh.createReply(); 098 } catch (org.omg.CosTransactions.NotPrepared $ex) { 099 out = $rh.createExceptionReply (); 100 org.omg.CosTransactions.NotPreparedHelper.write (out, $ex); 101 } catch (org.omg.CosTransactions.HeuristicRollback $ex) { 102 out = $rh.createExceptionReply (); 103 org.omg.CosTransactions.HeuristicRollbackHelper.write (out, $ex); 104 } catch (org.omg.CosTransactions.HeuristicMixed $ex) { 105 out = $rh.createExceptionReply (); 106 org.omg.CosTransactions.HeuristicMixedHelper.write (out, $ex); 107 } catch (org.omg.CosTransactions.HeuristicHazard $ex) { 108 out = $rh.createExceptionReply (); 109 org.omg.CosTransactions.HeuristicHazardHelper.write (out, $ex); 110 } 111 break; 112 } 113 114 case 5: // CosTransactions/Resource/commit_one_phase 115 { 116 try { 117 this.commit_one_phase (); 118 out = $rh.createReply(); 119 } catch (org.omg.CosTransactions.HeuristicHazard $ex) { 120 out = $rh.createExceptionReply (); 121 org.omg.CosTransactions.HeuristicHazardHelper.write (out, $ex); 122 } 123 break; 124 } 125 126 case 6: // CosTransactions/Resource/forget 127 { 128 this.forget (); 129 out = $rh.createReply(); 130 break; 131 } 132 133 default: 134 throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); 135 } 136 137 return out; 138 } // _invoke 139 140 // Type-specific CORBA::Object operations 141 private static String[] __ids = { 142 "IDL:CosTransactions/SubtransactionAwareResource:1.0", 143 "IDL:CosTransactions/Resource:1.0"}; 144 145 public String[] _ids () 146 { 147 return (String[])__ids.clone (); 148 } 149 150 151 } // class _SubtransactionAwareResourceImplBase