Package org.jacorb.orb.giop

Examples of org.jacorb.orb.giop.ClientConnection


           csmList.mechanism_list[0].sas_context_mech.target_requires == 0) {
            return;
        }

        // ask connection for client_context_id
        ClientConnection connection = ((ClientRequestInfoImpl) ri).connection;

        long client_context_id = 0;
        if (useStateful)
            client_context_id = connection.cacheSASContext("css".getBytes());
        if (client_context_id < 0)
        {
            if (logger.isInfoEnabled())
                logger.info("New SAS Context: " + (-client_context_id));
        }
View Full Code Here


                logger.warn("Could not parse SAS reply: " + e);e.printStackTrace();
            throw new org.omg.CORBA.NO_PERMISSION("SAS Could not parse SAS reply: " + e,
                                                  MinorCodes.SAS_CSS_FAILURE,
                                                  CompletionStatus.COMPLETED_MAYBE);
        }
        ClientConnection connection = ((ClientRequestInfoImpl) ri).connection;

        // process CompleteEstablishContext message
        if (contextBody.discriminator() == MTCompleteEstablishContext.value)
        {
            CompleteEstablishContext reply = contextBody.complete_msg();

            // if not stateful, remove from connection
            if (reply.client_context_id > 0 && !reply.context_stateful)
                connection.purgeSASContext(reply.client_context_id);
        }

        // process ContextError message
        if (contextBody.discriminator() == MTContextError.value)
        {
            ContextError reply = contextBody.error_msg();

            // if stateful, remove from connection
            if (reply.client_context_id > 0)
                connection.purgeSASContext(reply.client_context_id);
        }
    }
View Full Code Here

                logger.warn("Could not parse SAS reply: " + e);
            throw new org.omg.CORBA.NO_PERMISSION("SAS Could not parse SAS reply: " + e,
                                                  MinorCodes.SAS_CSS_FAILURE,
                                                  CompletionStatus.COMPLETED_MAYBE);
        }
        ClientConnection connection = ((ClientRequestInfoImpl) ri).connection;

        // process CompleteEstablishContext message
        if (contextBody.discriminator() == MTCompleteEstablishContext.value)
        {
            CompleteEstablishContext reply = contextBody.complete_msg();
            logger.debug("receive_exception MTCompleteEstablishContext: " + reply.client_context_id);

            // if not stateful, remove from connection
            if (reply.client_context_id > 0 && !reply.context_stateful)
                connection.purgeSASContext(reply.client_context_id);
        }

        // process ContextError message
        if (contextBody.discriminator() == MTContextError.value)
        {
            ContextError reply = contextBody.error_msg();
            logger.debug("receive_exception MTContextError: " + reply.client_context_id);

            // if stateful, remove from connection
            if (reply.client_context_id > 0)
                connection.purgeSASContext(reply.client_context_id);
           
            // if context not found, resend with empty context cache
            if (reply.major_status == 2) throw new org.omg.PortableInterceptor.ForwardRequest(ri.target());
        }
    }
View Full Code Here

            synchronized (pending_replies)
            {
                pending_replies.add(receiver);
            }

            ClientConnection cltconn = null;
            synchronized (bind_sync)
            {
                if (ros.getConnection() != connection)
                {
                    logger.debug("invoke: RemarshalException");

                    // RequestOutputStream has been created for
                    // another connection, so try again
                    throw new RemarshalException();
                }
                cltconn = connection;
            }
            // Use the local copy of the client connection to avoid trouble
            // with something else affecting the real connection.
            cltconn.sendRequest(ros, receiver, ros.requestId(), true);
        }
        catch ( org.omg.CORBA.SystemException cfe )
        {
            logger.debug("invoke: SystemException");
View Full Code Here

           csmList.mechanism_list[0].sas_context_mech.target_requires == 0) {
            return;
        }

        // ask connection for client_context_id
        ClientConnection connection = ((ClientRequestInfoImpl) ri).connection;

        long client_context_id = 0;
        if (useStateful)
            client_context_id = connection.cacheSASContext("css".getBytes());
        if (client_context_id < 0)
        {
            if (logger.isInfoEnabled())
                logger.info("New SAS Context: " + (-client_context_id));
        }
