Package com.sun.corba.se.spi.servicecontext

Examples of com.sun.corba.se.spi.servicecontext.ServiceContexts


                // thread to unstack the dispatch and wait for other requests.
                if (ex.originalEx instanceof RequestCanceledException) {
                    throw (RequestCanceledException) ex.originalEx;
                }

                ServiceContexts contexts = new ServiceContexts(orb);
                UEInfoServiceContext usc = new UEInfoServiceContext(
                    ex.originalEx);

                contexts.put( usc ) ;

                SystemException sysex = wrapper.unknownExceptionInDispatch(
                        CompletionStatus.COMPLETED_MAYBE, ex ) ;
                request.getProtocolHandler()
                    .createSystemExceptionResponse(request, sysex,
View Full Code Here


            if (orb.subcontractDebugFlag) {
                dprint(".consumeServiceContexts->: "
                       + opAndId(request));
            }

            ServiceContexts ctxts = request.getRequestServiceContexts();
            ServiceContext sc ;

            GIOPVersion giopVersion = request.getGIOPVersion();

            // we cannot depend on this since for our local case, we do not send
            // in this service context.  Can we rely on just the CodeSetServiceContext?
            // boolean rtSC = false; // Runtime ServiceContext

            boolean hasCodeSetContext = processCodeSetContext(request, ctxts);

            if (orb.subcontractDebugFlag) {
                dprint(".consumeServiceContexts: " + opAndId(request)
                       + ": GIOP version: " + giopVersion);
                dprint(".consumeServiceContexts: " + opAndId(request)
                       + ": as code set context? " + hasCodeSetContext);
            }

            sc = ctxts.get(
                SendingContextServiceContext.SERVICE_CONTEXT_ID ) ;

            if (sc != null) {
                SendingContextServiceContext scsc =
                    (SendingContextServiceContext)sc ;
                IOR ior = scsc.getIOR() ;

                try {
                    ((CorbaConnection)request.getConnection())
                        .setCodeBaseIOR(ior);
                } catch (ThreadDeath td) {
                    throw td ;
                } catch (Throwable t) {
                    throw wrapper.badStringifiedIor( t ) ;
                }
            }

            // the RTSC is sent only once during session establishment.  We
            // need to find out if the CodeBaseRef is already set.  If yes,
            // then also the rtSC flag needs to be set to true
            // this is not possible for the LocalCase since there is no
            // IIOPConnection for the LocalCase

            // used for a case where we have JDK 1.3 supporting 1.0 protocol,
            // but sending 2 service contexts, that is not normal as per
            // GIOP rules, based on above information, we figure out that we
            // are talking to the legacy ORB and set the ORB Version Accordingly.

            // this special case tell us that it is legacy SUN orb
            // and not a foreign one
            // rtSC is not available for localcase due to which this generic
            // path would fail if relying on rtSC
            //if (giopVersion.equals(GIOPVersion.V1_0) && hasCodeSetContext && rtSC)
            boolean isForeignORB = false;

            if (giopVersion.equals(GIOPVersion.V1_0) && hasCodeSetContext) {
                if (orb.subcontractDebugFlag) {
                    dprint(".consumeServiceCOntexts: " + opAndId(request)
                           + ": Determined to be an old Sun ORB");
                }

                orb.setORBVersion(ORBVersionFactory.getOLD()) ;
                // System.out.println("setting legacy ORB version");
            } else {
                // If it didn't include our ORB version service context (below),
                // then it must be a foreign ORB.
                isForeignORB = true;
            }

            // try to get the ORBVersion sent as part of the ServiceContext
            // if any
            sc = ctxts.get( ORBVersionServiceContext.SERVICE_CONTEXT_ID ) ;
            if (sc != null) {
                ORBVersionServiceContext ovsc =
                   (ORBVersionServiceContext) sc;

                ORBVersion version = ovsc.getVersion();
View Full Code Here

        try {
            if (orb.subcontractDebugFlag) {
                dprint(".sendingReply->: " + opAndId(req));
            }

            ServiceContexts scs = new ServiceContexts(orb);
            return req.getProtocolHandler().createResponse(req, scs);
        } finally {
            if (orb.subcontractDebugFlag) {
                dprint(".sendingReply<-: " + opAndId(req));
            }
View Full Code Here

        try {
            if (orb.subcontractDebugFlag) {
                dprint(".sendingReply/Any->: " + opAndId(req));
            }

            ServiceContexts scs = new ServiceContexts(orb);

            // Check if the servant set a SystemException or
            // UserException
            CorbaMessageMediator resp;
            String repId=null;
View Full Code Here

    // IO methods

    public void read(org.omg.CORBA.portable.InputStream istream) {
        super.read(istream);
        this.service_contexts
            = new ServiceContexts((org.omg.CORBA_2_3.portable.InputStream) istream);
        this.request_id = istream.read_ulong();
        this.reply_status = istream.read_long();
        isValidReplyStatus(this.reply_status); // raises exception on error

        // The code below reads the reply body in some cases
View Full Code Here

        }
        this.target = TargetAddressHelper.read(istream);
        getObjectKey(); // this does AddressingDisposition check
        this.operation = istream.read_string();
        this.service_contexts
            = new ServiceContexts((org.omg.CORBA_2_3.portable.InputStream) istream);

        // CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
        // aligned on an 8 octet boundary.
        // Ensures that the first read operation called from the stub code,
        // during body deconstruction, would skip the header padding, that was
View Full Code Here

    // IO methods

    public void read(org.omg.CORBA.portable.InputStream istream) {
        super.read(istream);
        this.service_contexts
            = new ServiceContexts((org.omg.CORBA_2_3.portable.InputStream) istream);
        this.request_id = istream.read_ulong();
        this.response_expected = istream.read_boolean();
        int _len0 = istream.read_long();
        this.object_key = new byte[_len0];
        istream.read_octet_array(this.object_key, 0, _len0);
View Full Code Here

        super.read(istream);
        this.request_id = istream.read_ulong();
        this.reply_status = istream.read_long();
        isValidReplyStatus(this.reply_status); // raises exception on error
        this.service_contexts
            = new ServiceContexts((org.omg.CORBA_2_3.portable.InputStream) istream);

        // CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
        // aligned on an 8 octet boundary.
        // Ensures that the first read operation called from the stub code,
        // during body deconstruction, would skip the header padding, that was
View Full Code Here

    // IO methods

    public void read(org.omg.CORBA.portable.InputStream istream) {
        super.read(istream);
        this.service_contexts
            = new ServiceContexts((org.omg.CORBA_2_3.portable.InputStream) istream);
        this.request_id = istream.read_ulong();
        this.reply_status = istream.read_long();
        isValidReplyStatus(this.reply_status); // raises exception on error

        // The code below reads the reply body in some cases
View Full Code Here

                }
            }

            // No retry, so see if was unknown.

            ServiceContexts contexts =
                messageMediator.getReplyServiceContexts();
            if (contexts != null) {
                UEInfoServiceContext usc =
                    (UEInfoServiceContext)
                    contexts.get(UEInfoServiceContext.SERVICE_CONTEXT_ID);

                if (usc != null) {
                    Throwable unknown = usc.getUE() ;
                    UnknownException ue = new UnknownException(unknown);
View Full Code Here

TOP

Related Classes of com.sun.corba.se.spi.servicecontext.ServiceContexts

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.