use of javax.ejb.ActivationConfigProperty in project Payara by payara.
the class MessageDrivenHandler method setEjbDescriptorInfo.
/**
* Set Annotation information to Descriptor.
* This method will also be invoked for an existing descriptor with
* annotation as user may not specific a complete xml.
* @param ejbDesc
* @param ainfo
* @return HandlerProcessingResult
*/
protected HandlerProcessingResult setEjbDescriptorInfo(EjbDescriptor ejbDesc, AnnotationInfo ainfo) throws AnnotationProcessorException {
MessageDriven mdAn = (MessageDriven) ainfo.getAnnotation();
Class ejbClass = (Class) ainfo.getAnnotatedElement();
EjbMessageBeanDescriptor ejbMsgBeanDesc = (EjbMessageBeanDescriptor) ejbDesc;
HandlerProcessingResult procResult = setMessageListenerInterface(mdAn, ejbMsgBeanDesc, ejbClass, ainfo);
doDescriptionProcessing(mdAn.description(), ejbMsgBeanDesc);
doMappedNameProcessing(mdAn.mappedName(), ejbMsgBeanDesc);
for (ActivationConfigProperty acProp : mdAn.activationConfig()) {
EnvironmentProperty envProp = new EnvironmentProperty(acProp.propertyName(), (String) TranslatedConfigView.getTranslatedValue(acProp.propertyValue()), "");
// xml override
if (acProp.propertyName().equals("resourceAdapter")) {
ejbMsgBeanDesc.setResourceAdapterMid(envProp.getValue());
} else if (ejbMsgBeanDesc.getActivationConfigValue(envProp.getName()) == null) {
ejbMsgBeanDesc.putActivationConfigProperty(envProp);
}
}
return procResult;
}
Aggregations