use of org.apache.openejb.assembler.classic.ContextReferenceInfo in project tomee by apache.
the class JndiEncInfoBuilder method buildResourceRefInfos.
private void buildResourceRefInfos(final JndiConsumer item, final JndiEncInfo moduleJndiEnc, final JndiEncInfo compJndiEnc) {
for (final ResourceRef res : item.getResourceRef()) {
final ResourceReferenceInfo info;
if (res instanceof ContextRef) {
info = new ContextReferenceInfo();
} else {
info = new ResourceReferenceInfo();
}
if (res.getResAuth() != null) {
info.referenceAuth = res.getResAuth().toString();
} else {
info.referenceAuth = ResAuth.CONTAINER.toString();
}
info.referenceName = res.getResRefName();
info.referenceType = res.getResType();
info.resourceID = res.getMappedName();
info.location = buildLocationInfo(res);
info.targets.addAll(buildInjectionInfos(res));
insert(info, appInfo.globalJndiEnc.resourceRefs, appInfo.appJndiEnc.resourceRefs, moduleJndiEnc.resourceRefs, compJndiEnc.resourceRefs);
}
}
Aggregations