if (log.isTraceEnabled())
{
log.trace("Resolving relative message-destination-link: " + link);
}
DeploymentUnit top = unit.getTopLevel();
DeploymentUnit targetUnit = findLinkPath(top, path);
if (targetUnit == null)
{
log.warn("Can't locate DeploymentUnit for target: " + path);
return null;
}
if (log.isTraceEnabled())
log.trace("Found appropriate DeploymentUnit: " + targetUnit);
MessageDestinationMetaData md = null;
MessageDestinationsMetaData mds = null;
if (targetUnit.getAttachment(JBossMetaData.class) != null)
{
JBossMetaData appMD = targetUnit.getAttachment(JBossMetaData.class);
mds = appMD.getAssemblyDescriptor().getMessageDestinations();
md = mds.get(destinationName);
}
if (targetUnit.getAttachment(JBossWebMetaData.class) != null)
{
JBossWebMetaData webMD = targetUnit.getAttachment(JBossWebMetaData.class);
mds = webMD.getMessageDestinations();
md = mds.get(destinationName);
}
if(md == null)