[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jacorb-bugs
Subject:    [jacorb-bugs] [Bug 130] New: deactivation of servant failing
From:       bugzilla-daemon () inf ! fu-berlin ! de
Date:       2002-03-07 15:23:39
Message-ID: 20020307152339.27278.qmail () inf ! fu-berlin ! de
[Download RAW message or body]

http://z1.inf.fu-berlin.de:8081/bugzilla/show_bug.cgi?id=130

           Summary: deactivation of servant failing
           Product: JacORB
           Version: 1.4 beta 2
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: normal
          Priority: P2
         Component: POA
        AssignedTo: gerald.brose@acm.org
        ReportedBy: tarigopula_p@ociweb.com


here is the code snippet:


       byte[] id1, id2;
// create POA
        policies = new Policy[3];
        policies[0] = root.create_id_assignment_policy(
            org.omg.PortableServer.IdAssignmentPolicyValue.SYSTEM_ID);
        policies[1] = root.create_id_uniqueness_policy(
            org.omg.PortableServer.IdUniquenessPolicyValue.UNIQUE_ID);
        policies[2] = root.create_servant_retention_policy(
            org.omg.PortableServer.ServantRetentionPolicyValue.RETAIN);
        try
        {
            system = root.create_POA("system_id", manager, policies);
        }
        catch(AdapterAlreadyExists ex)
        {
            throw new RuntimeException();
        }
        catch(InvalidPolicy ex)
        {
            throw new RuntimeException();
        }

// create Servants
        Test_impl servant1 = new Test_impl(orb, "obj1", false);
        Test_impl servant2 = new Test_impl(orb, "obj2", false);
// first activate servants
        try
        {
            id1 = system.activate_object(servant1);
            id2 = system.activate_object(servant2);
        }
        catch(ServantAlreadyActive ex)
        {
            throw new RuntimeException();
        }
        catch(WrongPolicy ex)
        {
            throw new RuntimeException();
        }
// deactivate the servants now
// no request is pending 
        try
        {
            system.deactivate_object(id2);
            system.deactivate_object(id1);
        }
        catch(ObjectNotActive ex)
        {
            throw new RuntimeException();
        }
        catch(WrongPolicy ex)
        {
            throw new RuntimeException();
        }
// now again try to deactivate 
// I would expect ObjectNotActive Exception but didn't get one
        try
        {
            system.deactivate_object(id1);
            TEST("deactivate_object called twice, expecting ObjectNotActive 
exception, but didn't.", false); 
        }
        catch(ObjectNotActive ex)
        {
            // expected
        }
        catch(WrongPolicy ex)
        {
            throw new RuntimeException();
        }



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic