String oaId = OA_INSTANCE_NAME+oaCount;
logInformation("Initialising OA instance '"+oaId+"' for ORB Instance '"+orbId+"'");
Policy p[] = new Policy[1];
p[0] = rootOA.rootPoa().create_implicit_activation_policy(ImplicitActivationPolicyValue.IMPLICIT_ACTIVATION);
OA oa = rootOA.createPOA(oaId, p);
preInitExpectedValue++;
myPoaExceptedValue++;
}
if (PreInitialisation2._count != myPoaExceptedValue)
{
logInformation("Checking: Failed, Pre-initialisation of mypoa class not called as expected");
assertFailure();
}
else
{
logInformation("Checking: myPOA Correct ("+myPoaExceptedValue+")");
}
if (PreInitialisation._count != preInitExpectedValue)
{
logInformation("Checking: Failed, Pre-initialisation class not called as expected");
assertFailure();
}
else
{
logInformation("Checking: Correct ("+preInitExpectedValue+")");
}
}
}
catch (Exception e)
{
logInformation("ERROR - "+e);
e.printStackTrace(System.err);
assertFailure();
}
for (int orbCount=0;orbCount<numberOfORBs;orbCount++)
{
try
{
String orbId = ORB_INSTANCE_NAME+orbCount;
ORB orb = ORB.getInstance(orbId);
RootOA oa = RootOA.getRootOA(orb);
oa.destroy();
orb.destroy();
}
catch (Exception e)
{
logInformation("ERROR - While destroying ORB instance '"+ORB_INSTANCE_NAME+orbCount+"' ("+e+")");