{
child = (POA)childs.get(poa_name);
if (child != null &&
!child.isDestructionApparent())
{
throw new AdapterAlreadyExists();
}
// wait for completion of a concurrent destruction process
if (child != null)
{
POA aChild;
while ((aChild = (POA)childs.get(poa_name)) != null)
{
try
{
poaCreationLog.wait(); // notification is in unregisterChild
}
catch (InterruptedException e)
{
}
// someone else has won the race
if (child != aChild)
{
throw new AdapterAlreadyExists();
}
}
}
if (isShutdownInProgress())