Package com.sun.corba.se.spi.orb

Examples of com.sun.corba.se.spi.orb.ORB$Holder


        }
    }

    protected void addServiceContexts(CorbaMessageMediator messageMediator)
    {
        ORB orb = (ORB)messageMediator.getBroker();
        CorbaConnection c = (CorbaConnection) messageMediator.getConnection();
        GIOPVersion giopVersion = messageMediator.getGIOPVersion();

        ServiceContexts contexts = messageMediator.getRequestServiceContexts();

        addCodeSetServiceContext(c, contexts, giopVersion);

        // Add the RMI-IIOP max stream format version
        // service context to every request.  Once we have GIOP 1.3,
        // we could skip it since we now support version 2, but
        // probably safer to always send it.
        contexts.put(MaxStreamFormatVersionServiceContext.singleton);

        // ORBVersion servicecontext needs to be sent
        ORBVersionServiceContext ovsc = new ORBVersionServiceContext(
                        ORBVersionFactory.getORBVersion() ) ;
        contexts.put( ovsc ) ;

        // NOTE : We only want to send the runtime context the first time
        if ((c != null) && !c.isPostInitialContexts()) {
            // Do not do c.setPostInitialContexts() here.
            // If a client interceptor send_request does a ForwardRequest
            // which ends up using the same connection then the service
            // context would not be sent.
            SendingContextServiceContext scsc =
                new SendingContextServiceContext( orb.getFVDCodeBaseIOR() ) ; //d11638
            contexts.put( scsc ) ;
        }
    }
View Full Code Here


        messageMediator.setReplyExceptionDetailMessage(msg);
    }

    public void endRequest(Broker broker, Object self, InputObject inputObject)
    {
        ORB orb = (ORB)broker ;

        try {
            if (orb.subcontractDebugFlag) {
                dprint(".endRequest->");
            }

            // Note: the inputObject may be null if an error occurs
            //       in request or before _invoke returns.
            // Note: self may be null also (e.g., compiler generates null in stub).

            MessageMediator messageMediator =
                orb.getInvocationInfo().getMessageMediator();
            if (messageMediator != null)
            {
                if (messageMediator.getConnection() != null)
                {
                    ((CorbaMessageMediator)messageMediator)
                              .sendCancelRequestIfFinalFragmentNotSent();
                }

                // Release any outstanding NIO ByteBuffers to the ByteBufferPool

                InputObject inputObj = messageMediator.getInputObject();
                if (inputObj != null) {
                    inputObj.close();
                }

                OutputObject outputObj = messageMediator.getOutputObject();
                if (outputObj != null) {
                    outputObj.close();
                }

            }

            // XREVISIT NOTE - Assumes unregistering the waiter for
            // location forwards has already happened somewhere else.
            // The code below is only going to unregister the final successful
            // request.

            // NOTE: In the case of a recursive stack of endRequests in a
            // finally block (because of Remarshal) only the first call to
            // unregisterWaiter will remove the waiter.  The rest will be
            // noops.
            unregisterWaiter(orb);

            // Invoke Portable Interceptors cleanup.  This is done to handle
            // exceptions during stream marshaling.  More generally, exceptions
            // that occur in the ORB after send_request (which includes
            // after returning from _request) before _invoke:
            orb.getPIHandler().cleanupClientPIRequest();

            // REVISIT: Early replies?
        } catch (IOException ex) {
            // See CDRInput/OutputObject.close() for more info.
            // This won't result in a Corba error if an IOException happens.
View Full Code Here

        if (!(orig instanceof Remote))
            // Not for this StateFactory
            return null ;

        ORB orb = getORB( ctx ) ;
        if (orb == null)
            // Wrong kind of context, so just give up and let another StateFactory
            // try to satisfy getStateToBind.
            return null ;
View Full Code Here

    // to use the StubAdapter.  But this has problems as well, because
    // other vendors may use the CosNaming provider with a different ORB
    // entirely.
    private ORB getORB( Context ctx )
    {
        ORB orb = null ;

        try {
            orb = (ORB)orbField.get( ctx ) ;
        } catch (Exception exc) {
            // XXX log this exception at FINE level
View Full Code Here

        return _orb();
    }

    public void orb(org.omg.CORBA.ORB orb) {
        try {
            ORB myORB = (ORB)orb ;

            ((org.omg.CORBA_2_3.ORB)orb).set_delegate(this);
        } catch (ClassCastException e) {
            throw wrapper.badOrbForServant( e ) ;
        }
View Full Code Here

    }

    // Called when connection handling a read event.
    public MessageMediator createMessageMediator(Broker broker,Connection conn)
    {
        ORB orb = (ORB) broker;
        CorbaConnection connection = (CorbaConnection) conn;

        if (orb.transportDebugFlag) {
            if (connection.shouldReadGiopHeaderOnly()) {
                dprint(
View Full Code Here

    // Called when connection reading message body
    public MessageMediator finishCreatingMessageMediator(Broker broker,
                               Connection conn, MessageMediator messageMediator)
    {
        ORB orb = (ORB) broker;
        CorbaConnection connection = (CorbaConnection) conn;
        CorbaMessageMediator corbaMessageMediator =
                      (CorbaMessageMediator)messageMediator;

        if (orb.transportDebugFlag) {
View Full Code Here

            } catch (SystemException ex) {
                throw Util.mapSystemException(ex) ;
            }
        } else {
            // local branch
            ORB orb = (ORB)delegate.orb( stub ) ;
            ServantObject so = delegate.servant_preinvoke( stub, giopMethodName,
                method.getDeclaringClass() );
            if (so == null) {
                return invoke( stub, method, args ) ;
            }
View Full Code Here

import com.sun.corba.se.impl.logging.ORBUtilSystemException ;

public class ServiceContexts {
    private static boolean isDebugging( OutputStream os )
    {
  ORB orb = (ORB)(os.orb()) ;
  if (orb==null)
      return false ;
  return orb.serviceContextDebugFlag ;
    }
View Full Code Here

  return orb.serviceContextDebugFlag ;
    }

    private static boolean isDebugging( InputStream is )
    {
  ORB orb = (ORB)(is.orb()) ;
  if (orb==null)
      return false ;
  return orb.serviceContextDebugFlag ;
    }
View Full Code Here

TOP

Related Classes of com.sun.corba.se.spi.orb.ORB$Holder

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.