Java Code Examples for org.omg.PortableServer.POA
The following examples show how to use
org.omg.PortableServer.POA. These examples are extracted from open source projects.
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 Project: JDKSourceCode1.8 Source File: POAImpl.java License: MIT License | 6 votes |
/** * <code>the_children</code> */ public org.omg.PortableServer.POA[] the_children() { try { lock() ; Collection coll = children.values() ; int size = coll.size() ; POA[] result = new POA[ size ] ; int index = 0 ; Iterator iter = coll.iterator() ; while (iter.hasNext()) { POA poa = (POA)(iter.next()) ; result[ index++ ] = poa ; } return result ; } finally { unlock() ; } }
Example 2
Source Project: jdk1.8-source-analysis Source File: StubAdapter.java License: Apache License 2.0 | 6 votes |
/** 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 ; }
Example 3
Source Project: openjdk-jdk8u-backup Source File: POAFactory.java License: GNU General Public License v2.0 | 6 votes |
public synchronized POA getRootPOA() { if (rootPOA == null) { // See if we are trying to getRootPOA while shutting down the ORB. if (isShuttingDown) { throw omgWrapper.noObjectAdaptor( ) ; } try { Object obj = orb.resolve_initial_references( ORBConstants.ROOT_POA_NAME ) ; rootPOA = (POAImpl)obj ; } catch (InvalidName inv) { throw wrapper.cantResolveRootPoa( inv ) ; } } return rootPOA; }
Example 4
Source Project: jdk1.8-source-analysis Source File: TransientNamingContext.java License: Apache License 2.0 | 6 votes |
/** * Constructs a new TransientNamingContext object. * @param orb an orb object. * @param initial the initial naming context. * @exception Exception a Java exception thrown of the base class cannot * initialize. */ public TransientNamingContext(com.sun.corba.se.spi.orb.ORB orb, org.omg.CORBA.Object initial, POA nsPOA ) throws java.lang.Exception { super(orb, nsPOA ); wrapper = NamingSystemException.get( orb, CORBALogDomains.NAMING ) ; this.localRoot = initial; readLogger = orb.getLogger( CORBALogDomains.NAMING_READ); updateLogger = orb.getLogger( CORBALogDomains.NAMING_UPDATE); lifecycleLogger = orb.getLogger( CORBALogDomains.NAMING_LIFECYCLE); lifecycleLogger.fine( "Root TransientNamingContext LIFECYCLE.CREATED" ); }
Example 5
Source Project: openjdk-8-source Source File: StubAdapter.java License: GNU General Public License v2.0 | 6 votes |
/** 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 ; }
Example 6
Source Project: openjdk-8-source Source File: POAImpl.java License: GNU General Public License v2.0 | 6 votes |
/** * <code>the_children</code> */ public org.omg.PortableServer.POA[] the_children() { try { lock() ; Collection coll = children.values() ; int size = coll.size() ; POA[] result = new POA[ size ] ; int index = 0 ; Iterator iter = coll.iterator() ; while (iter.hasNext()) { POA poa = (POA)(iter.next()) ; result[ index++ ] = poa ; } return result ; } finally { unlock() ; } }
Example 7
Source Project: hottub Source File: TransientNamingContext.java License: GNU General Public License v2.0 | 6 votes |
/** * Constructs a new TransientNamingContext object. * @param orb an orb object. * @param initial the initial naming context. * @exception Exception a Java exception thrown of the base class cannot * initialize. */ public TransientNamingContext(com.sun.corba.se.spi.orb.ORB orb, org.omg.CORBA.Object initial, POA nsPOA ) throws java.lang.Exception { super(orb, nsPOA ); wrapper = NamingSystemException.get( orb, CORBALogDomains.NAMING ) ; this.localRoot = initial; readLogger = orb.getLogger( CORBALogDomains.NAMING_READ); updateLogger = orb.getLogger( CORBALogDomains.NAMING_UPDATE); lifecycleLogger = orb.getLogger( CORBALogDomains.NAMING_LIFECYCLE); lifecycleLogger.fine( "Root TransientNamingContext LIFECYCLE.CREATED" ); }
Example 8
Source Project: openjdk-8 Source File: POAImpl.java License: GNU General Public License v2.0 | 6 votes |
/** * <code>the_children</code> */ public org.omg.PortableServer.POA[] the_children() { try { lock() ; Collection coll = children.values() ; int size = coll.size() ; POA[] result = new POA[ size ] ; int index = 0 ; Iterator iter = coll.iterator() ; while (iter.hasNext()) { POA poa = (POA)(iter.next()) ; result[ index++ ] = poa ; } return result ; } finally { unlock() ; } }
Example 9
Source Project: openjdk-8-source Source File: NamingContextImpl.java License: GNU General Public License v2.0 | 6 votes |
private synchronized void createbiPOA( ) { if( biPOA != null ) { return; } try { POA rootPOA = (POA) orb.resolve_initial_references( ORBConstants.ROOT_POA_NAME ); rootPOA.the_POAManager().activate( ); int i = 0; Policy[] poaPolicy = new Policy[3]; poaPolicy[i++] = rootPOA.create_lifespan_policy( LifespanPolicyValue.TRANSIENT); poaPolicy[i++] = rootPOA.create_id_assignment_policy( IdAssignmentPolicyValue.SYSTEM_ID); poaPolicy[i++] = rootPOA.create_servant_retention_policy( ServantRetentionPolicyValue.RETAIN); biPOA = rootPOA.create_POA("BindingIteratorPOA", null, poaPolicy ); biPOA.the_POAManager().activate( ); } catch( Exception e ) { throw readWrapper.namingCtxBindingIteratorCreate( e ) ; } }
Example 10
Source Project: openjdk-jdk8u-backup Source File: StubAdapter.java License: GNU General Public License v2.0 | 6 votes |
/** 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 ; }
Example 11
Source Project: TencentKona-8 Source File: POAFactory.java License: GNU General Public License v2.0 | 6 votes |
public synchronized POA getRootPOA() { if (rootPOA == null) { // See if we are trying to getRootPOA while shutting down the ORB. if (isShuttingDown) { throw omgWrapper.noObjectAdaptor( ) ; } try { Object obj = orb.resolve_initial_references( ORBConstants.ROOT_POA_NAME ) ; rootPOA = (POAImpl)obj ; } catch (InvalidName inv) { throw wrapper.cantResolveRootPoa( inv ) ; } } return rootPOA; }
Example 12
Source Project: JDKSourceCode1.8 Source File: NamingContextImpl.java License: MIT License | 6 votes |
private synchronized void createbiPOA( ) { if( biPOA != null ) { return; } try { POA rootPOA = (POA) orb.resolve_initial_references( ORBConstants.ROOT_POA_NAME ); rootPOA.the_POAManager().activate( ); int i = 0; Policy[] poaPolicy = new Policy[3]; poaPolicy[i++] = rootPOA.create_lifespan_policy( LifespanPolicyValue.TRANSIENT); poaPolicy[i++] = rootPOA.create_id_assignment_policy( IdAssignmentPolicyValue.SYSTEM_ID); poaPolicy[i++] = rootPOA.create_servant_retention_policy( ServantRetentionPolicyValue.RETAIN); biPOA = rootPOA.create_POA("BindingIteratorPOA", null, poaPolicy ); biPOA.the_POAManager().activate( ); } catch( Exception e ) { throw readWrapper.namingCtxBindingIteratorCreate( e ) ; } }
Example 13
Source Project: hottub Source File: StubAdapter.java License: GNU General Public License v2.0 | 6 votes |
/** 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 ; }
Example 14
Source Project: jdk8u60 Source File: StubAdapter.java License: GNU General Public License v2.0 | 6 votes |
/** 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 ; }
Example 15
Source Project: jdk8u60 Source File: NamingContextImpl.java License: GNU General Public License v2.0 | 6 votes |
private synchronized void createbiPOA( ) { if( biPOA != null ) { return; } try { POA rootPOA = (POA) orb.resolve_initial_references( ORBConstants.ROOT_POA_NAME ); rootPOA.the_POAManager().activate( ); int i = 0; Policy[] poaPolicy = new Policy[3]; poaPolicy[i++] = rootPOA.create_lifespan_policy( LifespanPolicyValue.TRANSIENT); poaPolicy[i++] = rootPOA.create_id_assignment_policy( IdAssignmentPolicyValue.SYSTEM_ID); poaPolicy[i++] = rootPOA.create_servant_retention_policy( ServantRetentionPolicyValue.RETAIN); biPOA = rootPOA.create_POA("BindingIteratorPOA", null, poaPolicy ); biPOA.the_POAManager().activate( ); } catch( Exception e ) { throw readWrapper.namingCtxBindingIteratorCreate( e ) ; } }
Example 16
Source Project: openjdk-8 Source File: TransientNamingContext.java License: GNU General Public License v2.0 | 6 votes |
/** * Constructs a new TransientNamingContext object. * @param orb an orb object. * @param initial the initial naming context. * @exception Exception a Java exception thrown of the base class cannot * initialize. */ public TransientNamingContext(com.sun.corba.se.spi.orb.ORB orb, org.omg.CORBA.Object initial, POA nsPOA ) throws java.lang.Exception { super(orb, nsPOA ); wrapper = NamingSystemException.get( orb, CORBALogDomains.NAMING ) ; this.localRoot = initial; readLogger = orb.getLogger( CORBALogDomains.NAMING_READ); updateLogger = orb.getLogger( CORBALogDomains.NAMING_UPDATE); lifecycleLogger = orb.getLogger( CORBALogDomains.NAMING_LIFECYCLE); lifecycleLogger.fine( "Root TransientNamingContext LIFECYCLE.CREATED" ); }
Example 17
Source Project: hottub Source File: ServantManagerImpl.java License: GNU General Public License v2.0 | 5 votes |
public Servant preinvoke(byte[] oid, POA adapter, String operation, CookieHolder cookie) throws ForwardRequest { String objKey = new String(oid); Servant servant = (Servant) contexts.get(objKey); if (servant == null) { servant = readInContext(objKey); } return servant; }
Example 18
Source Project: openjdk-8 Source File: POAImpl.java License: GNU General Public License v2.0 | 5 votes |
/** * <code>the_parent</code> * <b>Section 3.3.8.7</b> */ public POA the_parent() { try { lock() ; return parent; } finally { unlock() ; } }
Example 19
Source Project: jdk1.8-source-analysis Source File: ServantManagerImpl.java License: Apache License 2.0 | 5 votes |
public Servant preinvoke(byte[] oid, POA adapter, String operation, CookieHolder cookie) throws ForwardRequest { String objKey = new String(oid); Servant servant = (Servant) contexts.get(objKey); if (servant == null) { servant = readInContext(objKey); } return servant; }
Example 20
Source Project: jdk1.8-source-analysis Source File: PersistentBindingIterator.java License: Apache License 2.0 | 5 votes |
/** * Constructs a new PersistentBindingIterator object. * @param orb a org.omg.CORBA.ORB object. * @param aTable A hashtable containing InternalBindingValues which is * the content of the PersistentNamingContext. * @param java.lang.Exception a Java exception. * @exception Exception a Java exception thrown of the base class cannot * initialize. */ public PersistentBindingIterator(org.omg.CORBA.ORB orb, Hashtable aTable, POA thePOA ) throws java.lang.Exception { super(orb); this.orb = orb; theHashtable = aTable; theEnumeration = this.theHashtable.keys(); currentSize = this.theHashtable.size(); biPOA = thePOA; }
Example 21
Source Project: jdk1.8-source-analysis Source File: POAImpl.java License: Apache License 2.0 | 5 votes |
/** * <code>the_parent</code> * <b>Section 3.3.8.7</b> */ public POA the_parent() { try { lock() ; return parent; } finally { unlock() ; } }
Example 22
Source Project: jdk1.8-source-analysis Source File: POACurrent.java License: Apache License 2.0 | 5 votes |
public POA get_POA() throws NoContext { POA poa = (POA)(peekThrowNoContext().oa()); throwNoContextIfNull(poa); return poa; }
Example 23
Source Project: openjdk-jdk9 Source File: POAManagerImpl.java License: GNU General Public License v2.0 | 5 votes |
synchronized void addPOA(POA poa) { // XXX This is probably not the correct error if (state.value() == State._INACTIVE) { POASystemException wrapper = factory.getWrapper(); throw wrapper.addPoaInactive( CompletionStatus.COMPLETED_NO ) ; } poas.add(poa); }
Example 24
Source Project: openjdk-8 Source File: POAManagerImpl.java License: GNU General Public License v2.0 | 5 votes |
synchronized void addPOA(POA poa) { // XXX This is probably not the correct error if (state.value() == State._INACTIVE) { POASystemException wrapper = factory.getWrapper(); throw wrapper.addPoaInactive( CompletionStatus.COMPLETED_NO ) ; } poas.add(poa); }
Example 25
Source Project: openjdk-jdk8u-backup Source File: POAImpl.java License: GNU General Public License v2.0 | 5 votes |
/** * <code>the_parent</code> * <b>Section 3.3.8.7</b> */ public POA the_parent() { try { lock() ; return parent; } finally { unlock() ; } }
Example 26
Source Project: openjdk-jdk8u Source File: ServantManagerImpl.java License: GNU General Public License v2.0 | 5 votes |
public Servant preinvoke(byte[] oid, POA adapter, String operation, CookieHolder cookie) throws ForwardRequest { String objKey = new String(oid); Servant servant = (Servant) contexts.get(objKey); if (servant == null) { servant = readInContext(objKey); } return servant; }
Example 27
Source Project: openjdk-jdk8u Source File: TransientBindingIterator.java License: GNU General Public License v2.0 | 5 votes |
/** * Constructs a new TransientBindingIterator object. * @param orb a org.omg.CORBA.ORB object. * @param aTable A hashtable containing InternalBindingValues which is * the content of the TransientNamingContext. * @param java.lang.Exception a Java exception. * @exception Exception a Java exception thrown of the base class cannot * initialize. */ public TransientBindingIterator(ORB orb, Hashtable aTable, POA thePOA ) throws java.lang.Exception { super(orb); theHashtable = aTable; theEnumeration = this.theHashtable.elements(); currentSize = this.theHashtable.size(); this.nsPOA = thePOA; }
Example 28
Source Project: openjdk-jdk9 Source File: TransientBindingIterator.java License: GNU General Public License v2.0 | 5 votes |
/** * Constructs a new TransientBindingIterator object. * @param orb a org.omg.CORBA.ORB object. * @param aTable A hashtable containing InternalBindingValues which is * the content of the TransientNamingContext. * @exception Exception a Java exception thrown of the base class cannot * initialize. */ public TransientBindingIterator(ORB orb, Hashtable aTable, POA thePOA ) throws java.lang.Exception { super(orb); theHashtable = aTable; theEnumeration = this.theHashtable.elements(); currentSize = this.theHashtable.size(); this.nsPOA = thePOA; }
Example 29
Source Project: openjdk-8-source Source File: ServantManagerImpl.java License: GNU General Public License v2.0 | 5 votes |
public Servant preinvoke(byte[] oid, POA adapter, String operation, CookieHolder cookie) throws ForwardRequest { String objKey = new String(oid); Servant servant = (Servant) contexts.get(objKey); if (servant == null) { servant = readInContext(objKey); } return servant; }
Example 30
Source Project: TencentKona-8 Source File: POACurrent.java License: GNU General Public License v2.0 | 5 votes |
public POA get_POA() throws NoContext { POA poa = (POA)(peekThrowNoContext().oa()); throwNoContextIfNull(poa); return poa; }