public JmsDestinationModel createUnique(Set<ProjectModel> applications, String jndiName) { JmsDestinationModel model = null; JNDIResourceModel jndiRef = jndiResourceService.createUnique(applications, jndiName); if (jndiRef instanceof JmsDestinationModel) { model = (JmsDestinationModel) jndiRef; } else { model = this.addTypeToModel(jndiRef); } return model; }
/** * Creates a new instance with the given name, or converts an existing instance at this location if one already exists */ public JmsDestinationModel createUnique(Set<ProjectModel> applications, String jndiName, String destinationTypeClass) { JmsDestinationType destinationType = JmsDestinationService.getTypeFromClass(destinationTypeClass); return this.createUnique(applications, jndiName, 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)); } }
/** * Creates a new instance with the given name, or converts an existing instance at this location if one already exists */ public JmsDestinationModel createUnique(Set<ProjectModel> applications, String jndiName, JmsDestinationType destinationType) { JmsDestinationModel model = createUnique(applications, jndiName); model.setDestinationType(destinationType); return model; }
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)); } }
/** * Creates a new instance with the given name, or converts an existing instance at this location if one already exists */ public JmsDestinationModel createUnique(Set<ProjectModel> applications, String jndiName, JmsDestinationType destinationType) { JmsDestinationModel model = createUnique(applications, jndiName); model.setDestinationType(destinationType); return model; }
JmsDestinationService jmsDestinationService = new JmsDestinationService(event.getGraphContext()); XmlFileService xmlFileService = new XmlFileService(event.getGraphContext()); GraphService<EjbSessionBeanModel> ejbSessionBeanService = new GraphService<>(event.getGraphContext(), EjbSessionBeanModel.class); JmsDestinationModel jndiRef = jmsDestinationService.createUnique(applications, destination); mdb.setDestination(jndiRef);
/** * Creates a new instance with the given name, or converts an existing instance at this location if one already exists */ public JmsDestinationModel createUnique(Set<ProjectModel> applications, String jndiName, String destinationTypeClass) { JmsDestinationType destinationType = JmsDestinationService.getTypeFromClass(destinationTypeClass); return this.createUnique(applications, jndiName, destinationType); }
public JmsDestinationModel createUnique(Set<ProjectModel> applications, String jndiName) { JmsDestinationModel model = null; JNDIResourceModel jndiRef = jndiResourceService.createUnique(applications, jndiName); if (jndiRef instanceof JmsDestinationModel) { model = (JmsDestinationModel) jndiRef; } else { model = this.addTypeToModel(jndiRef); } return model; }
JmsDestinationService jmsDestinationService = new JmsDestinationService(event.getGraphContext()); XmlFileService xmlFileService = new XmlFileService(event.getGraphContext()); GraphService<EjbSessionBeanModel> ejbSessionBeanService = new GraphService<>(event.getGraphContext(), EjbSessionBeanModel.class); 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()); JmsDestinationModel jndiRef = jmsDestinationService.createUnique(applications, destination); mdb.setDestination(jndiRef);
JmsDestinationService jmsDestinationService = new JmsDestinationService(event.getGraphContext()); XmlFileService xmlFileService = new XmlFileService(event.getGraphContext()); VendorSpecificationExtensionService vendorSpecificationService = new VendorSpecificationExtensionService(event.getGraphContext()); if (StringUtils.isNotBlank(destination)) JmsDestinationModel jndiRef = jmsDestinationService.createUnique(applications, destination); mdb.setDestination(jndiRef);
JmsDestinationService jmsDestinationService = new JmsDestinationService(event.getGraphContext()); XmlFileService xmlFileService = new XmlFileService(event.getGraphContext()); VendorSpecificationExtensionService vendorSpecificationService = new VendorSpecificationExtensionService(event.getGraphContext()); if (StringUtils.isNotBlank(destination)) 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()); JmsDestinationModel jndiRef = jmsDestinationService.createUnique(applications, destination); mdb.setDestination(jndiRef);
JmsDestinationService jmsDestinationService = new JmsDestinationService(graphContext); GraphService<EjbSessionBeanModel> ejbSessionBeanService = new GraphService<>(graphContext, EjbSessionBeanModel.class); GraphService<EjbMessageDrivenModel> mdbService = new GraphService<>(graphContext, EjbMessageDrivenModel.class); if (StringUtils.isNotBlank(destination)) JmsDestinationModel jndiRef = jmsDestinationService.createUnique(applications, destination); mdb.setDestination(jndiRef);
JmsDestinationService jmsDestinationService = new JmsDestinationService(graphContext); GraphService<EjbSessionBeanModel> ejbSessionBeanService = new GraphService<>(graphContext, EjbSessionBeanModel.class); GraphService<EjbMessageDrivenModel> mdbService = new GraphService<>(graphContext, EjbMessageDrivenModel.class); if (StringUtils.isNotBlank(destination)) 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()); JmsDestinationModel jndiRef = jmsDestinationService.createUnique(applications, destination); mdb.setDestination(jndiRef);