mdb.setEjbClass(ejb); mdb.setBeanName(ejbName); mdb.setDisplayName(displayName); mdb.setEjbId(ejbId); mdb.setSessionType(sessionType); mdb.setTransactionType(transactionType); mdb.setDestination(destination); mdb.addEnvironmentReference(ref);
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) { ((SourceFileModel) javaTypeReference.getFile()).setGenerateSourceReport(true); JavaAnnotationTypeReferenceModel annotationTypeReference = (JavaAnnotationTypeReferenceModel) javaTypeReference; JavaClassModel ejbClass = getJavaClass(javaTypeReference); String ejbName = annotationTypeReference.getAnnotationValues().get("name"); String destination = annotationTypeReference.getAnnotationValues().get("mappedName"); if (StringUtils.isBlank(destination)) { String activationConfig = annotationTypeReference.getAnnotationValues().get("activationConfig"); Pattern p = Pattern .compile(".*propertyName[ \\t\\n]*=[ \\t\\n]*\"destination\"[ \\t\\n]*,[ \\t\\n]*propertyValue[ \\t\\n]*=[ \\t\\n]*\"(.*?)\".*"); Matcher m = p.matcher(activationConfig); if (m.matches()) { destination = m.group(1); } } Service<EjbMessageDrivenModel> messageDrivenService = new GraphService<>(event.getGraphContext(), EjbMessageDrivenModel.class); EjbMessageDrivenModel messageDrivenBean = messageDrivenService.create(); messageDrivenBean.setBeanName(ejbName); messageDrivenBean.setEjbClass(ejbClass); messageDrivenBean.setDestination(destination); }
mdb.setThreadPool(threadPoolModel); mdb.setDestination(jndiRef); mdb.setTxTimeouts(txTimeouts);
mdb.setDestination(jndiRef);
mdb.setDestination(jndiRef); mdb.setTxTimeouts(txTimeouts);
mdb.setThreadPool(threadPoolModel); mdb.setDestination(jndiRef); mdb.setTxTimeouts(txTimeouts);
mdb.setDestination(jndiRef); mdb.setTxTimeouts(txTimeouts);
mdb.setApplications(applications); mdb.setEjbClass(ejb); mdb.setBeanName(ejbName); mdb.setDisplayName(displayName); mdb.setEjbId(ejbId); mdb.setSessionType(sessionType); mdb.setTransactionType(transactionType); mdb.setDestination(jndiRef); for (EnvironmentReferenceModel ref : refs) mdb.addEnvironmentReference(ref);
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)); } }
mdb.setDestination(jndiRef);
mdb.setApplications(applications); mdb.setEjbClass(ejb); mdb.setBeanName(ejbName); mdb.setDisplayName(displayName); mdb.setEjbId(ejbId); mdb.setSessionType(sessionType); mdb.setTransactionType(transactionType); mdb.setDestination(jndiRef); for (EnvironmentReferenceModel ref : refs) mdb.addEnvironmentReference(ref);
mdb.setDestination(jndiRef);