Search in sources :

Example 1 with ContextReferenceInfo

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);
    }
}
Also used : ResourceReferenceInfo(org.apache.openejb.assembler.classic.ResourceReferenceInfo) ContextReferenceInfo(org.apache.openejb.assembler.classic.ContextReferenceInfo) PersistenceContextReferenceInfo(org.apache.openejb.assembler.classic.PersistenceContextReferenceInfo) PersistenceContextRef(org.apache.openejb.jee.PersistenceContextRef) ResourceRef(org.apache.openejb.jee.ResourceRef)

Aggregations

ContextReferenceInfo (org.apache.openejb.assembler.classic.ContextReferenceInfo)1 PersistenceContextReferenceInfo (org.apache.openejb.assembler.classic.PersistenceContextReferenceInfo)1 ResourceReferenceInfo (org.apache.openejb.assembler.classic.ResourceReferenceInfo)1 PersistenceContextRef (org.apache.openejb.jee.PersistenceContextRef)1 ResourceRef (org.apache.openejb.jee.ResourceRef)1