View Full Code Here

                logger.warn("Could not parse SAS reply: " + e);e.printStackTrace();
            throw new org.omg.CORBA.NO_PERMISSION("SAS Could not parse SAS reply: " + e,
                                                  MinorCodes.SAS_CSS_FAILURE,
                                                  CompletionStatus.COMPLETED_MAYBE);
        }
        ClientConnection connection = ((ClientRequestInfoImpl) ri).connection;

        // process CompleteEstablishContext message
        if (contextBody.discriminator() == MTCompleteEstablishContext.value)
        {
            CompleteEstablishContext reply = contextBody.complete_msg();

            // if not stateful, remove from connection
            if (reply.client_context_id > 0 && !reply.context_stateful)
                connection.purgeSASContext(reply.client_context_id);
        }

        // process ContextError message
        if (contextBody.discriminator() == MTContextError.value)
        {
            ContextError reply = contextBody.error_msg();

            // if stateful, remove from connection
            if (reply.client_context_id > 0)
                connection.purgeSASContext(reply.client_context_id);
        }
    }
View Full Code Here

                logger.warn("Could not parse SAS reply: " + e);
            throw new org.omg.CORBA.NO_PERMISSION("SAS Could not parse SAS reply: " + e,
                                                  MinorCodes.SAS_CSS_FAILURE,
                                                  CompletionStatus.COMPLETED_MAYBE);
        }
        ClientConnection connection = ((ClientRequestInfoImpl) ri).connection;

        // process CompleteEstablishContext message
        if (contextBody.discriminator() == MTCompleteEstablishContext.value)
        {
            CompleteEstablishContext reply = contextBody.complete_msg();
            logger.debug("receive_exception MTCompleteEstablishContext: " + reply.client_context_id);

            // if not stateful, remove from connection
            if (reply.client_context_id > 0 && !reply.context_stateful)
                connection.purgeSASContext(reply.client_context_id);
        }

        // process ContextError message
        if (contextBody.discriminator() == MTContextError.value)
        {
            ContextError reply = contextBody.error_msg();
            logger.debug("receive_exception MTContextError: " + reply.client_context_id);

            // if stateful, remove from connection
            if (reply.client_context_id > 0)
                connection.purgeSASContext(reply.client_context_id);
           
            // if context not found, resend with empty context cache
            if (reply.major_status == 2) throw new org.omg.PortableInterceptor.ForwardRequest(ri.target());
        }
    }
View Full Code Here

            synchronized (pending_replies)
            {
                pending_replies.add(receiver);
            }

            ClientConnection cltconn = null;
            synchronized (bind_sync)
            {
                if (ros.getConnection() != connection)
                {
                    logger.debug("invoke: RemarshalException");

                    // RequestOutputStream has been created for
                    // another connection, so try again
                    throw new RemarshalException();
                }
                cltconn = connection;
            }
            // Use the local copy of the client connection to avoid trouble
            // with something else affecting the real connection.
            cltconn.sendRequest(ros, receiver, ros.requestId(), true);
        }
        catch ( org.omg.CORBA.SystemException cfe )
        {
            logger.debug("invoke: SystemException");
View Full Code Here

    private boolean checkServerActive(String host, int port, byte []object_key, boolean enp_reused)
    {
        ClientConnectionManager   cm           = null;
        IIOPAddress               address      = null;
        ClientConnection          connection   = null;
        LocateRequestOutputStream lros         = null;
        LocateReplyReceiver       receiver     = null;
        LocateReplyInputStream    lris         = null;
        boolean                   result       = false;

        cm = ((org.jacorb.orb.ORB)orb).getClientConnectionManager ();
        try
        {
            address = new IIOPAddress (host, port);
            address.configure(configuration);

            IIOPProfile iiopProfile = new IIOPProfile(address, object_key);
            iiopProfile.configure(configuration);

            connection = cm.getConnection(iiopProfile);
        }
        catch(ConfigurationException e)
        {
            logger.error("Failed to configure", e);
        }

        if (this.logger.isDebugEnabled())
        {
            this.logger.debug("Pinging " + host + " / " + port);
        }

        try
        {
            lros = new LocateRequestOutputStream (object_key, connection.getId(), 2);
            receiver = new LocateReplyReceiver((org.jacorb.orb.ORB)orb);

            connection.sendRequest(
                lros,
                receiver,
                lros.getRequestId (),
                true ); // response expected
View Full Code Here

           csmList.mechanism_list[0].sas_context_mech.target_requires == 0) {
            return;
        }

        // ask connection for client_context_id
        ClientConnection connection = ((ClientRequestInfoImpl) ri).connection;

        long client_context_id = 0;
        if (useStateful)
            client_context_id = connection.cacheSASContext("css".getBytes());
        if (client_context_id < 0)
        {
            if (logger.isInfoEnabled())
                logger.info("New SAS Context: " + (-client_context_id));
        }
View Full Code Here

TOP

Related Classes of org.jacorb.orb.giop.ClientConnection

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.