throw new BAD_PARAM();
else
{
try
{
ControlImple ctx = null;
synchronized (ServerControl.allServerControls)
{
ctx = (ServerControl) ServerControl.allServerControls.get(uid);
}
/*
* If it's not present then check each element's savingUid just
* in case that is being used instead of the transaction id.
* This is because a server transaction actually has two names:
*
* (i) the tid it pretends to be (ii) the tid it actually is and
* saves its intentions list in.
*
* Don't bother synchronizing since the hash table is
* synchronized anyway, and we're not bothered if new items go
* in while we're looking. If the element we're looking for
* isn't there now it won't be there at all.
*/
if (ctx == null)
{
Enumeration e = ServerControl.allServerControls.elements();
while (e.hasMoreElements())
{
ctx = (ServerControl) e.nextElement();
if (ctx.getImplHandle().getSavingUid().equals(uid))
{
break;
}
}
}
if (ctx != null)
return ctx.getImplHandle().get_status();
else
throw new NoTransaction();
}
catch (NoTransaction ex)
{