moduleName = "*";
}
try {
query = NameFactory.getComponentNameQuery(null, null, null, moduleType, moduleName, name, type, j2eeContext);
} catch (MalformedObjectNameException e1) {
throw (UnresolvedReferenceException) new UnresolvedReferenceException("Could not construct " + queryType + " object name query", false, null).initCause(e1);
}
ObjectName match = locateUniqueNameInContext(context, query);
if (match == null) {
if (!requireMatch) {
return null;
} else {
throw new UnresolvedReferenceException("Could not resolve reference: module: " + moduleName + ", component name: " + name, false, query.toString());
}
}
try {
GBeanData data = context.getGBeanInstance(match);
return data;