Java Code Examples for com.sun.corba.se.impl.orbutil.ORBUtility#dprint()
The following examples show how to use
com.sun.corba.se.impl.orbutil.ORBUtility#dprint() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: POAImpl.java From hottub with GNU General Public License v2.0 | 6 votes |
public void doIt( POAImpl thePoa, boolean wait ) { if (debug) { ORBUtility.dprint( this, "Calling DestroyThread.doIt(thePOA=" + thePoa + " wait=" + wait + " etherealize=" + etherealize ) ; } this.thePoa = thePoa ; this.wait = wait ; if (wait) { run() ; } else { // Catch exceptions since setDaemon can cause a // security exception to be thrown under netscape // in the Applet mode try { setDaemon(true); } catch (Exception e) {} start() ; } }
Example 2
Source File: POAImpl.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * <code>id_to_reference</code> * <b>3.3.8.24</b> */ public org.omg.CORBA.Object id_to_reference(byte[] id) throws ObjectNotActive, WrongPolicy { try { lock() ; if (debug) { ORBUtility.dprint( this, "Calling id_to_reference(id=" + id + ") on poa " + this ) ; } if( state >= STATE_DESTROYING ) { throw lifecycleWrapper().adapterDestroyed() ; } Servant s = mediator.idToServant( id ) ; String repId = s._all_interfaces( this, id )[0] ; return makeObject(repId, id ); } finally { unlock() ; } }
Example 3
Source File: POAImpl.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * <code>reference_to_id</code> * <b>3.3.8.22</b> */ public byte[] reference_to_id(org.omg.CORBA.Object reference) throws WrongAdapter, WrongPolicy { try { lock() ; if (debug) { ORBUtility.dprint( this, "Calling reference_to_id(reference=" + reference + ") on poa " + this ) ; } if( state >= STATE_DESTROYING ) { throw lifecycleWrapper().adapterDestroyed() ; } return internalReferenceToId( reference ) ; } finally { unlock() ; } }
Example 4
Source File: POAImpl.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public void exit() { try { lock() ; if (debug) { ORBUtility.dprint( this, "Calling exit on poa " + this ) ; } invocationCount--; if ((invocationCount == 0) && (state == STATE_DESTROYING)) { invokeCV.broadcast(); } } finally { if (debug) { ORBUtility.dprint( this, "Exiting exit on poa " + this ) ; } unlock() ; } manager.exit(); }
Example 5
Source File: POAManagerImpl.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/**************************************************************************** * The following methods are used on the invocation path. ****************************************************************************/ // called from POA.find_POA before calling // AdapterActivator.unknown_adapter. synchronized void checkIfActive() { try { if (debug) { ORBUtility.dprint( this, "Calling checkIfActive for POAManagerImpl " + this ) ; } checkState(); } finally { if (debug) { ORBUtility.dprint( this, "Exiting checkIfActive for POAManagerImpl " + this ) ; } } }
Example 6
Source File: POAImpl.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * <code>create_reference_with_id</code> * <b>3.3.8.18</b> */ public org.omg.CORBA.Object create_reference_with_id(byte[] oid, String repId) { try { lock() ; if (debug) { ORBUtility.dprint( this, "Calling create_reference_with_id(oid=" + oid + " repId=" + repId + ") on poa " + this ) ; } // Clone the id to avoid possible errors due to aliasing // (e.g. the client passes the id in and then changes it later). byte[] idClone = (byte[])(oid.clone()) ; return makeObject( repId, idClone ) ; } finally { unlock() ; } }
Example 7
Source File: POAImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * <code>reference_to_servant</code> * <b>3.3.8.21</b> */ public Servant reference_to_servant(org.omg.CORBA.Object reference) throws ObjectNotActive, WrongPolicy, WrongAdapter { try { lock() ; if (debug) { ORBUtility.dprint( this, "Calling reference_to_servant(reference=" + reference + ") on poa " + this ) ; } if ( state >= STATE_DESTROYING ) { throw lifecycleWrapper().adapterDestroyed() ; } // reference_to_id should throw WrongAdapter // if the objref was not created by this POA byte [] id = internalReferenceToId(reference); return mediator.idToServant( id ) ; } finally { unlock() ; } }
Example 8
Source File: POAImpl.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * <code>servant_to_id</code> * <b>3.3.8.19</b> */ public byte[] servant_to_id(Servant servant) throws ServantNotActive, WrongPolicy { try { lock() ; if (debug) { ORBUtility.dprint( this, "Calling servant_to_id(servant=" + servant + ") on poa " + this ) ; } return mediator.servantToId( servant ) ; } finally { unlock() ; } }
Example 9
Source File: POAImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
public void exit() { try { lock() ; if (debug) { ORBUtility.dprint( this, "Calling exit on poa " + this ) ; } invocationCount--; if ((invocationCount == 0) && (state == STATE_DESTROYING)) { invokeCV.broadcast(); } } finally { if (debug) { ORBUtility.dprint( this, "Exiting exit on poa " + this ) ; } unlock() ; } manager.exit(); }
Example 10
Source File: POAPolicyMediatorBase_R.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public Servant deactivateObject( ActiveObjectMap.Key key ) throws ObjectNotActive, WrongPolicy { if (orb.poaDebugFlag) { ORBUtility.dprint( this, "Calling deactivateObject for key " + key ) ; } try { AOMEntry entry = activeObjectMap.get(key); if (entry == null) throw new ObjectNotActive(); Servant s = activeObjectMap.getServant( entry ) ; if (s == null) throw new ObjectNotActive(); if (orb.poaDebugFlag) { System.out.println("Deactivating object " + s + " with POA " + poa); } deactivateHelper( key, entry, s ) ; return s ; } finally { if (orb.poaDebugFlag) { ORBUtility.dprint( this, "Exiting deactivateObject" ) ; } } }
Example 11
Source File: POAImpl.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** Called from the subcontract to let this POA cleanup after an * invocation. Note: If getServant was called, then returnServant * MUST be called, even in the case of exceptions. This may be * called multiple times for a single request. */ public void returnServant() { try { lock() ; if (debug) { ORBUtility.dprint( this, "Calling returnServant on poa " + this ) ; } mediator.returnServant(); } catch (Throwable thr) { if (debug) { ORBUtility.dprint( this, "Exception " + thr + " in returnServant on poa " + this ) ; } if (thr instanceof Error) throw (Error)thr ; else if (thr instanceof RuntimeException) throw (RuntimeException)thr ; } finally { if (debug) { ORBUtility.dprint( this, "Exiting returnServant on poa " + this ) ; } unlock() ; } }
Example 12
Source File: POAManagerImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
POAManagerImpl( POAFactory factory, PIHandler pihandler ) { this.factory = factory ; factory.addPoaManager(this); this.pihandler = pihandler ; myId = factory.newPOAManagerId() ; state = State.HOLDING; debug = factory.getORB().poaDebugFlag ; explicitStateChange = false ; if (debug) { ORBUtility.dprint( this, "Creating POAManagerImpl " + this ) ; } }
Example 13
Source File: POAImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public void getInvocationServant( OAInvocationInfo info ) { try { lock() ; if (debug) { ORBUtility.dprint( this, "Calling getInvocationServant on poa " + this ) ; } java.lang.Object servant = null ; try { servant = mediator.getInvocationServant( info.id(), info.getOperation() ); } catch (ForwardRequest freq) { throw new ForwardException( getORB(), freq.forward_reference ) ; } info.setServant( servant ) ; } finally { if (debug) { ORBUtility.dprint( this, "Exiting getInvocationServant on poa " + this ) ; } unlock() ; } }
Example 14
Source File: POAPolicyMediatorImpl_R_USM.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public void run() { if (debug) { ORBUtility.dprint( this, "Calling Etherealizer.run on key " + key ) ; } try { try { mediator.activator.etherealize( key.id, mediator.poa, servant, false, mediator.activeObjectMap.hasMultipleIDs( entry ) ); } catch (Exception exc) { // ignore all exceptions } try { mediator.poa.lock() ; entry.etherealizeComplete() ; mediator.activeObjectMap.remove( key ) ; POAManagerImpl pm = (POAManagerImpl)mediator.poa.the_POAManager() ; POAFactory factory = pm.getFactory() ; factory.unregisterPOAForServant( mediator.poa, servant); } finally { mediator.poa.unlock() ; } } finally { if (debug) { ORBUtility.dprint( this, "Exiting Etherealizer.run" ) ; } } }
Example 15
Source File: POAPolicyMediatorBase_R.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public Servant deactivateObject( ActiveObjectMap.Key key ) throws ObjectNotActive, WrongPolicy { if (orb.poaDebugFlag) { ORBUtility.dprint( this, "Calling deactivateObject for key " + key ) ; } try { AOMEntry entry = activeObjectMap.get(key); if (entry == null) throw new ObjectNotActive(); Servant s = activeObjectMap.getServant( entry ) ; if (s == null) throw new ObjectNotActive(); if (orb.poaDebugFlag) { System.out.println("Deactivating object " + s + " with POA " + poa); } deactivateHelper( key, entry, s ) ; return s ; } finally { if (orb.poaDebugFlag) { ORBUtility.dprint( this, "Exiting deactivateObject" ) ; } } }
Example 16
Source File: FSMImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public void internalSetState( State nextState ) { if (debug) { ORBUtility.dprint( this, "Calling internalSetState with nextState = " + nextState ) ; } state = nextState ; if (debug) { ORBUtility.dprint( this, "Exiting internalSetState with state = " + state ) ; } }
Example 17
Source File: CorbaInboundConnectionCacheImpl.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
protected void dprint(String msg) { ORBUtility.dprint("CorbaInboundConnectionCacheImpl", msg); }
Example 18
Source File: POAImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
private boolean prepareForDestruction( POAImpl poa, Set destroyedPOATemplates ) { POAImpl[] childPoas = null ; // Note that we do not synchronize on this, since this is // the PerformDestroy instance, not the POA. try { poa.lock() ; if (debug) { ORBUtility.dprint( this, "Calling performDestroy on poa " + poa ) ; } if (poa.state <= STATE_RUN) { poa.state = STATE_DESTROYING ; } else { // destroy may be called multiple times, and each call // is allowed to proceed with its own setting of the wait // flag, but the etherealize value is used from the first // call to destroy. Also all children should be destroyed // before the parent POA. If the poa is already destroyed, // we can just return. If the poa has started destruction, // but not completed, and wait is true, we need to wait // until destruction is complete, then just return. if (wait) while (poa.state != STATE_DESTROYED) { try { poa.beingDestroyedCV.await() ; } catch (InterruptedException exc) { // NO-OP } } return false ; } poa.isDestroying.set(Boolean.TRUE); // Make a copy since we can't hold the lock while destroying // the children, and an iterator is not deletion-safe. childPoas = (POAImpl[])poa.children.values().toArray( new POAImpl[0] ); } finally { poa.unlock() ; } // We are not holding the POA mutex here to avoid holding it // while destroying the POA's children, since this may involve // upcalls to etherealize methods. for (int ctr=0; ctr<childPoas.length; ctr++ ) { performDestroy( childPoas[ctr], destroyedPOATemplates ) ; } return true ; }
Example 19
Source File: CorbaOutboundConnectionCacheImpl.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
protected void dprint(String msg) { ORBUtility.dprint("CorbaOutboundConnectionCacheImpl", msg); }
Example 20
Source File: CDROutputStream_1_0.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
protected void dprint(String msg) { if (debug) ORBUtility.dprint(this, msg); }