/** * Use implicit activation to get an object reference for the servant. */ public static org.omg.CORBA.Object activateServant(Servant servant) { POA poa = servant._default_POA(); org.omg.CORBA.Object ref = null; try { ref = poa.servant_to_reference(servant); } catch (ServantNotActive sna) { throw wrapper.getDelegateServantNotActive(sna); } catch (WrongPolicy wp) { throw wrapper.getDelegateWrongPolicy(wp); } // Make sure that the POAManager is activated if no other POAManager state management has taken place. POAManager mgr = poa.the_POAManager(); if (mgr instanceof POAManagerImpl) { POAManagerImpl mgrImpl = (POAManagerImpl) mgr; mgrImpl.implicitActivation(); } return ref; }
/** * Use implicit activation to get an object reference for the servant. */ public static org.omg.CORBA.Object activateServant(Servant servant) { POA poa = servant._default_POA(); org.omg.CORBA.Object ref = null; try { ref = poa.servant_to_reference(servant); } catch (ServantNotActive sna) { throw wrapper.getDelegateServantNotActive(sna); } catch (WrongPolicy wp) { throw wrapper.getDelegateWrongPolicy(wp); } // Make sure that the POAManager is activated if no other POAManager state management has taken place. POAManager mgr = poa.the_POAManager(); if (mgr instanceof POAManagerImpl) { POAManagerImpl mgrImpl = (POAManagerImpl) mgr; mgrImpl.implicitActivation(); } return ref; }