Package org.jacorb.test.orb

Examples of org.jacorb.test.orb.BasicServerImpl


        // The incarnate operation is invoked by the POA whenever the POA receives
        // a request for an object that is not currently active, assuming the POA
        // has the RETAIN and USE_SERVANT_MANAGER policies
        public Servant incarnate(byte[] oid, POA adapter) throws ForwardRequest
        {
            return new BasicServerImpl();
        }
View Full Code Here


     * ID (i.e. using a new one each time) and using servant_to_id to obtain
     * the ID to deactivate_the_object.
     */
  public void testActivateDeactivate1 () throws Exception
  {
    BasicServerImpl soi = new BasicServerImpl();

    for (int count=0;count<100;count++)
    {
      rootPOA.activate_object( soi);
      rootPOA.deactivate_object(rootPOA.servant_to_id(soi));
View Full Code Here

     * <code>testActivateDeactivate2</code> tests activating and deactivating
     * the object using the same ID.
     */
  public void testActivateDeactivate2 () throws Exception
  {
    BasicServerImpl soi = new BasicServerImpl();

    // This will activate it so do deactivate first
    byte []id = rootPOA.servant_to_id( soi );

    for (int count=0;count<100;count++)
View Full Code Here

    policies[2] = rootPOA.create_servant_retention_policy(
        org.omg.PortableServer.ServantRetentionPolicyValue.RETAIN);

    POA poa = rootPOA.create_POA("system_id", rootPOA.the_POAManager(), policies);

    BasicServerImpl soi = new BasicServerImpl();

    byte [] id = poa.activate_object(soi);

    for (int count=0;count<100;count++)
    {
View Full Code Here

    public void testSimpleShutdown() throws Exception
    {
        poaManager.activate();

        BasicServerImpl servant = new BasicServerImpl();

        rootPOA.activate_object(servant);

        BasicServer server = BasicServerHelper.narrow(rootPOA.servant_to_reference(servant));
View Full Code Here

        );

        poa.the_POAManager().activate();

        // create the object reference
        poa.activate_object_with_id("Object".getBytes(), new BasicServerImpl());
        org.omg.CORBA.Object obj = poa.id_to_reference( "Object".getBytes() );

        ParsedIOR pior = new ParsedIOR(orb, orb.object_to_string(obj));

        assertTrue
View Full Code Here

        );

        poa.the_POAManager().activate();

        // create the object reference
        poa.activate_object_with_id("Object".getBytes(), new BasicServerImpl());
        org.omg.CORBA.Object obj = poa.id_to_reference( "Object".getBytes() );

        ParsedIOR pior = new ParsedIOR( orb, orb.object_to_string(obj));

        assertTrue
View Full Code Here

        );

        poa.the_POAManager().activate();

        // create the object reference
        poa.activate_object_with_id("Object".getBytes(), new BasicServerImpl());
        org.omg.CORBA.Object obj = poa.id_to_reference( "Object".getBytes() );

        ParsedIOR pior = new ParsedIOR( orb1, orb1.object_to_string(obj));


        // Now create number two.

        final ORB orb2 = newORB(props);

        rootPoa = (POAHelper.narrow( orb2.resolve_initial_references( "RootPOA" )));

        // Create a child POA
        poa = rootPoa.create_POA
        (
                "TestServerPOA",
                rootPoa.the_POAManager(),
                new Policy[]
                           {
                    rootPoa.create_lifespan_policy( LifespanPolicyValue.TRANSIENT),
                    rootPoa.create_id_assignment_policy( IdAssignmentPolicyValue.USER_ID)
                           }
        );

        poa.the_POAManager().activate();

        // create the object reference
        poa.activate_object_with_id("Object".getBytes(), new BasicServerImpl());
        obj = poa.id_to_reference( "Object".getBytes() );

        ParsedIOR pior2 = new ParsedIOR( orb2, orb2.object_to_string(obj));

        assertTrue
View Full Code Here

        // need to remember the main thread here as we want
        // to verify that innerServer isn't called from another thread.
        final Thread mainThread = Thread.currentThread();

        innerServer =
            BasicServerHelper.narrow(rootPOA.servant_to_reference(new BasicServerImpl()
            {
                public boolean bounce_boolean(boolean x)
                {
                    assertSame(mainThread, Thread.currentThread());
View Full Code Here

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

        poa.the_POAManager().activate();

        BasicServerImpl soi = new BasicServerImpl();

        for (int count=0;count<100;count++)
        {
            poa.activate_object( soi);
            poa.deactivate_object(poa.servant_to_id(soi));
View Full Code Here

TOP

Related Classes of org.jacorb.test.orb.BasicServerImpl

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.