use of org.glassfish.ejb.deployment.descriptor.EjbDescriptor in project Payara by payara.
the class TransactionManagementHandler method processAnnotation.
protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, EjbContext[] ejbContexts) throws AnnotationProcessorException {
TransactionManagement tmAn = (TransactionManagement) ainfo.getAnnotation();
String tmType = TransactionManagementType.CONTAINER.equals(tmAn.value()) ? EjbDescriptor.CONTAINER_TRANSACTION_TYPE : EjbDescriptor.BEAN_TRANSACTION_TYPE;
for (EjbContext ejbContext : ejbContexts) {
EjbDescriptor ejbDesc = (EjbDescriptor) ejbContext.getDescriptor();
// override by xml
if (ejbDesc.getTransactionType() == null) {
ejbDesc.setTransactionType(tmType);
}
}
return getDefaultProcessedResult();
}
Aggregations