Package org.jacorb.poa

Examples of org.jacorb.poa.POA


        // nothing to do
    }

    private void deliverRequest( ServerRequest request )
    {
        POA tmp_poa = rootPOA;
        String res;
        List scopes;

        try
        {
            // This is similar to code within ORB::findPOA but
            // sufficiently different that it is reproduced here.
           String refImplName = "";
           final String orbImplName = orb.getImplName();
           final String orbServerId = orb.getServerIdString();

           try
           {
              refImplName =
                 org.jacorb.poa.util.POAUtil.extractImplName( request.objectKey() );
           }
           catch( org.jacorb.poa.except.POAInternalError pie )
           {
              logger.debug
                  ("serverRequestListener: reference generated by foreign POA");
           }
           if( !(orbImplName.equals(refImplName)) &&
               !(orbServerId.equals(refImplName)))
           {
               if (logger.isDebugEnabled())
               {
                   logger.debug
                   (
                      "serverRequestListener: impl_name mismatch (refImplName: " +
                      refImplName +
                      " and orbServerId " +
                      orbServerId +
                      " and orbImplName " +
                      orbImplName
                   );
               }
              throw new org.omg.PortableServer.POAPackage.WrongAdapter();
           }

            // Get cached scopes from ServerRequest
            scopes = request.getScopes();

            for( int i = 0; i < scopes.size(); i++)
            {
                res = ((String)scopes.get (i));

                if( res.equals(""))
                {
                    break;
                }

                /* the following is a call to a method in the private
                   interface between the ORB and the POA. It does the
                   necessary synchronization between incoming,
                   potentially concurrent requests to activate a POA
                   using its adapter activator. This call will block
                   until the correct POA is activated and ready to
                   service requests. Thus, concurrent calls
                   originating from a single, multi-threaded client
                   will be serialized because the thread that accepts
                   incoming requests from the client process is
                   blocked. Concurrent calls from other destinations
                   are not serialized unless they involve activating
                   the same adapter.
                */

                try
                {
                    tmp_poa = tmp_poa._getChildPOA( res );
                }
                catch ( org.jacorb.poa.except.ParentIsHolding p )
                {
                    /* if one of the POAs is in holding state, we
                       simply deliver deliver the request to this
                       POA. It will forward the request to its
                       child POAs if necessary when changing back
                       to active For the POA to be able to forward
                       this request to its child POAa, we need to
                       supply the remaining part of the child's
                       POA name */

                    String [] rest_of_name = new String[scopes.size () - i];
                    for( int j = 0; j < i; j++ )
                    {
                        rest_of_name[j] = (String)scopes.get( j+i );
                    }

                    request.setRemainingPOAName(rest_of_name);

                    break;
                }
            }

            if( tmp_poa == null )
            {
                throw new org.omg.CORBA.INTERNAL("Request POA null!");
            }
            /* hand over to the POA */
            tmp_poa._invoke( request );
        }
        catch( org.omg.PortableServer.POAPackage.WrongAdapter e )
        {
            // unknown oid (not previously generated)
            request.setSystemException( new org.omg.CORBA.OBJECT_NOT_EXIST("unknown oid") );
View Full Code Here


        }

        final byte[] oid_ = oid;
        final RequestController requestController_ = requestController;
        final ServantActivator servantActivator_ = servantActivator;
        final POA poa_ = poa;
        final boolean cleanupInProgress_ = cleanupInProgress;

        Thread thread = new Thread("AOM_RemovalThread")
        {
            public void run()
View Full Code Here

        // nothing to do
    }

    private void deliverRequest( ServerRequest request )
    {
        POA tmp_poa = rootPOA;
        String res;
        List scopes;

        try
        {
            // This is similar to code within ORB::findPOA but
            // sufficiently different that it is reproduced here.
           String refImplName = "";
           final String orbImplName = orb.getImplName();
           final String orbServerId = orb.getServerIdString();

           try
           {
              refImplName =
                 org.jacorb.poa.util.POAUtil.extractImplName( request.objectKey() );
           }
           catch( org.jacorb.poa.except.POAInternalError pie )
           {
              logger.debug
                  ("serverRequestListener: reference generated by foreign POA");
           }
           if( !(orbImplName.equals(refImplName)) &&
               !(orbServerId.equals(refImplName)))
           {
               if (logger.isDebugEnabled())
               {
                   logger.debug
                   (
                      "serverRequestListener: impl_name mismatch (refImplName: " +
                      refImplName +
                      " and orbServerId " +
                      orbServerId +
                      " and orbImplName " +
                      orbImplName
                   );
               }
              throw new org.omg.PortableServer.POAPackage.WrongAdapter();
           }

            // Get cached scopes from ServerRequest
            scopes = request.getScopes();

            for( int i = 0; i < scopes.size(); i++)
            {
                res = ((String)scopes.get (i));

                if( res.equals(""))
                {
                    break;
                }

                /* the following is a call to a method in the private
                   interface between the ORB and the POA. It does the
                   necessary synchronization between incoming,
                   potentially concurrent requests to activate a POA
                   using its adapter activator. This call will block
                   until the correct POA is activated and ready to
                   service requests. Thus, concurrent calls
                   originating from a single, multi-threaded client
                   will be serialized because the thread that accepts
                   incoming requests from the client process is
                   blocked. Concurrent calls from other destinations
                   are not serialized unless they involve activating
                   the same adapter.
                */

                try
                {
                    tmp_poa = tmp_poa._getChildPOA( res );
                }
                catch ( org.jacorb.poa.except.ParentIsHolding p )
                {
                    /* if one of the POAs is in holding state, we
                       simply deliver deliver the request to this
                       POA. It will forward the request to its
                       child POAs if necessary when changing back
                       to active For the POA to be able to forward
                       this request to its child POAa, we need to
                       supply the remaining part of the child's
                       POA name */

                    String [] rest_of_name = new String[scopes.size () - i];
                    for( int j = 0; j < i; j++ )
                    {
                        rest_of_name[j] = (String)scopes.get( j+i );
                    }

                    request.setRemainingPOAName(rest_of_name);

                    break;
                }
            }

            if( tmp_poa == null )
            {
                throw new org.omg.CORBA.INTERNAL("Request POA null!");
            }
            /* hand over to the POA */
            tmp_poa._invoke( request );
        }
        catch( org.omg.PortableServer.POAPackage.WrongAdapter e )
        {
            // unknown oid (not previously generated)
            request.setSystemException( new org.omg.CORBA.OBJECT_NOT_EXIST("unknown oid") );
View Full Code Here

        // nothing to do
    }

    private void deliverRequest( ServerRequest request )
    {
        POA tmp_poa = rootPOA;
        String res;
        List scopes;

        try
        {
            // This is similar to code within ORB::findPOA but
            // sufficiently different that it is reproduced here.
           String refImplName = "";
           final String orbImplName = orb.getImplName();
           final String orbServerId = orb.getServerIdString();

           try
           {
              refImplName =
                 org.jacorb.poa.util.POAUtil.extractImplName( request.objectKey() );
           }
           catch( org.jacorb.poa.except.POAInternalError pie )
           {
              logger.debug
                  ("serverRequestListener: reference generated by foreign POA");
           }
           if( !(orbImplName.equals(refImplName)) &&
               !(orbServerId.equals(refImplName)))
           {
               if (logger.isDebugEnabled())
               {
                   logger.debug
                   (
                      "serverRequestListener: impl_name mismatch (refImplName: " +
                      refImplName +
                      " and orbServerId " +
                      orbServerId +
                      " and orbImplName " +
                      orbImplName
                   );
               }
              throw new org.omg.PortableServer.POAPackage.WrongAdapter();
           }

            // Get cached scopes from ServerRequest
            scopes = request.getScopes();

            for( int i = 0; i < scopes.size(); i++)
            {
                res = ((String)scopes.get (i));

                if( res.equals(""))
                {
                    break;
                }

                /* the following is a call to a method in the private
                   interface between the ORB and the POA. It does the
                   necessary synchronization between incoming,
                   potentially concurrent requests to activate a POA
                   using its adapter activator. This call will block
                   until the correct POA is activated and ready to
                   service requests. Thus, concurrent calls
                   originating from a single, multi-threaded client
                   will be serialized because the thread that accepts
                   incoming requests from the client process is
                   blocked. Concurrent calls from other destinations
                   are not serialized unless they involve activating
                   the same adapter.
                */

                try
                {
                    tmp_poa = tmp_poa._getChildPOA( res );
                }
                catch ( org.jacorb.poa.except.ParentIsHolding p )
                {
                    /* if one of the POAs is in holding state, we
                       simply deliver deliver the request to this
                       POA. It will forward the request to its
                       child POAs if necessary when changing back
                       to active For the POA to be able to forward
                       this request to its child POAa, we need to
                       supply the remaining part of the child's
                       POA name */

                    String [] rest_of_name = new String[scopes.size () - i];
                    for( int j = 0; j < i; j++ )
                    {
                        rest_of_name[j] = (String)scopes.get( j+i );
                    }

                    request.setRemainingPOAName(rest_of_name);

                    break;
                }
            }

            if( tmp_poa == null )
            {
                throw new org.omg.CORBA.INTERNAL("Request POA null!");
            }
            /* hand over to the POA */
            tmp_poa._invoke( request );
        }
        catch( org.omg.PortableServer.POAPackage.WrongAdapter e )
        {
            // unknown oid (not previously generated)
            request.setSystemException( new org.omg.CORBA.OBJECT_NOT_EXIST("unknown oid") );
View Full Code Here

    {
    }

    private void deliverRequest( ServerRequest request )
    {
        POA tmp_poa = rootPOA;
        String res;
        List scopes;

        try
        {
            // Get cached scopes from ServerRequest
            scopes = request.getScopes();

            for( int i = 0; i < scopes.size(); i++)
            {
                res = ((String)scopes.get (i));

                if( res.equals(""))
                    break;

                /* the following is a call to a method in the private
                   interface between the ORB and the POA. It does the
                   necessary synchronization between incoming,
                   potentially concurrent requests to activate a POA
                   using its adapter activator. This call will block
                   until the correct POA is activated and ready to
                   service requests. Thus, concurrent calls
                   originating from a single, multi-threaded client
                   will be serialized because the thread that accepts
                   incoming requests from the client process is
                   blocked. Concurrent calls from other destinations
                   are not serialized unless they involve activating
                   the same adapter.
                */

                try
                {
                    tmp_poa = tmp_poa._getChildPOA( res );
                }
                catch ( org.jacorb.poa.except.ParentIsHolding p )
                {
                    /* if one of the POAs is in holding state, we
                       simply deliver deliver the request to this
                       POA. It will forward the request to its
                       child POAs if necessary when changing back
                       to active For the POA to be able to forward
                       this request to its child POAa, we need to
                       supply the remaining part of the child's
                       POA name */

                    String [] rest_of_name = new String[scopes.size () - i];
                    for( int j = 0; j < i; j++ )
                    {
                        rest_of_name[j] = (String)scopes.get( j+i );
                    }

                    request.setRemainingPOAName(rest_of_name);

                    break;
                }
            }

            if( tmp_poa == null )
            {
                throw new org.omg.CORBA.INTERNAL("Request POA null!");
            }
            else
            {
                /* hand over to the POA */
                tmp_poa._invoke( request );
            }
        }
        catch( org.omg.PortableServer.POAPackage.WrongAdapter wa )
        {
            // unknown oid (not previously generated)
View Full Code Here

        org.jacorb.poa.POA poa = (org.jacorb.poa.POA) servant._poa();
        adapter_id = poa.getPOAId();
        String[] all_ifs = servant._all_interfaces(poa, servant._object_id());
        target_most_derived_interface = all_ifs[0];

        POA parent = poa;
        ArrayList<String> al = new ArrayList<String> ();

        while (parent != null)
        {
           al.add (parent.the_name ());
           parent = (POA) parent.the_parent ();
         }
         int size = al.size ();
         adapter_name = new String [size];

         // We can't just do toArray as otherwise adapter_name would be in
View Full Code Here

        // nothing to do
    }

    private void deliverRequest( ServerRequest request )
    {
        POA tmp_poa = rootPOA;
        List<String> scopes;

        //MIOP reception of messages from group
        TagGroupTaggedComponent tagGroup = request.getTagGroup();
        if(tagGroup != null)
        {
            ((GOA)rootPOA).processGroupRequest(tagGroup,request);
            return;
        }
        try
        {
            // This is similar to code within ORB::findPOA but
            // sufficiently different that it is reproduced here.
           String refImplName = "";
           final String orbImplName = orb.getImplName();
           final String orbServerId = orb.getServerIdString();

           try
           {
              refImplName =
                 org.jacorb.poa.util.POAUtil.extractImplName( request.objectKey() );
           }
           catch( org.jacorb.poa.except.POAInternalError pie )
           {
              logger.debug
                  ("serverRequestListener: reference generated by foreign POA");
           }
           if( !(orbImplName.equals(refImplName)) &&
               !(orbServerId.equals(refImplName)))
           {
               if (logger.isDebugEnabled())
               {
                   logger.debug
                   (
                      "serverRequestListener: impl_name mismatch (refImplName: " +
                      refImplName +
                      " and orbServerId " +
                      orbServerId +
                      " and orbImplName " +
                      orbImplName
                   );
               }
              throw new org.omg.PortableServer.POAPackage.WrongAdapter();
           }

            // Get cached scopes from ServerRequest
            scopes = request.getScopes();

            for( int i = 0; i < scopes.size(); i++)
            {
                final String res = (scopes.get (i));

                if( res.length() == 0)
                {
                    break;
                }

                /* the following is a call to a method in the private
                   interface between the ORB and the POA. It does the
                   necessary synchronization between incoming,
                   potentially concurrent requests to activate a POA
                   using its adapter activator. This call will block
                   until the correct POA is activated and ready to
                   service requests. Thus, concurrent calls
                   originating from a single, multi-threaded client
                   will be serialized because the thread that accepts
                   incoming requests from the client process is
                   blocked. Concurrent calls from other destinations
                   are not serialized unless they involve activating
                   the same adapter.
                */

                try
                {
                    tmp_poa = tmp_poa._getChildPOA( res );
                }
                catch ( org.jacorb.poa.except.ParentIsHolding p )
                {
                    /* if one of the POAs is in holding state, we
                       simply deliver the request to this
                       POA. It will forward the request to its
                       child POAs if necessary when changing back
                       to active For the POA to be able to forward
                       this request to its child POAa, we need to
                       supply the remaining part of the child's
                       POA name */

                    String [] rest_of_name = new String[scopes.size () - i];
                    for( int j = 0; j < rest_of_name.length; j++ )
                    {
                        rest_of_name[j] = scopes.get( j+i );
                    }

                    request.setRemainingPOAName(rest_of_name);

                    break;
                }
            }

            if( tmp_poa == null )
            {
                throw new org.omg.CORBA.INTERNAL("Request POA null!");
            }
            /* hand over to the POA */
            tmp_poa._invoke( request );
        }
        catch( org.omg.PortableServer.POAPackage.WrongAdapter e )
        {
            // unknown oid (not previously generated)
            request.setSystemException( new org.omg.CORBA.OBJECT_NOT_EXIST("unknown oid") );
View Full Code Here

        }


        try
        {
            POA tmp_poa = rootpoa;
            String poa_name =
                POAUtil.extractPOAName( delegateObjectKey );

            /* strip scoped poa name (first part of the object key before "::",
             *  will be empty for the root poa
             */
            List<String> scopes = POAUtil.extractScopedPOANames (poa_name);

            for ( int i = 0; i < scopes.size(); i++)
            {
                String res = (scopes.get( i ));

                if ( "".equals (res))
                {
                    break;
                }

                /* the following is a  call to a method in the private
                   interface between the ORB  and the POA. It does the
                   necessary    synchronization    between   incoming,
                   potentially concurrent  requests to activate  a POA
                   using its  adapter activator. This  call will block
                   until  the correct  POA is  activated and  ready to
                   service    requests.    Thus,    concurrent   calls
                   originating  from a  single,  multi-threaded client
                   will be serialized  because the thread that accepts
                   incoming  requests  from   the  client  process  is
                   blocked.  Concurrent  calls from other destinations
                   are not  serialized unless they  involve activating
                   the same adapter.  */

                try
                {
                    tmp_poa = tmp_poa._getChildPOA( res );
                }
                catch ( org.jacorb.poa.except.ParentIsHolding p )
                {
                    if ( logger.isDebugEnabled() )
                    {
                        logger.debug("findPOA: holding adapter");
                    }
                    return null;
                }
            }
            byte[] objectId = POAUtil.extractOID( reference );

            if ( tmp_poa.isSystemId()
                    && ! tmp_poa.previouslyGeneratedObjectId(objectId))
            {
                if ( logger.isDebugEnabled() )
                {
                    logger.debug("findPOA: not a previously generated object key.");
                }
View Full Code Here

    public synchronized POA getRootPOA() throws org.omg.CORBA.INITIALIZE
    {
        if ( rootpoa == null )
        {
            POA tmppoa = POA._POA_init(this);
            tmppoa = org.jacorb.poa.POA._POA_init(this);

            basicAdapter = new BasicAdapter( this,
                                             tmppoa,
                                             getTransportManager(),
                                             giop_connection_manager
                                           );

            try
            {
                tmppoa.configure(configuration);
                basicAdapter.configure(configuration);
            }
            catch ( ConfigurationException ce )
            {
                throw new org.omg.CORBA.INITIALIZE("ConfigurationException: " +
View Full Code Here

TOP

Related Classes of org.jacorb.poa.POA

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.