001    package org.omg.CosTransactions;
002    
003    
004    /**
005     * Generated from IDL interface "RecoveryCoordinator".
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 _RecoveryCoordinatorStub
012            extends org.omg.CORBA.portable.ObjectImpl
013            implements org.omg.CosTransactions.RecoveryCoordinator
014    {
015            private String[] ids = {"IDL:CosTransactions/RecoveryCoordinator:1.0"};
016            public String[] _ids()
017            {
018                    return ids;
019            }
020    
021            public final static java.lang.Class _opsClass = org.omg.CosTransactions.RecoveryCoordinatorOperations.class;
022            public org.omg.CosTransactions.Status replay_completion(org.omg.CosTransactions.Resource r) throws org.omg.CosTransactions.NotPrepared
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( "replay_completion", true);
032                                    org.omg.CosTransactions.ResourceHelper.write(_os,r);
033                                    _is = _invoke(_os);
034                                    org.omg.CosTransactions.Status _result = org.omg.CosTransactions.StatusHelper.read(_is);
035                                    return _result;
036                            }
037                            catch( org.omg.CORBA.portable.RemarshalException _rx ){}
038                            catch( org.omg.CORBA.portable.ApplicationException _ax )
039                            {
040                                    String _id = _ax.getId();
041                                    if( _id.equals("IDL:CosTransactions/NotPrepared:1.0"))
042                                    {
043                                            throw org.omg.CosTransactions.NotPreparedHelper.read(_ax.getInputStream());
044                                    }
045                                    throw new RuntimeException("Unexpected exception " + _id );
046                            }
047                            finally
048                            {
049                                    this._releaseReply(_is);
050                            }
051                    }
052                    else
053                    {
054                            org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "replay_completion", _opsClass );
055                            if( _so == null )
056                                    throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
057                            RecoveryCoordinatorOperations _localServant = (RecoveryCoordinatorOperations)_so.servant;
058                            org.omg.CosTransactions.Status _result;
059                            try
060                            {
061                                    _result = _localServant.replay_completion(r);
062                            }
063                            finally
064                            {
065                                    _servant_postinvoke(_so);
066                            }
067                            return _result;
068                    }
069    
070                    }
071    
072            }
073    
074    }