{
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;
}
}
catch (Throwable t)
{
throw new NotFoundException("Unable to lookup resource adapter in MDR: " + uniqueId, t);
}
}
if (md == null)
throw new NotFoundException("Unable to lookup resource adapter in MDR: " + uniqueId);
if (md != null && md.getResourceadapter() != null && md.getResourceadapter() instanceof ResourceAdapter1516)
{
ResourceAdapter1516 ra1516 = (ResourceAdapter1516)md.getResourceadapter();
if (ra1516.getInboundResourceadapter() != null &&
ra1516.getInboundResourceadapter().getMessageadapter() != null &&
ra1516.getInboundResourceadapter().getMessageadapter().getMessagelisteners() != null &&
ra1516.getInboundResourceadapter().getMessageadapter().getMessagelisteners().size() > 0)
{
List<org.jboss.jca.common.api.metadata.ra.MessageListener> listeners =
ra1516.getInboundResourceadapter().getMessageadapter().getMessagelisteners();
List<org.jboss.jca.core.spi.rar.MessageListener> result =
new ArrayList<org.jboss.jca.core.spi.rar.MessageListener>(listeners.size());
for (org.jboss.jca.common.api.metadata.ra.MessageListener ml : listeners)