/* */ package org.jboss.tm.iiop;
/* */
/* */ import java.util.Hashtable;
/* */ import org.omg.CORBA.BAD_OPERATION;
/* */ import org.omg.CORBA.ORB;
/* */ import org.omg.CORBA.SystemException;
/* */ import org.omg.CORBA.portable.InputStream;
/* */ import org.omg.CORBA.portable.InvokeHandler;
/* */ import org.omg.CORBA.portable.OutputStream;
/* */ import org.omg.CORBA.portable.ResponseHandler;
/* */ import org.omg.CosTransactions.ControlHelper;
/* */ import org.omg.CosTransactions.Coordinator;
/* */ import org.omg.CosTransactions.CoordinatorHelper;
/* */ import org.omg.CosTransactions.Inactive;
/* */ import org.omg.CosTransactions.InactiveHelper;
/* */ import org.omg.CosTransactions.NotSubtransaction;
/* */ import org.omg.CosTransactions.NotSubtransactionHelper;
/* */ import org.omg.CosTransactions.PropagationContextHelper;
/* */ import org.omg.CosTransactions.RecoveryCoordinatorHelper;
/* */ import org.omg.CosTransactions.Resource;
/* */ import org.omg.CosTransactions.ResourceHelper;
/* */ 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.Unavailable;
/* */ import org.omg.CosTransactions.UnavailableHelper;
/* */ import org.omg.PortableServer.POA;
/* */ import org.omg.PortableServer.Servant;
/* */
/* */ public abstract class CoordinatorExtPOA extends Servant
/* */ implements InvokeHandler, CoordinatorExtOperations
/* */ {
/* 15 */ private static final Hashtable m_opsHash = new Hashtable();
/* */
/* 37 */ private String[] ids = { "IDL:org/jboss/tm/iiop/CoordinatorExt:1.0", "IDL:omg.org/CosTransactions/Coordinator:1.0" };
/* */
/* */ public CoordinatorExt _this() {
/* 40 */ return CoordinatorExtHelper.narrow(_this_object());
/* */ }
/* */
/* */ public CoordinatorExt _this(ORB orb) {
/* 44 */ return CoordinatorExtHelper.narrow(_this_object(orb));
/* */ }
/* */
/* */ public OutputStream _invoke(String method, InputStream _input, ResponseHandler handler) throws SystemException
/* */ {
/* 49 */ OutputStream _out = null;
/* */
/* 52 */ Integer opsIndex = (Integer)m_opsHash.get(method);
/* 53 */ if (null == opsIndex)
/* 54 */ throw new BAD_OPERATION(method + " not found");
/* 55 */ switch (opsIndex.intValue())
/* */ {
/* */ case 0:
/* 59 */ _out = handler.createReply();
/* 60 */ StatusHelper.write(_out, get_top_level_status());
/* 61 */ break;
/* */ case 1:
/* */ try
/* */ {
/* 67 */ Resource _arg0 = ResourceHelper.read(_input);
/* 68 */ _out = handler.createReply();
/* 69 */ RecoveryCoordinatorHelper.write(_out, register_resource(_arg0));
/* */ }
/* */ catch (Inactive _ex0)
/* */ {
/* 73 */ _out = handler.createExceptionReply();
/* 74 */ InactiveHelper.write(_out, _ex0);
/* */ }
/* */
/* */ case 2:
/* */ try
/* */ {
/* 82 */ _out = handler.createReply();
/* 83 */ ControlHelper.write(_out, create_subtransaction());
/* */ }
/* */ catch (SubtransactionsUnavailable _ex0)
/* */ {
/* 87 */ _out = handler.createExceptionReply();
/* 88 */ SubtransactionsUnavailableHelper.write(_out, _ex0);
/* */ }
/* */ catch (Inactive _ex1)
/* */ {
/* 92 */ _out = handler.createExceptionReply();
/* 93 */ InactiveHelper.write(_out, _ex1);
/* */ }
/* */
/* */ case 3:
/* 99 */ Coordinator _arg0 = CoordinatorHelper.read(_input);
/* 100 */ _out = handler.createReply();
/* 101 */ _out.write_boolean(is_related_transaction(_arg0));
/* 102 */ break;
/* */ case 4:
/* */ try
/* */ {
/* 108 */ _out = handler.createReply();
/* 109 */ rollback_only();
/* */ }
/* */ catch (Inactive _ex0)
/* */ {
/* 113 */ _out = handler.createExceptionReply();
/* 114 */ InactiveHelper.write(_out, _ex0);
/* */ }
/* */
/* */ case 5:
/* 120 */ Coordinator _arg0 = CoordinatorHelper.read(_input);
/* 121 */ _out = handler.createReply();
/* 122 */ _out.write_boolean(is_ancestor_transaction(_arg0));
/* 123 */ break;
/* */ case 6:
/* 127 */ Coordinator _arg0 = CoordinatorHelper.read(_input);
/* 128 */ _out = handler.createReply();
/* 129 */ _out.write_boolean(is_same_transaction(_arg0));
/* 130 */ break;
/* */ case 7:
/* 134 */ _out = handler.createReply();
/* 135 */ _out.write_ulong(hash_transaction());
/* 136 */ break;
/* */ case 8:
/* 140 */ _out = handler.createReply();
/* 141 */ StatusHelper.write(_out, get_status());
/* 142 */ break;
/* */ case 9:
/* 146 */ _out = handler.createReply();
/* 147 */ _out.write_ulong(hash_top_level_tran());
/* 148 */ break;
/* */ case 10:
/* */ try
/* */ {
/* 154 */ Synchronization _arg0 = SynchronizationHelper.read(_input);
/* 155 */ _out = handler.createReply();
/* 156 */ register_synchronization(_arg0);
/* */ }
/* */ catch (SynchronizationUnavailable _ex0)
/* */ {
/* 160 */ _out = handler.createExceptionReply();
/* 161 */ SynchronizationUnavailableHelper.write(_out, _ex0);
/* */ }
/* */ catch (Inactive _ex1)
/* */ {
/* 165 */ _out = handler.createExceptionReply();
/* 166 */ InactiveHelper.write(_out, _ex1);
/* */ }
/* */
/* */ case 11:
/* 172 */ _out = handler.createReply();
/* 173 */ _out.write_boolean(is_top_level_transaction());
/* 174 */ break;
/* */ case 12:
/* 178 */ _out = handler.createReply();
/* 179 */ StatusHelper.write(_out, get_parent_status());
/* 180 */ break;
/* */ case 13:
/* */ try
/* */ {
/* 186 */ _out = handler.createReply();
/* 187 */ PropagationContextHelper.write(_out, get_txcontext());
/* */ }
/* */ catch (Unavailable _ex0)
/* */ {
/* 191 */ _out = handler.createExceptionReply();
/* 192 */ UnavailableHelper.write(_out, _ex0);
/* */ }
/* */
/* */ case 14:
/* 198 */ _out = handler.createReply();
/* 199 */ TransactionIdHelper.write(_out, get_transaction_id());
/* 200 */ break;
/* */ case 15:
/* 204 */ _out = handler.createReply();
/* 205 */ _out.write_string(get_transaction_name());
/* 206 */ break;
/* */ case 16:
/* */ try
/* */ {
/* 212 */ SubtransactionAwareResource _arg0 = SubtransactionAwareResourceHelper.read(_input);
/* 213 */ _out = handler.createReply();
/* 214 */ register_subtran_aware(_arg0);
/* */ }
/* */ catch (NotSubtransaction _ex0)
/* */ {
/* 218 */ _out = handler.createExceptionReply();
/* 219 */ NotSubtransactionHelper.write(_out, _ex0);
/* */ }
/* */ catch (Inactive _ex1)
/* */ {
/* 223 */ _out = handler.createExceptionReply();
/* 224 */ InactiveHelper.write(_out, _ex1);
/* */ }
/* */
/* */ case 17:
/* 230 */ Coordinator _arg0 = CoordinatorHelper.read(_input);
/* 231 */ _out = handler.createReply();
/* 232 */ _out.write_boolean(is_descendant_transaction(_arg0));
/* 233 */ break;
/* */ }
/* */
/* 236 */ return _out;
/* */ }
/* */
/* */ public String[] _all_interfaces(POA poa, byte[] obj_id)
/* */ {
/* 241 */ return this.ids;
/* */ }
/* */
/* */ static
/* */ {
/* 18 */ m_opsHash.put("get_top_level_status", new Integer(0));
/* 19 */ m_opsHash.put("register_resource", new Integer(1));
/* 20 */ m_opsHash.put("create_subtransaction", new Integer(2));
/* 21 */ m_opsHash.put("is_related_transaction", new Integer(3));
/* 22 */ m_opsHash.put("rollback_only", new Integer(4));
/* 23 */ m_opsHash.put("is_ancestor_transaction", new Integer(5));
/* 24 */ m_opsHash.put("is_same_transaction", new Integer(6));
/* 25 */ m_opsHash.put("hash_transaction", new Integer(7));
/* 26 */ m_opsHash.put("get_status", new Integer(8));
/* 27 */ m_opsHash.put("hash_top_level_tran", new Integer(9));
/* 28 */ m_opsHash.put("register_synchronization", new Integer(10));
/* 29 */ m_opsHash.put("is_top_level_transaction", new Integer(11));
/* 30 */ m_opsHash.put("get_parent_status", new Integer(12));
/* 31 */ m_opsHash.put("get_txcontext", new Integer(13));
/* 32 */ m_opsHash.put("get_transaction_id", new Integer(14));
/* 33 */ m_opsHash.put("get_transaction_name", new Integer(15));
/* 34 */ m_opsHash.put("register_subtran_aware", new Integer(16));
/* 35 */ m_opsHash.put("is_descendant_transaction", new Integer(17));
/* */ }
/* */ }
/* Location: /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/jboss-embedded-all.jar
* Qualified Name: org.jboss.tm.iiop.CoordinatorExtPOA
* JD-Core Version: 0.6.0
*/