Java Code Examples for org.omg.PortableServer.POA

The following are top voted examples for showing how to use org.omg.PortableServer.POA. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: OpenJSharp   File: StubAdapter.java   View source code 6 votes vote down vote up
/** 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 2
Project: OpenJSharp   File: TransientNamingContext.java   View source code 6 votes vote down vote up
/**
 * 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 3
Project: OpenJSharp   File: NamingContextImpl.java   View source code 6 votes vote down vote up
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 4
Project: OpenJSharp   File: POAImpl.java   View source code 6 votes vote down vote up
/**
 * <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 5
Project: OpenJSharp   File: POAFactory.java   View source code 6 votes vote down vote up
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 6
Project: openjdk-jdk10   File: StubAdapter.java   View source code 6 votes vote down vote up
/** 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 7
Project: openjdk-jdk10   File: TransientNamingContext.java   View source code 6 votes vote down vote up
/**
 * 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
Project: openjdk-jdk10   File: NamingContextImpl.java   View source code 6 votes vote down vote up
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 9
Project: openjdk-jdk10   File: POAImpl.java   View source code 6 votes vote down vote up
/**
 * <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 10
Project: openjdk-jdk10   File: POAFactory.java   View source code 6 votes vote down vote up
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 11
Project: openjdk9   File: StubAdapter.java   View source code 6 votes vote down vote up
/** 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 12
Project: openjdk9   File: TransientNamingContext.java   View source code 6 votes vote down vote up
/**
 * 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 13
Project: openjdk9   File: NamingContextImpl.java   View source code 6 votes vote down vote up
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 14
Project: openjdk9   File: POAImpl.java   View source code 6 votes vote down vote up
/**
 * <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 15
Project: openjdk9   File: POAFactory.java   View source code 6 votes vote down vote up
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 16
Project: lookaside_java-1.8.0-openjdk   File: StubAdapter.java   View source code 6 votes vote down vote up
/** 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 17
Project: lookaside_java-1.8.0-openjdk   File: TransientNamingContext.java   View source code 6 votes vote down vote up
/**
 * 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 18
Project: lookaside_java-1.8.0-openjdk   File: NamingContextImpl.java   View source code 6 votes vote down vote up
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 19
Project: lookaside_java-1.8.0-openjdk   File: POAImpl.java   View source code 6 votes vote down vote up
/**
 * <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 20
Project: lookaside_java-1.8.0-openjdk   File: POAFactory.java   View source code 6 votes vote down vote up
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 21
Project: jdk8u_corba   File: StubAdapter.java   View source code 6 votes vote down vote up
/** 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 22
Project: javify   File: gnuPoaCurrent.java   View source code 6 votes vote down vote up
/**
 * Check if this Poa has some running threads.
 */
public boolean has(POA poa)
{
  synchronized (threads)
    {
      Iterator iter = threads.entrySet().iterator();
      while (iter.hasNext())
        {
          Map.Entry item = (Map.Entry) iter.next();
          try
            {
              if (((CurrentOperations) item.getValue()).get_POA() == poa)
                {
                  return true;
                }
            }
          catch (NoContext ex)
            {
              throw new InternalError();
            }
        }
    }
  return false;
}
 
Example 23
Project: jdk8u_corba   File: TransientNamingContext.java   View source code 6 votes vote down vote up
/**
 * 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 24
Project: jdk8u_corba   File: NamingContextImpl.java   View source code 6 votes vote down vote up
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 25
Project: jdk8u_corba   File: POAImpl.java   View source code 6 votes vote down vote up
/**
 * <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 26
Project: jdk8u_corba   File: POAFactory.java   View source code 6 votes vote down vote up
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 27
Project: javify   File: gnuPOA.java   View source code 6 votes vote down vote up
RefTemplate()
{
  // The adapter name is computed once.
  ArrayList names = new ArrayList();
  names.add(the_name());

  POA poa = the_parent();
  while (poa != null)
    {
      names.add(poa.the_name());
      poa = poa.the_parent();
    }

  // Fill in the string array in reverse (more natural) order,
  // root POA first.
  m_adapter_name = new String[names.size()];

  for (int i = 0; i < m_adapter_name.length; i++)
    m_adapter_name[i] = (String) names.get(m_adapter_name.length - i - 1);
}
 
Example 28
Project: javify   File: gnuPOA.java   View source code 6 votes vote down vote up
/**
 * Create an instance of the POA with the given features.
 * This method is not responsible for duplicate checking
 * or adding the returned instance to any possible table.
 *
 * @param child_name the name of the poa being created.
 * @param a_manager the poa manager (never null).
 * @param policies the array of policies.
 * @param an_orb the ORB for this POA.
 *
 * @return the created POA.
 *
 * @throws InvalidPolicy for conflicting or otherwise invalid policies.|
 */
