public void test_RETAIN_Activation()
{
server.once_activated.incarnations.clear();
server.once_activated.etherializations.clear();
poa_comTester uobject =
poa_comTesterHelper.narrow(readIOR(ssTARGET_IOR_FILE0, orb));
uobject.sayHello();
for (int j = 0; j < 3; j++)
for (int i = 0; i < allServants.length; i++)
{
poa_comTester object =
poa_comTesterHelper.narrow(readIOR(allServants [ i ], orb));
String r = object.passCharacters("abba", "baba");
assertEquals("wide/narrow strings", "return 'baba' and 'abba'", r);
}
Iterator iter = server.once_activated.incarnations.iterator();
assertEquals("Must be activated once", 1,
server.once_activated.incarnations.size()
);
assertEquals("Must not be deactivated", 0,
server.once_activated.etherializations.size()
);
assertEquals("Activated object", "4 5 2 5 7 2 /1",
server.once_activated.incarnations.get(0)
);
// Ensure that all requests are served by the same servant.
poa_comTester object =
poa_comTesterHelper.narrow(readIOR(ssTARGET_IOR_FILE0, orb));
String s = object.sayHello();
assertTrue("Object key", s.startsWith("4 5 2 5 7 2 :"));
String n;
for (int i = 0; i < 10; i++)
{
n = object.sayHello();
assertEquals("Must be same servant", s, n);
}
}