Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.omg.CosTransactions;


Generated from IDL interface "SubtransactionAwareResource".

Author(s):
JacORB IDL compiler V 3.5
Version:
generated at 11-Jul-2014 12:35:18
  
 
 {
Serial version UID.
 
 	private static final long serialVersionUID = 1L;
 	private String[] ids = {"IDL:omg.org/CosTransactions/SubtransactionAwareResource:1.0","IDL:omg.org/CosTransactions/Resource:1.0"};
 	public String[] _ids()
 	{
 		return ;
 	}
 
 	public void rollback_subtransaction()
 	{
 		while(true)
 		{
 			if(! this._is_local())
 			{
 				org.omg.CORBA.portable.InputStream _is = null;
 				org.omg.CORBA.portable.OutputStream _os = null;
 				try
 				{
 					_os = _request"rollback_subtransaction"true);
 					_is = _invoke(_os);
 					return;
 				}
 					{
 						continue;
 					}
 				{
 					String _id = _ax.getId();
 					try
 					{
 					}
 					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_subtransaction" );
 			if_so == null )
 				continue;
 			try
 			{
 				_localServant.rollback_subtransaction();
 				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
 				return;
 			}
 			catch (RuntimeException re
 			{
 				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
 				throw re;
 			}
 			catch (java.lang.Error err
 			{
 				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
 				throw err;
 			}
 			finally
 			{
 			}
		}
		}
	}
	{
		while(true)
		{
			if(! this._is_local())
			{
				try
				{
					_os = _request"rollback"true);
					_is = _invoke(_os);
					return;
				}
					{
						continue;
					}
				{
					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 
						if_id.equals("IDL:omg.org/CosTransactions/HeuristicCommit:1.0"))
						{
							throw org.omg.CosTransactions.HeuristicCommitHelper.read(_ax.getInputStream());
						}
						else 
						{
							throw new RuntimeException("Unexpected exception " + _id );
						}
					}
					finally
					{
						try
						{
						}
						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
		{
			if_so == null )
				continue;
			try
			{
				_localServant.rollback();
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				return;
			}
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw ex;
			}
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw ex;
			}
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw ex;
			}
			catch (RuntimeException re
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw re;
			}
			catch (java.lang.Error err
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw err;
			}
			finally
			{
			}
		}
		}
	}
	{
		while(true)
		{
			if(! this._is_local())
			{
				try
				{
					_os = _request"commit_subtransaction"true);
					org.omg.CosTransactions.CoordinatorHelper.write(_os,parent);
					_is = _invoke(_os);
					return;
				}
					{
						continue;
					}
				{
					String _id = _ax.getId();
					try
					{
					}
					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"commit_subtransaction" );
			if_so == null )
				continue;
			try
			{
				_localServant.commit_subtransaction(parent);
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				return;
			}
			catch (RuntimeException re
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw re;
			}
			catch (java.lang.Error err
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw err;
			}
			finally
			{
			}
		}
		}
	}
	{
		while(true)
		{
			if(! this._is_local())
			{
				try
				{
					_os = _request"commit"true);
					_is = _invoke(_os);
					return;
				}
					{
						continue;
					}
				{
					String _id = _ax.getId();
					try
					{
						if_id.equals("IDL:omg.org/CosTransactions/NotPrepared:1.0"))
						{
							throw org.omg.CosTransactions.NotPreparedHelper.read(_ax.getInputStream());
						}
						else 
						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 
						if_id.equals("IDL:omg.org/CosTransactions/HeuristicRollback:1.0"))
						{
							throw org.omg.CosTransactions.HeuristicRollbackHelper.read(_ax.getInputStream());
						}
						else 
						{
							throw new RuntimeException("Unexpected exception " + _id );
						}
					}
					finally
					{
						try
						{
						}
						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
		{
			if_so == null )
				continue;
			try
			{
				_localServant.commit();
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				return;
			}
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw ex;
			}
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw ex;
			}
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw ex;
			}
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw ex;
			}
			catch (RuntimeException re
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw re;
			}
			catch (java.lang.Error err
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw err;
			}
			finally
			{
			}
		}
		}
	}
	{
		while(true)
		{
			if(! this._is_local())
			{
				try
				{
					_os = _request"prepare"true);
					_is = _invoke(_os);
					org.omg.CosTransactions.Vote _result = org.omg.CosTransactions.VoteHelper.read(_is);
					return _result;
				}
					{
						continue;
					}
				{
					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
						{
						}
						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
		{
			if_so == null )
				continue;
			try
			{
				_result = _localServant.prepare();
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				return _result;
			}
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw ex;
			}
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw ex;
			}
			catch (RuntimeException re
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw re;
			}
			catch (java.lang.Error err
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw err;
			}
			finally
			{
			}
		}
		}
	}
	{
		while(true)
		{
			if(! this._is_local())
			{
				try
				{
					_os = _request"commit_one_phase"true);
					_is = _invoke(_os);
					return;
				}
					{
						continue;
					}
				{
					String _id = _ax.getId();
					try
					{
						if_id.equals("IDL:omg.org/CosTransactions/HeuristicHazard:1.0"))
						{
							throw org.omg.CosTransactions.HeuristicHazardHelper.read(_ax.getInputStream());
						}
						else 
						{
							throw new RuntimeException("Unexpected exception " + _id );
						}
					}
					finally
					{
						try
						{
						}
						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_one_phase" );
			if_so == null )
				continue;
			try
			{
				_localServant.commit_one_phase();
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				return;
			}
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw ex;
			}
			catch (RuntimeException re
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw re;
			}
			catch (java.lang.Error err
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw err;
			}
			finally
			{
			}
		}
		}
	}
	public void forget()
	{
		while(true)
		{
			if(! this._is_local())
			{
				try
				{
					_os = _request"forget"true);
					_is = _invoke(_os);
					return;
				}
					{
						continue;
					}
				{
					String _id = _ax.getId();
					try
					{
					}
					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
		{
			if_so == null )
				continue;
			try
			{
				_localServant.forget();
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				return;
			}
			catch (RuntimeException re
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw re;
			}
			catch (java.lang.Error err
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw err;
			}
			finally
			{
			}
		}
		}
	}
New to GrepCode? Check out our FAQ X