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