private void extractMessageDrivenMetadata(GraphRewrite event, JavaTypeReferenceModel javaTypeReference) { javaTypeReference.getFile().setGenerateSourceReport(true); JavaAnnotationTypeReferenceModel annotationTypeReference = (JavaAnnotationTypeReferenceModel) javaTypeReference; JavaClassModel ejbClass = getJavaClass(javaTypeReference); String ejbName = getAnnotationLiteralValue(annotationTypeReference, "name"); if (Strings.isNullOrEmpty(ejbName)) { ejbName = ejbClass.getClassName(); } JavaAnnotationTypeValueModel activationConfigAnnotation = annotationTypeReference.getAnnotationValues().get("activationConfig"); String destination = getAnnotationLiteralValue(annotationTypeReference, "mappedName"); if (StringUtils.isBlank(destination)) { destination = getDestinationFromActivationConfig(activationConfigAnnotation); } Service<EjbMessageDrivenModel> messageDrivenService = new GraphService<>(event.getGraphContext(), EjbMessageDrivenModel.class); EjbMessageDrivenModel messageDrivenBean = messageDrivenService.create(); Set<ProjectModel> applications = ProjectTraversalCache.getApplicationsForProject(event.getGraphContext(), javaTypeReference.getFile().getProjectModel()); messageDrivenBean.setApplications(applications); messageDrivenBean.setBeanName(ejbName); messageDrivenBean.setEjbClass(ejbClass); if (StringUtils.isNotBlank(destination)) { String destinationType = getPropertyFromActivationConfig(activationConfigAnnotation, "destinationType"); JmsDestinationService jmsDestinationService = new JmsDestinationService(event.getGraphContext()); messageDrivenBean.setDestination(jmsDestinationService.createUnique(applications, destination, destinationType)); } }
private void extractMessageDrivenMetadata(GraphRewrite event, JavaTypeReferenceModel javaTypeReference) { javaTypeReference.getFile().setGenerateSourceReport(true); JavaAnnotationTypeReferenceModel annotationTypeReference = (JavaAnnotationTypeReferenceModel) javaTypeReference; JavaClassModel ejbClass = getJavaClass(javaTypeReference); String ejbName = getAnnotationLiteralValue(annotationTypeReference, "name"); if (Strings.isNullOrEmpty(ejbName)) { ejbName = ejbClass.getClassName(); } JavaAnnotationTypeValueModel activationConfigAnnotation = annotationTypeReference.getAnnotationValues().get("activationConfig"); String destination = getAnnotationLiteralValue(annotationTypeReference, "mappedName"); if (StringUtils.isBlank(destination)) { destination = getDestinationFromActivationConfig(activationConfigAnnotation); } Service<EjbMessageDrivenModel> messageDrivenService = new GraphService<>(event.getGraphContext(), EjbMessageDrivenModel.class); EjbMessageDrivenModel messageDrivenBean = messageDrivenService.create(); Set<ProjectModel> applications = ProjectTraversalCache.getApplicationsForProject(event.getGraphContext(), javaTypeReference.getFile().getProjectModel()); messageDrivenBean.setApplications(applications); messageDrivenBean.setBeanName(ejbName); messageDrivenBean.setEjbClass(ejbClass); if (StringUtils.isNotBlank(destination)) { String destinationType = getPropertyFromActivationConfig(activationConfigAnnotation, "destinationType"); JmsDestinationService jmsDestinationService = new JmsDestinationService(event.getGraphContext()); messageDrivenBean.setDestination(jmsDestinationService.createUnique(applications, destination, destinationType)); } }
JmsDestinationService jmsDestinationService = new JmsDestinationService(event.getGraphContext()); XmlFileService xmlFileService = new XmlFileService(event.getGraphContext()); GraphService<EjbSessionBeanModel> ejbSessionBeanService = new GraphService<>(event.getGraphContext(), EjbSessionBeanModel.class);
JmsDestinationService jmsDestinationService = new JmsDestinationService(event.getGraphContext()); XmlFileService xmlFileService = new XmlFileService(event.getGraphContext()); GraphService<EjbSessionBeanModel> ejbSessionBeanService = new GraphService<>(event.getGraphContext(), EjbSessionBeanModel.class);
JmsDestinationService jmsDestinationService = new JmsDestinationService(event.getGraphContext()); XmlFileService xmlFileService = new XmlFileService(event.getGraphContext()); VendorSpecificationExtensionService vendorSpecificationService = new VendorSpecificationExtensionService(event.getGraphContext());
JmsDestinationService jmsDestinationService = new JmsDestinationService(event.getGraphContext()); XmlFileService xmlFileService = new XmlFileService(event.getGraphContext()); VendorSpecificationExtensionService vendorSpecificationService = new VendorSpecificationExtensionService(event.getGraphContext());
JmsDestinationService jmsDestinationService = new JmsDestinationService(event.getGraphContext());
JmsDestinationService jmsDestinationService = new JmsDestinationService(event.getGraphContext());
JmsDestinationService jmsDestinationService = new JmsDestinationService(event.getGraphContext()); JmsDestinationModel jndiRef = jmsDestinationService.createUnique(applications, destination); mdb.setDestination(jndiRef);
JmsDestinationService jmsDestinationService = new JmsDestinationService(event.getGraphContext()); JmsDestinationModel jndiRef = jmsDestinationService.createUnique(applications, destination); mdb.setDestination(jndiRef);
JmsDestinationService jmsDestinationService = new JmsDestinationService(event.getGraphContext());
JmsDestinationService jmsDestinationService = new JmsDestinationService(event.getGraphContext());
JmsDestinationService jmsDestinationService = new JmsDestinationService(graphContext); GraphService<EjbSessionBeanModel> ejbSessionBeanService = new GraphService<>(graphContext, EjbSessionBeanModel.class); GraphService<EjbMessageDrivenModel> mdbService = new GraphService<>(graphContext, EjbMessageDrivenModel.class);
JmsDestinationService jmsDestinationService = new JmsDestinationService(graphContext); GraphService<EjbSessionBeanModel> ejbSessionBeanService = new GraphService<>(graphContext, EjbSessionBeanModel.class); GraphService<EjbMessageDrivenModel> mdbService = new GraphService<>(graphContext, EjbMessageDrivenModel.class);