Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.omg.CosTransactions;


Generated from IDL interface "Current".

Author(s):
JacORB IDL compiler V 3.5
Version:
generated at 11-Jul-2014 12:35:18
  
 
 public abstract class CurrentPOA
 {
 	static private final java.util.HashMap<String,Integerm_opsHash = new java.util.HashMap<String,Integer>();
 	static
 	{
 		.put ( "suspend", Integer.valueOf(0));
 		.put ( "get_status", Integer.valueOf(1));
 		.put ( "rollback", Integer.valueOf(2));
 		.put ( "resume", Integer.valueOf(3));
 		.put ( "get_transaction_name", Integer.valueOf(4));
 		.put ( "set_timeout", Integer.valueOf(5));
 		.put ( "commit", Integer.valueOf(6));
 		.put ( "rollback_only", Integer.valueOf(7));
 		.put ( "get_control", Integer.valueOf(8));
 		.put ( "begin", Integer.valueOf(9));
 	}
 	private String[] ids = {"IDL:omg.org/CosTransactions/Current:1.0","IDL:omg.org/CORBA/Current:1.0"};
 	{
 		org.omg.CORBA.Object __o = _this_object() ;
 		org.omg.CosTransactions.Current __r = org.omg.CosTransactions.CurrentHelper.narrow(__o);
 		return __r;
 	}
 	{
 		org.omg.CORBA.Object __o = _this_object(orb) ;
 		org.omg.CosTransactions.Current __r = org.omg.CosTransactions.CurrentHelper.narrow(__o);
 		return __r;
 	}
 	{
 		org.omg.CORBA.portable.OutputStream _out = null;
 		// do something
 		// quick lookup of operation
 		java.lang.Integer opsIndex = (java.lang.Integer).get ( method );
 		if ( null == opsIndex )
 			throw new org.omg.CORBA.BAD_OPERATION(method + " not found");
 		switch ( opsIndex.intValue() )
 		{
 			case 0: // suspend
 			{
 				_out = handler.createReply();
 				org.omg.CosTransactions.ControlHelper.write(_out,suspend());
 				break;
 			}
 			case 1: // get_status
 			{
 				_out = handler.createReply();
 				org.omg.CosTransactions.StatusHelper.write(_out,get_status());
 				break;
 			}
 			case 2: // rollback
 			{
 			try
 			{
 				_out = handler.createReply();
 			}
 			{
 				_out = handler.createExceptionReply();
 				org.omg.CosTransactions.NoTransactionHelper.write(_out_ex0);
 			}
 				break;
 			}
 			case 3: // resume
 			{
 			try
 			{
 				org.omg.CosTransactions.Control _arg0=org.omg.CosTransactions.ControlHelper.read(_input);
 				_out = handler.createReply();
 				resume(_arg0);
 			}
 			{
 				_out = handler.createExceptionReply();
 				org.omg.CosTransactions.InvalidControlHelper.write(_out_ex0);
 			}
 				break;
 			}
 			case 4: // get_transaction_name
 			{
 				_out = handler.createReply();
 				java.lang.String tmpResult0 = get_transaction_name();
 _out.write_stringtmpResult0 );
 				break;
			}
			case 5: // set_timeout
			{
				int _arg0=_input.read_ulong();
				_out = handler.createReply();
				break;
			}
			case 6: // commit
			{
			try
			{
				boolean _arg0=_input.read_boolean();
				_out = handler.createReply();
				commit(_arg0);
			}
			{
				_out = handler.createExceptionReply();
				org.omg.CosTransactions.NoTransactionHelper.write(_out_ex0);
			}
			{
				_out = handler.createExceptionReply();
				org.omg.CosTransactions.HeuristicHazardHelper.write(_out_ex1);
			}
			{
				_out = handler.createExceptionReply();
				org.omg.CosTransactions.HeuristicMixedHelper.write(_out_ex2);
			}
				break;
			}
			case 7: // rollback_only
			{
			try
			{
				_out = handler.createReply();
			}
			{
				_out = handler.createExceptionReply();
				org.omg.CosTransactions.NoTransactionHelper.write(_out_ex0);
			}
				break;
			}
			case 8: // get_control
			{
				_out = handler.createReply();
				org.omg.CosTransactions.ControlHelper.write(_out,get_control());
				break;
			}
			case 9: // begin
			{
			try
			{
				_out = handler.createReply();
			}
			{
				_out = handler.createExceptionReply();
				org.omg.CosTransactions.SubtransactionsUnavailableHelper.write(_out_ex0);
			}
				break;
			}
		}
		return _out;
	}
	public String[] _all_interfaces(org.omg.PortableServer.POA poabyte[] obj_id)
	{
		return ;
	}
New to GrepCode? Check out our FAQ X