Package org.jacorb.orb

Examples of org.jacorb.orb.ORB


     */
    public void post_init(ORBInitInfo info)
    {
        try
        {
            ORB orb = ((org.jacorb.orb.portableInterceptor.ORBInitInfoImpl)info).getORB();
            Logger logger =
              ((org.jacorb.orb.ORB)orb).getConfiguration()
                                       .getLogger("org.jacorb.tx_service");
            slot_id = info.allocate_slot_id();
           
View Full Code Here


  extends org.omg.CORBA.LocalObject
  implements ORBInitializer
{
    public void post_init(ORBInitInfo info)
    {
        final ORB orb = ((org.jacorb.orb.portableInterceptor.ORBInitInfoImpl) info).getORB();
        final Logger logger = orb.getConfiguration().getLogger("org.jacorb.interceptors.ior_init");

        try
        {
            info.add_client_request_interceptor( new BiDirConnectionClientInterceptor( orb ));
            info.add_server_request_interceptor( new BiDirConnectionServerInterceptor( orb ));
View Full Code Here

   {
      super.configure(config);

      logger = configuration.getLogger("org.jacorb.miop");

      ORB orb = config.getORB ();

      if (corbalocStr != null)
      {
         if (logger.isDebugEnabled ())
         {
View Full Code Here

    }

    public static void main(String[] args)
    {
        String [] noarg = new String[]{};
        ORB orb = (org.jacorb.orb.ORB)ORB.init(noarg,null);
        for( int i = 0; i < args.length; i++ )
        {
            System.out.println( new CorbaLoc(orb, args[i] ).toString());
        }
    }
View Full Code Here

     *
     * @param info the info object.
     */
    public void post_init(ORBInitInfo info)
    {
        final ORB orb = ((org.jacorb.orb.portableInterceptor.ORBInitInfoImpl) info).getORB();
        final Configuration config = orb.getConfiguration();
        final Logger logger = config.getLogger("org.jacorb.interceptors.ior_init");

        try
        {
            int giop_minor =
View Full Code Here

     * @param param1
     *            <description>
     */
    public void post_init(ORBInitInfo info) {

        ORB orb = ((org.jacorb.orb.portableInterceptor.ORBInitInfoImpl) info).getORB ();

        try {
            if (clienttester_ != null)
                info.add_client_request_interceptor (new ClientInterceptor (orb,
                                                                            clienttester_));
View Full Code Here

    protected abstract DefaultCurrentImpl getCurrentImpl();

    public final void pre_init(ORBInitInfo info)
    {

        ORB orb = ((org.jacorb.orb.portableInterceptor.ORBInitInfoImpl) info).getORB ();
        logger_ = orb.getConfiguration().getLogger("org.jacorb.transport");
        DefaultCurrentImpl impl = getCurrentImpl();
        try {
            impl.configure(orb.getConfiguration ());
            info.register_initial_reference (getName(), impl);
            logger_.info ("Registered initial reference \""+getName ()+"\" for "+impl.getClass().getName());
        }
        catch (ConfigurationException e) {
            e.printStackTrace ();
        }
        catch (InvalidName e) {
            e.printStackTrace ();
        }
               
        // Chain-in our implementation as a listener to the Transport events
        orb.getTransportManager ().addTransportListener (impl);
    }   
View Full Code Here

            return filename;
        }
        else
        {
            String serverId;
            ORB orb = config.getORB();

            if (orb != null)
            {
               serverId = orb.getServerIdString();
            }
            else
            {
               // If the ORB is null it must be a singleton ORB. So create a unique file name for it.
               serverId = "orbsingleton-" + (new SimpleDateFormat ("yyyyMdHms")).format (System.currentTimeMillis ());
View Full Code Here

      byte[][] members = agm.getMembersFromGroup (tagGroup);

      if (members.length > 0)
      {
         // get the ORB and the request buffer
         ORB orb = getORB ();
         byte[] buffer = request.getInputStream ().getBufferCopy ();

         for (int i = 0; i < members.length; i++)
         {
            ServerRequest requestClone = new ServerRequest (orb, new RequestInputStream (orb, request.getConnection (),
View Full Code Here

     * the main request processing routine
     */

    private void process()
    {
        final ORB orb = controller.getORB();
        ServerRequestInfoImpl info = null;

        // Notify parties interested in using information about a Transport
        orb.notifyTransportListeners(request.getConnection());

        if (orb.hasServerRequestInterceptors())
        {
            //RequestInfo attributes
            info = new ServerRequestInfoImpl(orb,
                                             request,
                                             servant);

            InterceptorManager manager = orb.getInterceptorManager();
            info.setCurrent (manager.getEmptyCurrent());

            if(! invokeInterceptors( info,
                                     ServerInterceptorIterator.
                                     RECEIVE_REQUEST_SERVICE_CONTEXTS))
            {
                //an interceptor bailed out, so don't continue request
                //processing and return here. The service contexts for
                //the result have to be set, of course.
                ReplyOutputStream out = request.getReplyOutputStream();
                Collection<ServiceContext> ctx = info.getReplyServiceContexts ();

                for (ServiceContext s: ctx)
                {
                    out.addServiceContext(s);
                }

                return;
            }

            manager.setTSCurrent(info.current());
        }

        // TODO: The exception replies below should also trigger interceptors.
        // Requires some re-arranging of the entire method.
        if (Time.hasPassed (request.getRequestEndTime()))
        {
            request.setSystemException
                (new org.omg.CORBA.TIMEOUT ("Request End Time exceeded",
                                            0, CompletionStatus.COMPLETED_NO));
            return;
        }
        if (checkReplyEndTime && Time.hasPassed (request.getReplyEndTime()))
        {
            request.setSystemException
                (new org.omg.CORBA.TIMEOUT ("Reply End Time exceeded",
                                            0, CompletionStatus.COMPLETED_NO));
            return;
        }

        Time.waitFor (request.getRequestStartTime());

        if (servantManager != null)
        {
            if (servantManager instanceof org.omg.PortableServer.ServantActivator)
            {
                invokeIncarnate();
            }
            else
            {
                invokePreInvoke();
            }
            ((org.omg.CORBA_2_3.ORB)orb).set_delegate(servant);
        }

        if (servant != null)
        {
            if (info != null)
            {
                info.setServant(servant);

                if (servant instanceof org.omg.CORBA.portable.InvokeHandler)
                {
                    if(! invokeInterceptors(info,
                                            ServerInterceptorIterator.RECEIVE_REQUEST ))
                    {
                        //an interceptor bailed out, so don't continue
                        //request processing and return here. The
                        //service contexts for the result have to be
                        //set, of course.

                        if( cookieHolder != null )
                        {
                            invokePostInvoke();
                        }

                        ReplyOutputStream out = request.getReplyOutputStream();
                        Collection<ServiceContext> ctx = info.getReplyServiceContexts ();

                        for (ServiceContext s: ctx)
                        {
                            out.addServiceContext(s);
                        }

                        return;
                    }
                }
                else if (servant instanceof org.omg.PortableServer.DynamicImplementation)
                {
                    request.setServerRequestInfo(info);
                }
            }

            invokeOperation();
        }

        // preinvoke and postinvoke are always called in pairs
        // but what happens if the servant is null

        if (cookieHolder != null)
        {
            invokePostInvoke();
        }

        if (checkReplyEndTime && Time.hasPassed (request.getReplyEndTime()))
        {
            request.setSystemException
                (new org.omg.CORBA.TIMEOUT ("Reply End Time exceeded after invocation",
                                            0, CompletionStatus.COMPLETED_YES));
        }

        if (info != null)
        {
            InterceptorManager manager =
                orb.getInterceptorManager();
            info.setCurrent (manager.getCurrent());

            short op = 0;
            switch(request.status().value())
            {
                case ReplyStatusType_1_2._NO_EXCEPTION:
                {
                    op = ServerInterceptorIterator.SEND_REPLY;
                    info.setReplyStatus (SUCCESSFUL.value);
                    break;
                }
                case ReplyStatusType_1_2._USER_EXCEPTION:
                {
                    info.setReplyStatus (USER_EXCEPTION.value);
                    Any sendingException = orb.create_any();
                    SystemExceptionHelper.insert(sendingException, new org.omg.CORBA.UNKNOWN("Stream-based UserExceptions are not available!"));
                    info.sending_exception(sendingException);
                    op = ServerInterceptorIterator.SEND_EXCEPTION;
                    break;
                }
                case ReplyStatusType_1_2._SYSTEM_EXCEPTION:
                {
                    info.setReplyStatus (SYSTEM_EXCEPTION.value);
                    Any sendingException = orb.create_any();
                    SystemExceptionHelper.insert(sendingException, request.getSystemException());
                    info.sending_exception(sendingException);
                    op = ServerInterceptorIterator.SEND_EXCEPTION;
                    break;

View Full Code Here

TOP

Related Classes of org.jacorb.orb.ORB

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.