public NamingContext new_context() { try { // create and initialize a new context. CorbaNamingContext newContextImpl = new CorbaNamingContext(); newContextImpl.init(this.poa, this.doPurge, this.noPing); // create the oid for the new context and activate it with the naming service POA. String oid = new String(this.poa.servant_to_id(this), StandardCharsets.UTF_8) + "/ctx" + (++this.childCount); this.poa.activate_object_with_id(oid.getBytes(StandardCharsets.UTF_8), newContextImpl); // add the newly-created context to the cache. contextImpls.put(oid, newContextImpl); return NamingContextExtHelper.narrow(this.poa.create_reference_with_id(oid.getBytes(StandardCharsets.UTF_8), "IDL:omg.org/CosNaming/NamingContextExt:1.0")); } catch (Exception e) { IIOPLogger.ROOT_LOGGER.failedToCreateNamingContext(e); return null; } }
public void destroy() { bindings = null; try { _poa().deactivate_object(_poa().servant_to_id(this)); } catch (UserException e) { throw IIOPLogger.ROOT_LOGGER.exceptionDestroingIterator(e.getMessage()); } }
synchronized void remove_coordinator( TransactionalLockSetImpl ls ){ LockCoordinatorImpl lc = (LockCoordinatorImpl)locksets.get( ls ); if( lc != null ){ try { byte [] ObjId = poa.servant_to_id( lc ); poa.deactivate_object( ObjId ); } catch ( Exception e ) { } locksets.remove( ls ); } }; public void run() {
/** * Destory this BindingIterator instance, which deativates * it from the hosting POA. */ public void destroy() { try { // we need to deactivate this from the POA. byte[] objectId = poa.servant_to_id(this); if (objectId != null) { poa.deactivate_object(objectId); } } catch (Exception e ) { } } }
/** * Destory this BindingIterator instance, which deativates * it from the hosting POA. */ public void destroy() { try { // we need to deactivate this from the POA. byte[] objectId = poa.servant_to_id(this); if (objectId != null) { poa.deactivate_object(objectId); } } catch (Exception e) { } } }
synchronized void remove_me( TransactionalLockSetImpl i_am ){ Enumeration enumeration = coordinators.elements(); while( enumeration.hasMoreElements() ){ TransactionCoordinator tc = (TransactionCoordinator)enumeration.nextElement(); tc.remove_coordinator( i_am ); } try { byte [] ObjId = poa.servant_to_id( i_am ); poa.deactivate_object( ObjId ); } catch ( Exception e ){ e.printStackTrace( System.out ); throw new org.omg.CORBA.INTERNAL(); } }; };
synchronized void remove_me( TransactionCoordinator i_am ){ coordinators.remove( i_am.get_coordinator() ); try { byte [] ObjId = poa.servant_to_id( i_am ); poa.deactivate_object( ObjId ); } catch ( Exception e ){ e.printStackTrace( System.out ); throw new org.omg.CORBA.INTERNAL(); } } /* -------------------------------------------------------------------------- */
public synchronized void destroy() { Enumeration enumeration = iterators.elements(); while( enumeration.hasMoreElements() ){ PositionalIteratorImpl i = (PositionalIteratorImpl)enumeration.nextElement(); i.destroy(); }; try { byte[] ObjID = poa.servant_to_id( srvnt ); poa.deactivate_object( ObjID ); } catch ( Exception e ) { System.out.println( "Internal error: Can not deactivate object" ); e.printStackTrace( System.out ); throw new org.omg.CORBA.INTERNAL(); } }; /* ------------------------------------------------------------------------- */
public void run() { Enumeration enumeration = locksets.elements(); while( enumeration.hasMoreElements() ){ LockCoordinatorImpl lc = (LockCoordinatorImpl)enumeration.nextElement(); lc.drop_locks(); try { byte [] ObjId = poa.servant_to_id( lc ); poa.deactivate_object( ObjId ); } catch ( ServantNotActive e ) { } catch ( Exception e ){ e.printStackTrace( System.out ); throw new org.omg.CORBA.INTERNAL(); } }; factory.remove_me( this ); }; private void check_state(){
/** * Destroys this BindingIterator by disconnecting from the ORB * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA system exceptions. */ final public void Destroy() { // Remove the object from the Active Object Map. try { byte[] objectId = biPOA.servant_to_id( this ); if( objectId != null ) { biPOA.deactivate_object( objectId ); } } catch( Exception e ) { throw new INTERNAL( "Exception in BindingIterator.Destroy " + e ); } }
public void deactivate() { if (_get_delegate() == null) throw new RuntimeException("object not active"); try { org.omg.PortableServer.POA poa = _state.getPOA(); byte[] id = poa.servant_to_id(this); poa.deactivate_object(id); _set_delegate(null); } catch (Throwable ex) { logger.throwing("", "deactivate", ex); throw new RuntimeException("cannot deactivate: " + ex.getMessage(), ex); } }
public void deactivate() { try{ _poa().deactivate_object(_poa().servant_to_id(this)); } catch (org.omg.PortableServer.POAPackage.WrongPolicy exception){ // ignore } catch (org.omg.PortableServer.POAPackage.ObjectNotActive exception){ // ignore } catch (org.omg.PortableServer.POAPackage.ServantNotActive exception){ // ignore } }
public synchronized void destroy_me( PositionalIteratorImpl i ) { if( iterators.removeElement( i ) ){ try { byte [] ObjID = poa.servant_to_id( i.get_servant() ); poa.deactivate_object( ObjID ); } catch ( Exception e ){ System.out.println("Internal error: Attempt destroy not my Iterator"); e.printStackTrace( System.out ); throw new org.omg.CORBA.INTERNAL(); } } else { System.out.println("Internal error: Attempt destroy not my Iterator"); throw new org.omg.CORBA.INTERNAL(); }; }; /* ------------------------------------------------------------------------- */
public NamingContext new_context() { try { // create and initialize a new context. CorbaNamingContext newContextImpl = new CorbaNamingContext(); newContextImpl.init(this.poa, this.doPurge, this.noPing); // create the oid for the new context and activate it with the naming service POA. String oid = new String(this.poa.servant_to_id(this)) + "/ctx" + (++this.childCount); this.poa.activate_object_with_id(oid.getBytes(), newContextImpl); // add the newly-created context to the cache. contextImpls.put(oid, newContextImpl); return NamingContextExtHelper.narrow(this.poa.create_reference_with_id(oid.getBytes(), "IDL:omg.org/CosNaming/NamingContextExt:1.0")); } catch (Exception e) { IIOPLogger.ROOT_LOGGER.failedToCreateNamingContext(e); return null; } }
public NamingContext new_context() { try { // create and initialize a new context. CorbaNamingContext newContextImpl = new CorbaNamingContext(); newContextImpl.init(this.poa, this.doPurge, this.noPing); // create the oid for the new context and activate it with the naming service POA. String oid = new String(this.poa.servant_to_id(this), StandardCharsets.UTF_8) + "/ctx" + (++this.childCount); this.poa.activate_object_with_id(oid.getBytes(StandardCharsets.UTF_8), newContextImpl); // add the newly-created context to the cache. contextImpls.put(oid, newContextImpl); return NamingContextExtHelper.narrow(this.poa.create_reference_with_id(oid.getBytes(StandardCharsets.UTF_8), "IDL:omg.org/CosNaming/NamingContextExt:1.0")); } catch (Exception e) { IIOPLogger.ROOT_LOGGER.failedToCreateNamingContext(e); return null; } }
/** * Destroys this BindingIterator by disconnecting from the ORB * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA * system exceptions. */ final public void Destroy() { // Remove the object from the Active Object Map. try { byte[] objectId = nsPOA.servant_to_id( this ); if( objectId != null ) { nsPOA.deactivate_object( objectId ); } } catch( Exception e ) { NamingUtils.errprint("BindingIterator.Destroy():caught exception:"); NamingUtils.printException(e); } }
public void deactivate() { try { _poa().deactivate_object(_poa().servant_to_id(this)); } catch (org.omg.PortableServer.POAPackage.WrongPolicy exception) { // ignore } catch (org.omg.PortableServer.POAPackage.ObjectNotActive exception) { // ignore } catch (org.omg.PortableServer.POAPackage.ServantNotActive exception) { // ignore } }
public void destroy () { bindings = null; try { _poa ().deactivate_object (_poa ().servant_to_id (this)); } catch (UserException e) { throw new INTERNAL ("Caught exception destroying Iterator" + e); } }
public void destroy() { bindings = null; try { _poa().deactivate_object(_poa().servant_to_id(this)); } catch (UserException e) { throw IIOPLogger.ROOT_LOGGER.exceptionDestroingIterator(e.getMessage()); } }
public void destroy() { bindings = null; try { _poa().deactivate_object(_poa().servant_to_id(this)); } catch (UserException e) { throw IIOPLogger.ROOT_LOGGER.exceptionDestroingIterator(e.getMessage()); } }