001 package org.omg.CosTransactions;
002
003
004 /**
005 * Generated from IDL interface "Synchronization".
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 _SynchronizationStub
012 extends org.omg.CORBA.portable.ObjectImpl
013 implements org.omg.CosTransactions.Synchronization
014 {
015 private String[] ids = {"IDL:CosTransactions/Synchronization:1.0","IDL:CosTransactions/TransactionalObject:1.0"};
016 public String[] _ids()
017 {
018 return ids;
019 }
020
021 public final static java.lang.Class _opsClass = org.omg.CosTransactions.SynchronizationOperations.class;
022 public void before_completion()
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( "before_completion", 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( "before_completion", _opsClass );
049 if( _so == null )
050 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
051 SynchronizationOperations _localServant = (SynchronizationOperations)_so.servant;
052 try
053 {
054 _localServant.before_completion();
055 }
056 finally
057 {
058 _servant_postinvoke(_so);
059 }
060 return;
061 }
062
063 }
064
065 }
066
067 public void after_completion(org.omg.CosTransactions.Status s)
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( "after_completion", true);
077 org.omg.CosTransactions.StatusHelper.write(_os,s);
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 throw new RuntimeException("Unexpected exception " + _id );
086 }
087 finally
088 {
089 this._releaseReply(_is);
090 }
091 }
092 else
093 {
094 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "after_completion", _opsClass );
095 if( _so == null )
096 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
097 SynchronizationOperations _localServant = (SynchronizationOperations)_so.servant;
098 try
099 {
100 _localServant.after_completion(s);
101 }
102 finally
103 {
104 _servant_postinvoke(_so);
105 }
106 return;
107 }
108
109 }
110
111 }
112
113 }