@XmlTransient public String getName() { return getResRefName(); }
@XmlTransient public String getName() { return getResRefName(); }
@XmlTransient public String getName() { return getResRefName(); }
@Override public void setResourceEnvironment(ResourceEnvironmentBuilder builder, Collection<ResourceRef> resourceRefList, GerResourceRefType[] gerResourceRefs) throws DeploymentException { Map refMap = mapResourceRefs(gerResourceRefs); Set<AbstractNameQuery> unshareableResources = new HashSet<AbstractNameQuery>(); Set<AbstractNameQuery> applicationManagedSecurityResources = new HashSet<AbstractNameQuery>(); for (ResourceRef resourceRef : resourceRefList) { String type = resourceRef.getResType(); if(type == null){ continue; }else { type = type.trim(); } if (!URL.class.getName().equals(type) && !"javax.mail.Session".equals(type) && !JAXR_CONNECTION_FACTORY_CLASS.equals(type)) { GerResourceRefType gerResourceRef = (GerResourceRefType) refMap.get(resourceRef.getResRefName()); AbstractNameQuery containerId = getResourceContainerId(getStringValue(resourceRef.getResRefName()), NameFactory.JCA_MANAGED_CONNECTION_FACTORY, null, gerResourceRef); if (ResSharingScope.UNSHAREABLE.equals(resourceRef.getResSharingScope())) { unshareableResources.add(containerId); } if (ResAuth.APPLICATION.equals(resourceRef.getResAuth())) { applicationManagedSecurityResources.add(containerId); } } } builder.setUnshareableResources(unshareableResources); builder.setApplicationManagedSecurityResources(applicationManagedSecurityResources); }
private List<ResourceReferenceInfo> buildResourceRefInfos(JndiConsumer item) { List<ResourceReferenceInfo> infos = new ArrayList<ResourceReferenceInfo>(); for (ResourceRef res : item.getResourceRef()) { ResourceReferenceInfo 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)); infos.add(info); } return infos; }
String refName = resourceRef.getResRefName(); String refType = resourceRef.getResType(); if ("javax.sql.DataSource".equalsIgnoreCase(refType)) {
@Override public void preProcessWebXmlElement(WebApp webApp, MergeContext mergeContext) throws DeploymentException { for (ResourceRef resourceRef : webApp.getResourceRef()) { String resourceRefName = resourceRef.getResRefName(); mergeContext.setAttribute(createResourceRefKey(resourceRefName), new MergeItem(resourceRef, null, ElementSource.WEB_XML)); //Create an attribute tag to indicate whether injectTarget is configured in web.xml file if (!resourceRef.getInjectionTarget().isEmpty()) { mergeContext.setAttribute(createResourceRefInjectTargetConfiguredInWebXMLKey(resourceRefName), Boolean.TRUE); } for (InjectionTarget injectionTarget : resourceRef.getInjectionTarget()) { mergeContext.setAttribute(createResourceRefInjectTargetKey(resourceRefName, injectionTarget.getInjectionTargetClass(), injectionTarget.getInjectionTargetName() ), Boolean.TRUE); } } }
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 ); } }
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 ); } }
final String refName = ref.getResRefName(); ref.setMappedName(MAPPED_NAME_PREFIX + refName);
final String refName = ref.getResRefName(); ref.setMappedName(MAPPED_NAME_PREFIX + refName);
String refName = ref.getResRefName(); ref.setMappedName(MAPPED_NAME_PREFIX + refName);
public void merge(WebFragment webFragment, WebApp webApp, MergeContext mergeContext) throws DeploymentException { for (ResourceRef srcResourceRef : webFragment.getResourceRef()) { String resourceRefName = srcResourceRef.getResRefName(); String resourceRefKey = createResourceRefKey(resourceRefName); MergeItem mergeItem = (MergeItem) mergeContext.getAttribute(resourceRefKey);