use of com.flowlogix.web.services.annotations.Stateful in project flowlogix by flowlogix.
the class EJBAnnotationWorker method transform.
@Override
@SneakyThrows({ NamingException.class })
public void transform(PlasticClass plasticClass, TransformationSupport support, MutableComponentModel model) {
for (PlasticField field : plasticClass.getFieldsWithAnnotation(EJB.class)) {
final EJB annotation = field.getAnnotation(EJB.class);
final Stateful stateful = field.getAnnotation(Stateful.class);
final String fieldType = field.getTypeName();
final String fieldName = field.getName();
final String mappedName = annotation.mappedName();
final JNDIObjectLocator locator = JNDIObjectLocator.builder().build();
final String lookupname = getLookupName(annotation, fieldType, locator);
Object injectionValue = lookupBean(field, fieldType, fieldName, lookupname, mappedName, stateful, locator);
if (injectionValue != null) {
field.claim(annotation);
}
}
}
Aggregations