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

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


    {
        // access is currently valid for all states:
        //checkAccess( MID_ADD_REPLY_SERVICE_CONTEXT );

        if( currentExecutionPoint == EXECUTION_POINT_ENDING ) {
            ServiceContexts scs = replyMessage.getServiceContexts();

            // May be null.  If this is null, create a new one in its place.
            if( scs == null ) {
                scs = new ServiceContexts( myORB );
                replyMessage.setServiceContexts( scs );
            }

            if( cachedReplyServiceContexts == null ) {
                cachedReplyServiceContexts = new HashMap();
View Full Code Here


        //
        // Instead of throwing a NullPointer, we will
        // "gracefully" handle these with a BAD_PARAM with minor code 25.

        try {
            ServiceContexts serviceContexts =
                messageMediator.getReplyServiceContexts();
            if (serviceContexts == null) {
                throw new NullPointerException();
            }
            return getServiceContext(cachedReplyServiceContexts,
View Full Code Here

                // 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

            requestId,
            !isOneWay,
            ((CorbaContactInfo)this.contactInfo).getEffectiveTargetIOR(),
            this.addrDisposition,
            operationName,
            new ServiceContexts(orb),
            null);
    }
View Full Code Here

     * server's maximum by looking for a tagged component in the IOR.
     */
    public byte getStreamFormatVersionForReply() {

        // NOTE: The request service contexts may indicate the max.
        ServiceContexts svc = getRequestServiceContexts();

        MaxStreamFormatVersionServiceContext msfvsc
            = (MaxStreamFormatVersionServiceContext)svc.get(
                MaxStreamFormatVersionServiceContext.SERVICE_CONTEXT_ID);

        if (msfvsc != null) {
            byte localMaxVersion = ORBUtility.getMaxStreamFormatVersion();
            byte remoteMaxVersion = msfvsc.getMaximumStreamFormatVersion();
View Full Code Here

    public CorbaMessageMediator createUnknownExceptionResponse(
        CorbaMessageMediator messageMediator, UnknownException ex)
    {
        // NOTE: This service context container gets augmented in
        // tail call.
        ServiceContexts contexts = null;
        SystemException sys = new UNKNOWN( 0,
            CompletionStatus.COMPLETED_MAYBE);
        contexts = new ServiceContexts( (ORB)messageMediator.getBroker() );
        UEInfoServiceContext uei = new UEInfoServiceContext(sys);
        contexts.put( uei ) ;
        return createSystemExceptionResponse(messageMediator, sys, contexts);
    }
View Full Code Here

            dprint(".createSystemExceptionResponse: "
                   + opAndId(messageMediator),
                   ex);
        }

        ServiceContexts serviceContexts =
            getServiceContextsForReply(messageMediator, svc);

        // NOTE: We MUST add the service context before creating
        // the response since service contexts are written to the
        // stream when the response object is created.
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.