use of javax.resource.spi.ConnectionDefinition in project Payara by payara.
the class ConnectionDefinitionHandler method processAnnotation.
public HandlerProcessingResult processAnnotation(AnnotationInfo element) throws AnnotationProcessorException {
AnnotatedElementHandler aeHandler = element.getProcessingContext().getHandler();
ConnectionDefinition connDefn = (ConnectionDefinition) element.getAnnotation();
if (aeHandler instanceof RarBundleContext) {
handleAnnotation(aeHandler, connDefn, element);
} else {
getFailureResult(element, "not a rar bundle context", true);
}
return getDefaultProcessedResult();
}
use of javax.resource.spi.ConnectionDefinition 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