Package org.omg.PortableServer

Examples of org.omg.PortableServer.Servant


                                             policies );
        bidir_poa.the_POAManager().activate();

        final String servantName = args[0];
        Class<?> servantClass = TestUtils.classForName(servantName);
        Servant servant = ( Servant ) servantClass.newInstance();

        // create the object reference
        org.omg.CORBA.Object obj = bidir_poa.servant_to_reference(servant);

        System.out.println("SERVER IOR: "+orb.object_to_string(obj));
View Full Code Here


        for (int i=0; i<policies.length; i++)
        {
            policies[i].destroy();
        }

        Servant servant =  new RepositoryPOATie( this );
        ifrPOA.activate_object_with_id("IfR".getBytes(), servant);

        Repository myRef =
            RepositoryHelper.narrow(
                    ifrPOA.servant_to_reference( servant ) );
View Full Code Here

        if ( !isRetain() )
        {
            throw new WrongPolicy();
        }

        final Servant servant = aom.getServant(oid);
        // objectId is not active
        if (servant == null)
        {
            throw new ObjectNotActive();
        }

        /* If the object with the specified ObjectId currently active,
           a reference encapsulating  the information used to activate
           the object is returned.  */
        return getReference (oid, servant._all_interfaces (this, oid)[0], true);
    }
View Full Code Here

        }

        // servant is active
        if (isRetain())
        {
            final Servant servant = aom.getServant(oid);

            if (servant != null)
            {
                return servant;
            }
View Full Code Here

            }

            throw new org.omg.CORBA.OBJECT_NOT_EXIST();
        }

        Servant servant = null;

        /* is active servant */
        if (isRetain() && (servant = aom.getServant(oid)) != null)
        {
            return servant;
View Full Code Here

            POA poa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
            poa.the_POAManager().activate();

            Class _servantClass = Class.forName(_servantClassName);

            Servant _servant = (Servant) _servantClass.newInstance();

            // create the object reference
            org.omg.CORBA.Object o = poa.servant_to_reference(_servant);

            Socket _socket = new Socket("localhost", _portToSendIorTo);
View Full Code Here

            final String servantName = args[0];

            log("use ServantClass: " + servantName);

            Class<?> servantClass = TestUtils.classForName(servantName);
            Servant servant = ( Servant ) servantClass.newInstance();

            log("using Servant: " + servant);

            if (servant instanceof Configurable && orb instanceof org.jacorb.orb.ORB)
            {
                ((Configurable)servant).configure (((org.jacorb.orb.ORB)orb).getConfiguration());
                log("configured Servant");
            }

            final String ior;
            if (useCorbaloc())
            {
                String oid = System.getProperty ("jacorb.test.corbaloc.objectid");
                poa.activate_object_with_id (oid.getBytes(), servant);
                String shortcut = System.getProperty ("jacorb.test.corbaloc.shortcut");
                if (shortcut != null)
                    ((org.jacorb.orb.ORB)orb).addObjectKey(shortcut,
                            System.getProperty ("jacorb.test.corbaloc.implname")
                    + "/" + System.getProperty ("jacorb.test.corbaloc.poaname")
                    + "/" + System.getProperty ("jacorb.test.corbaloc.objectid"));

                ior = "SERVER IOR: " + getCorbaloc();
            }
            else
            {
                // create the object reference
                org.omg.CORBA.Object obj = null;

                if (useIMR())
                {
                    poa.activate_object_with_id (servant.getClass().getName().getBytes(), servant);
                    obj = poa.id_to_reference (servant.getClass().getName().getBytes());
                }
                else
                {
                    obj = poa.servant_to_reference( servant );
                }
View Full Code Here

        serverORB = this.getAnotherORB(serverProps);

        POA rootPOA = POAHelper.narrow(serverORB.resolve_initial_references("RootPOA"));
        rootPOA.the_POAManager().activate();

        Servant si = new CurrentServerImpl(serverORB, new IIOPTester());
        org.omg.CORBA.Object obj = rootPOA.servant_to_reference(si);
        String objString = serverORB.object_to_string(obj);

        clientORB = this.getAnotherORB(clientProps);
        server_ = CurrentServerHelper.narrow(clientORB.string_to_object(objString));
View Full Code Here

                                              ServantActivator servant_activator,
                                              org.omg.PortableServer.POA poa )
        throws org.omg.PortableServer.ForwardRequest
    {
        final byte[] oid = oidbak.getBytes();
        Servant servant = null;

        if (logger.isInfoEnabled())
        {
            logger.info( "oid: " + POAUtil.convert(oid) +
                        "incarnate");
View Full Code Here

    }


    private synchronized void actualRemove(ByteArrayKey oidbak, ServantActivator servantActivator, POA poa, boolean cleanupInProgress, final byte[] oid)
    {
        Servant servant;

        if ((servant = (Servant)objectMap.get(oidbak)) == null)
        {
            deactivationList.remove(oidbak);
            return;
View Full Code Here

TOP

Related Classes of org.omg.PortableServer.Servant

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.