return getTargetType(container, injectionTarget);
public void handleClassAnnotations(Class<?> clazz, InjectionContainer container) { Resources resources = container.getAnnotation(Resources.class, clazz); if (resources != null) { for (Resource ref : resources.value()) { handleClassAnnotation(ref, container, clazz); } } Resource res = container.getAnnotation(Resource.class, clazz); if (res != null) handleClassAnnotation(res, container, clazz); }
public void loadXml(X xml, InjectionContainer container) { if (xml == null) return; if (xml.getMessageDestinationReferences() != null) loadXmlMessageDestinationRefs(container, xml.getMessageDestinationReferences()); if (xml.getResourceEnvironmentReferences() != null) loadXmlResourceEnvRefs(container, xml.getResourceEnvironmentReferences()); if (xml.getResourceReferences() != null) loadXmlResourceRefs(container, xml.getResourceReferences()); if (xml.getEnvironmentEntries() != null) loadEnvEntry(container, xml.getEnvironmentEntries()); }
createURLInjector(encName, mappedName, container);
handlePropertyAnnotation(ref, new MethodBeanProperty(method), container, injectors);
private static void loadEnvEntry(InjectionContainer container, Collection<EnvironmentEntryMetaData> envEntries) { for (EnvironmentEntryMetaData envEntry : envEntries) { String encName = "env/" + envEntry.getEnvEntryName(); // 16.4.1.3: If the env-entry-value is not specified, no value will be injected and it // will not be initialized into the naming context. if(envEntry.getValue() == null) { log.debug("ignoring env-entry " + envEntry); continue; } InjectionUtil.injectionTarget(encName, envEntry, container, container.getEncInjections()); if (container.getEncInjectors().containsKey(encName)) continue; log.trace("adding env-entry injector " + encName); String envEntryType = getEnvEntryType(container, envEntry); if (envEntryType == null) { throw new RuntimeException("env-entry-type is not specified for env-entry named " + envEntry.getName()); } container.getEncInjectors().put(encName, new EnvEntryEncInjector(encName, envEntryType, envEntry.getValue())); } }
String resTypeName = getResourceEnvRefType(container, envRef); String mappedName = envRef.getMappedName(); String encName = "env/" + envRef.getResourceEnvRefName();
if(resType != null && resType.equals(URL.class.getName())) createURLInjector(encName, mappedName, container);
handlePropertyAnnotation(ref, new FieldBeanProperty(field), container, injectors);
createURLInjector(encName, ref.mappedName(), container); injectors.put(accObj, new JndiPropertyInjector(property, encName, container.getEnc()));
return getTargetType(container, injectionTarget);