protected POA createPoaInstance(String child_name, POAManager a_manager,
                                Policy[] policies, ORB_1_4 an_orb
                               )
                         throws InvalidPolicy
{
  POAManager some_manager =
    a_manager == null ? new gnuPOAManager() : a_manager;

  if (some_manager instanceof gnuPOAManager)
    {
      ((gnuPOAManager) some_manager).addPoa(this);
    }

  return new gnuPOA(this, child_name, some_manager, policies, an_orb);
}
 
Example 29
Project: javify   File: gnuPOA.java   View source code 6 votes vote down vote up
/**
 * Get the unique Id of the POA in the process in which it is created.
 * This Id is needed by portable interceptors. The id is unique
 * for the life span of the POA in the process. For persistent
 * POAs, if a POA is created in the same path with the same name as
 * another POA, these POAs are identical have the same id. All transient
 * POAs are assumed unique.
 */
public byte[] id()
{
  if (m_poa_id != null)
    return m_poa_id;
  else
    {
      BufferedCdrOutput buffer = new BufferedCdrOutput();
      POA p = this;
      while (p != null)
        {
          buffer.write_string(p.the_name());
          p = p.the_parent();
        }
      m_poa_id = buffer.buffer.toByteArray();
      return m_poa_id;
    }
}
 
Example 30
Project: OpenJSharp   File: NamingContextImpl.java   View source code 5 votes vote down vote up
/**
 * Create a naming context servant.
 * Runs the super constructor.
 * @param orb an ORB object.
 * @exception java.lang.Exception a Java exception.
 */
public NamingContextImpl(ORB orb, POA poa) throws java.lang.Exception {
    super();
    this.orb = orb;
    wrapper = NamingSystemException.get( orb,
        CORBALogDomains.NAMING_UPDATE ) ;

    insImpl = new InterOperableNamingImpl( );
    this.nsPOA = poa;
    readLogger = orb.getLogger( CORBALogDomains.NAMING_READ);
    updateLogger = orb.getLogger( CORBALogDomains.NAMING_UPDATE);
    lifecycleLogger = orb.getLogger(
        CORBALogDomains.NAMING_LIFECYCLE);
}
 
Example 31
Project: OpenJSharp   File: TransientBindingIterator.java   View source code 5 votes vote down vote up
/**
  * 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 32
Project: OpenJSharp   File: ServantManagerImpl.java   View source code 5 votes vote down vote up
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 33
Project: OpenJSharp   File: PersistentBindingIterator.java   View source code 5 votes vote down vote up
/**
  * 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 34
Project: OpenJSharp   File: POAImpl.java   View source code 5 votes vote down vote up
/**
 * <code>the_parent</code>
 * <b>Section 3.3.8.7</b>
 */
public POA the_parent()
{
    try {
        lock() ;

        return parent;
    } finally {
        unlock() ;
    }
}
 
Example 35
Project: OpenJSharp   File: POACurrent.java   View source code 5 votes vote down vote up
public POA get_POA()
    throws
        NoContext
{
    POA poa = (POA)(peekThrowNoContext().oa());
    throwNoContextIfNull(poa);
    return poa;
}
 
Example 36
Project: OpenJSharp   File: POAManagerImpl.java   View source code 5 votes vote down vote up
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 37
Project: OpenJSharp   File: POAManagerImpl.java   View source code 5 votes vote down vote up
synchronized void removePOA(POA poa)
{
    poas.remove(poa);
    if ( poas.isEmpty() ) {
        factory.removePoaManager(this);
    }
}
 
Example 38
Project: OpenJSharp   File: POAPolicyMediatorImpl_NR_USM.java   View source code 5 votes vote down vote up
public void returnServant()
{
    OAInvocationInfo info = orb.peekInvocationInfo();
    if (locator == null)
        return;

    try {
        poa.unlock() ;
        locator.postinvoke(info.id(), (POA)(info.oa()),
            info.getOperation(), info.getCookieHolder().value,
            (Servant)(info.getServantContainer()) );
    } finally {
        poa.lock() ;
    }
}
 
Example 39
Project: openjdk-jdk10   File: NamingContextImpl.java   View source code 5 votes vote down vote up
/**
 * Create a naming context servant.
 * Runs the super constructor.
 * @param orb an ORB object.
 * @exception java.lang.Exception a Java exception.
 */
public NamingContextImpl(ORB orb, POA poa) throws java.lang.Exception {
    super();
    this.orb = orb;
    wrapper = NamingSystemException.get( orb,
        CORBALogDomains.NAMING_UPDATE ) ;

    insImpl = new InterOperableNamingImpl( );
    this.nsPOA = poa;
    readLogger = orb.getLogger( CORBALogDomains.NAMING_READ);
    updateLogger = orb.getLogger( CORBALogDomains.NAMING_UPDATE);
    lifecycleLogger = orb.getLogger(
        CORBALogDomains.NAMING_LIFECYCLE);
}
 
Example 40
Project: openjdk-jdk10   File: TransientBindingIterator.java   View source code 5 votes vote down vote up
/**
  * 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;
 }