
org.omg.CosTransactions._TerminatorStub Maven / Gradle / Ivy
package org.omg.CosTransactions;
/**
* Generated from IDL interface "Terminator".
*
* @author JacORB IDL compiler V 2.3.1 (JBoss patch01), 29-Jul-2009
* @version generated at Sep 25, 2012 5:03:58 PM
*/
public class _TerminatorStub
extends org.omg.CORBA.portable.ObjectImpl
implements org.omg.CosTransactions.Terminator
{
private String[] ids = {"IDL:omg.org/CosTransactions/Terminator:1.0"};
public String[] _ids()
{
return ids;
}
public final static java.lang.Class _opsClass = org.omg.CosTransactions.TerminatorOperations.class;
public void rollback()
{
while(true)
{
if(! this._is_local())
{
org.omg.CORBA.portable.InputStream _is = null;
org.omg.CORBA.portable.OutputStream _os = null;
try
{
_os = _request( "rollback", true);
_is = _invoke(_os);
return;
}
catch( org.omg.CORBA.portable.RemarshalException _rx ){}
catch( org.omg.CORBA.portable.ApplicationException _ax )
{
String _id = _ax.getId();
try
{
_ax.getInputStream().close();
}
catch (java.io.IOException e)
{
throw new RuntimeException("Unexpected exception " + e.toString() );
}
throw new RuntimeException("Unexpected exception " + _id );
}
finally
{
if (_os != null)
{
try
{
_os.close();
}
catch (java.io.IOException e)
{
throw new RuntimeException("Unexpected exception " + e.toString() );
}
}
this._releaseReply(_is);
}
}
else
{
org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "rollback", _opsClass );
if( _so == null )
throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
TerminatorOperations _localServant = (TerminatorOperations)_so.servant;
try
{
_localServant.rollback();
}
finally
{
_servant_postinvoke(_so);
}
return;
}
}
}
public void commit(boolean report_heuristics) throws org.omg.CosTransactions.HeuristicHazard,org.omg.CosTransactions.HeuristicMixed
{
while(true)
{
if(! this._is_local())
{
org.omg.CORBA.portable.InputStream _is = null;
org.omg.CORBA.portable.OutputStream _os = null;
try
{
_os = _request( "commit", true);
_os.write_boolean(report_heuristics);
_is = _invoke(_os);
return;
}
catch( org.omg.CORBA.portable.RemarshalException _rx ){}
catch( org.omg.CORBA.portable.ApplicationException _ax )
{
String _id = _ax.getId();
try
{
if( _id.equals("IDL:omg.org/CosTransactions/HeuristicHazard:1.0"))
{
throw org.omg.CosTransactions.HeuristicHazardHelper.read(_ax.getInputStream());
}
else
if( _id.equals("IDL:omg.org/CosTransactions/HeuristicMixed:1.0"))
{
throw org.omg.CosTransactions.HeuristicMixedHelper.read(_ax.getInputStream());
}
else
{
throw new RuntimeException("Unexpected exception " + _id );
}
}
finally
{
try
{
_ax.getInputStream().close();
}
catch (java.io.IOException e)
{
throw new RuntimeException("Unexpected exception " + e.toString() );
}
}
}
finally
{
if (_os != null)
{
try
{
_os.close();
}
catch (java.io.IOException e)
{
throw new RuntimeException("Unexpected exception " + e.toString() );
}
}
this._releaseReply(_is);
}
}
else
{
org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "commit", _opsClass );
if( _so == null )
throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
TerminatorOperations _localServant = (TerminatorOperations)_so.servant;
try
{
_localServant.commit(report_heuristics);
}
finally
{
_servant_postinvoke(_so);
}
return;
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy