WeakReference<ResourceAdapter> ra = entry.getValue();
if (ra.get() != null)
{
ResourceAdapter rar = ra.get();
Connector md = null;
Set<String> mdrKeys = mdr.getResourceAdapters();
Iterator<String> mdrIt = mdrKeys.iterator();
while (md == null && mdrIt.hasNext())
{
String mdrId = mdrIt.next();
try
{
Connector c = mdr.getResourceAdapter(mdrId);
if (c.getResourceadapter() != null && c.getResourceadapter() instanceof ResourceAdapter1516)
{
ResourceAdapter1516 ra1516 = (ResourceAdapter1516)c.getResourceadapter();
String clz = ra1516.getResourceadapterClass();
if (rar.getClass().getName().equals(clz))
md = c;
}