use of javax.resource.spi.ConnectionDefinitions in project Payara by payara.
the class ConnectionDefinitionsHandler method processAnnotation.
public HandlerProcessingResult processAnnotation(AnnotationInfo element) throws AnnotationProcessorException {
AnnotatedElementHandler aeHandler = element.getProcessingContext().getHandler();
ConnectionDefinitions connDefns = (ConnectionDefinitions) element.getAnnotation();
if (aeHandler instanceof RarBundleContext) {
// TODO V3 what if there is @ConnectionDefiniton as well @ConnectionDefinitions specified on same class ?
// TODO V3 should we detect & avoid duplicates here ?
ConnectionDefinition[] definitions = connDefns.value();
if (definitions != null) {
for (ConnectionDefinition defn : definitions) {
ConnectionDefinitionHandler cdh = new ConnectionDefinitionHandler();
cdh.processAnnotation(element, defn);
}
}
} else {
getFailureResult(element, "not a rar bundle context", true);
}
return getDefaultProcessedResult();
}
Aggregations