try {
log.debug("addResource(): Does not exist in DD: " + resourceName);
// Doesn't exist in deployment descriptor -- add new
EnvEntryType envEntry = annotatedApp.addNewEnvEntry();
//------------------------------------------------------------------------------
// <env-entry> required elements:
//------------------------------------------------------------------------------
// env-entry-name
JndiNameType envEntryName = envEntry.addNewEnvEntryName();
envEntryName.setStringValue(resourceName);
if (!resourceType.equals("")) {
// env-entry-type
EnvEntryTypeValuesType envEntryType = envEntry.addNewEnvEntryType();
envEntryType.setStringValue(resourceType);
}
if (method != null || field != null) {
// injectionTarget
InjectionTargetType injectionTarget = envEntry.addNewInjectionTarget();
configureInjectionTarget(injectionTarget, method, field);
}
// mappedName
String mappdedNameAnnotation = annotation.mappedName();
if (!mappdedNameAnnotation.equals("")) {
XsdStringType mappedName = envEntry.addNewMappedName();
mappedName.setStringValue(mappdedNameAnnotation);
envEntry.setMappedName(mappedName);
}
//------------------------------------------------------------------------------
// <env-entry> optional elements:
//------------------------------------------------------------------------------
// description
String descriptionAnnotation = annotation.description();
if (!descriptionAnnotation.equals("")) {
DescriptionType description = envEntry.addNewDescription();
description.setStringValue(descriptionAnnotation);
}
}
catch (Exception anyException) {