package org.dbxml.core.corba.db;

/**
 *	Generated from IDL definition of interface "ServantManagement"
 *	@author JacORB IDL compiler 
 */

public class _ServantManagementStub
	extends org.omg.CORBA.portable.ObjectImpl
	implements org.dbxml.core.corba.db.ServantManagement
{
	private String[] ids = {"IDL:org/dbxml/core/corba/db/ServantManagement:1.0","IDL:omg.org/CORBA/Object:1.0"};
	public String[] _ids()
	{
		return ids;
	}

	public final static java.lang.Class _opsClass = org.dbxml.core.corba.db.ServantManagementOperations.class;
	public void remove()
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "remove", true);
				_is = _invoke(_os);
				return;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "remove", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			ServantManagementOperations _localServant = (ServantManagementOperations)_so.servant;
			try
			{
			_localServant.remove();
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return;
		}

		}

	}

}
