This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit b4bcbb14fcd0d9248f67e73dbbdbebb3f2f42557 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Fri Jun 21 12:42:14 2019 +0200 CAMEL-13663: camel-main-maven-plugin to generte spring-boot tooling metadata to fool Java editors to have code completions for Camel Main application.properties files. --- .../org/apache/camel/maven/AbstractMainMojo.java | 88 +++++-- .../java/org/apache/camel/maven/GenerateMojo.java | 35 +++ examples/camel-example-main-artemis/pom.xml | 4 +- .../META-INF/spring-configuration-metadata.json | 254 ++------------------- 4 files changed, 134 insertions(+), 247 deletions(-) diff --git a/catalog/camel-main-maven-plugin/src/main/java/org/apache/camel/maven/AbstractMainMojo.java b/catalog/camel-main-maven-plugin/src/main/java/org/apache/camel/maven/AbstractMainMojo.java index bf4beaf..bd93300 100644 --- a/catalog/camel-main-maven-plugin/src/main/java/org/apache/camel/maven/AbstractMainMojo.java +++ b/catalog/camel-main-maven-plugin/src/main/java/org/apache/camel/maven/AbstractMainMojo.java @@ -41,6 +41,7 @@ import org.apache.camel.util.IOHelper; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.resolver.ArtifactResolutionRequest; +import org.apache.maven.artifact.resolver.ArtifactResolutionResult; import org.apache.maven.artifact.resolver.ArtifactResolver; import org.apache.maven.model.Dependency; import org.apache.maven.plugin.MojoExecutionException; @@ -75,6 +76,8 @@ public abstract class AbstractMainMojo extends AbstractExecMojo { protected transient ClassLoader classLoader; + protected transient ClassLoader sourcesClassLoader; + protected transient CamelCatalog catalog; protected transient Reflections reflections; @@ -215,7 +218,7 @@ public abstract class AbstractMainMojo extends AbstractExecMojo { protected Set<String> resolveCamelComponentsFromClasspath() throws MojoFailureException { Set<String> components = new TreeSet<>(); try { - classLoader = getClassLoader(); + classLoader = getClassLoader(false); Enumeration<URL> en = classLoader.getResources("META-INF/services/org/apache/camel/component.properties"); while (en.hasMoreElements()) { URL url = en.nextElement(); @@ -236,19 +239,38 @@ public abstract class AbstractMainMojo extends AbstractExecMojo { return components; } + protected ClassLoader getSourcesClassLoader() throws Exception { + if (sourcesClassLoader == null) { + try { + sourcesClassLoader = getClassLoader(true); + } catch (Throwable e) { + getLog().warn("Cannot download sources JAR to look for javadoc descriptions of the discovered options, due to: " + e.getMessage()); + } + } + return sourcesClassLoader; + } + /** * Set up a classloader for scanning */ - private ClassLoader getClassLoader() throws MalformedURLException, MojoExecutionException { + private ClassLoader getClassLoader(boolean sourcesOnly) throws MalformedURLException, MojoExecutionException { Set<URL> classpathURLs = new LinkedHashSet<>(); // add project classpath - URL mainClasses = new File(project.getBuild().getOutputDirectory()).toURI().toURL(); - classpathURLs.add(mainClasses); + if (!sourcesOnly) { + URL mainClasses = new File(project.getBuild().getOutputDirectory()).toURI().toURL(); + classpathURLs.add(mainClasses); + } // add maven dependencies - Set<Artifact> deps = project.getArtifacts(); - deps.addAll(getAllNonTestScopedDependencies()); + Set<Artifact> deps; + if (sourcesOnly) { + deps = new LinkedHashSet<>(); + deps.addAll(getAllSourceOnlyDependencies(getAllNonTestScopedDependencies())); + } else { + deps = project.getArtifacts(); + deps.addAll(getAllNonTestScopedDependencies()); + } for (Artifact dep : deps) { File file = dep.getFile(); if (file != null) { @@ -257,7 +279,11 @@ public abstract class AbstractMainMojo extends AbstractExecMojo { } if (logClasspath) { - getLog().info("Classpath:"); + if (sourcesOnly) { + getLog().info("Sources Classpath:"); + } else { + getLog().info("Classpath:"); + } for (URL url : classpathURLs) { getLog().info(" " + url.getFile()); } @@ -271,7 +297,7 @@ public abstract class AbstractMainMojo extends AbstractExecMojo { for (Artifact artifact : getAllDependencies()) { // do not add test artifacts - if (!artifact.getScope().equals(Artifact.SCOPE_TEST)) { + if (!Artifact.SCOPE_TEST.equals(artifact.getScope())) { if ("google-collections".equals(artifact.getArtifactId())) { // skip this as we conflict with guava @@ -295,15 +321,51 @@ public abstract class AbstractMainMojo extends AbstractExecMojo { // generic method to retrieve all the transitive dependencies private Collection<Artifact> getAllDependencies() { - List<Artifact> artifacts = new ArrayList<>(); + List<Artifact> answer = new ArrayList<>(); for (Iterator<?> dependencies = project.getDependencies().iterator(); dependencies.hasNext();) { - Dependency dependency = (Dependency) dependencies.next(); - Artifact art = repositorySystem.createDependencyArtifact(dependency); - artifacts.add(art); + Dependency dep = (Dependency) dependencies.next(); + Artifact art = repositorySystem.createDependencyArtifact(dep); + if (!art.isResolved()) { + ArtifactResolutionRequest req = new ArtifactResolutionRequest(); + req.setArtifact(art); + req.setResolveTransitively(true); + req.setLocalRepository(localRepository); + req.setRemoteRepositories(remoteRepositories); + ArtifactResolutionResult res = artifactResolver.resolve(req); + if (res.isSuccess()) { + answer.addAll(res.getArtifacts()); + } + } else { + answer.add(art); + } } - return artifacts; + return answer; + } + + private Collection<Artifact> getAllSourceOnlyDependencies(Collection<Artifact> artifacts) { + List<Artifact> answer = new ArrayList<>(); + + for (Artifact art : artifacts) { + Artifact sourceArt = repositorySystem.createArtifactWithClassifier(art.getGroupId(), art.getArtifactId(), art.getVersion(), art.getType(), "sources"); + if (!sourceArt.isResolved()) { + ArtifactResolutionRequest req = new ArtifactResolutionRequest(); + req.setArtifact(sourceArt); + req.setResolveTransitively(false); + req.setLocalRepository(localRepository); + req.setRemoteRepositories(remoteRepositories); + ArtifactResolutionResult res = artifactResolver.resolve(req); + if (res.isSuccess()) { + for (Artifact a : res.getArtifacts()) { + answer.add(a); + } + } + } else { + answer.add(sourceArt); + } + } + return answer; } static String safeJavaType(String javaType) { diff --git a/catalog/camel-main-maven-plugin/src/main/java/org/apache/camel/maven/GenerateMojo.java b/catalog/camel-main-maven-plugin/src/main/java/org/apache/camel/maven/GenerateMojo.java index 0dd59d3..dc460e6 100644 --- a/catalog/camel-main-maven-plugin/src/main/java/org/apache/camel/maven/GenerateMojo.java +++ b/catalog/camel-main-maven-plugin/src/main/java/org/apache/camel/maven/GenerateMojo.java @@ -23,16 +23,23 @@ import java.io.IOException; import java.io.InputStream; import java.lang.reflect.Method; import java.lang.reflect.Modifier; +import java.net.JarURLConnection; +import java.net.URL; import java.util.ArrayList; +import java.util.Enumeration; import java.util.List; import java.util.Properties; import java.util.Set; +import java.util.jar.JarEntry; +import java.util.jar.JarFile; +import java.util.logging.FileHandler; import java.util.stream.Collectors; import org.apache.camel.maven.model.AutowireData; import org.apache.camel.maven.model.SpringBootData; import org.apache.camel.support.IntrospectionSupport; import org.apache.camel.support.PatternHelper; +import org.apache.camel.util.FileUtil; import org.apache.camel.util.IOHelper; import org.apache.camel.util.OrderedProperties; import org.apache.camel.util.StringHelper; @@ -178,6 +185,20 @@ public class GenerateMojo extends AbstractMainMojo { extraSetterMethods(best, setters); // sort the setters setters.sort((o1, o2) -> o1.getName().compareToIgnoreCase(o2.getName())); + + String javaSource = null; + if (!setters.isEmpty()) { + String path = best.getName().replace('.', '/') + ".java"; + getLog().debug("Loading Java source: " + path); + + InputStream is = getSourcesClassLoader().getResourceAsStream(path); + if (is != null) { + javaSource = IOHelper.loadText(is); + IOHelper.close(is); + } + getLog().info("Loaded source code: " + javaSource); + } + for (Method m : setters) { String shortHand = IntrospectionSupport.getSetterShorthandName(m); String bootName = camelCaseToDash(shortHand); @@ -185,6 +206,9 @@ public class GenerateMojo extends AbstractMainMojo { String bootJavaType = m.getParameterTypes()[0].getName(); String sourceType = best.getName(); getLog().debug("Spring Boot option: " + bootKey); + + // find the setter method and grab the javadoc + String desc = "Auto discovered option from class: " + best.getName() + " to set the option via setter: " + m.getName(); springBootData.add(new SpringBootData(bootKey, springBootJavaType(bootJavaType), desc, sourceType, null)); } @@ -441,4 +465,15 @@ public class GenerateMojo extends AbstractMainMojo { } } + public static void main(String[] args) throws Exception { + JarFile jar = new JarFile("/Users/davsclaus/.m2/repository/org/springframework/spring-jms/5.1.8.RELEASE/spring-jms-5.1.8.RELEASE-sources.jar"); + System.out.println(jar); + JarEntry en = jar.getJarEntry("org/springframework/jms/connection/CachingConnectionFactory.java"); + System.out.println(en); + InputStream is = jar.getInputStream(en); + String source = IOHelper.loadText(is); + IOHelper.close(is); + System.out.println(source); + } + } diff --git a/examples/camel-example-main-artemis/pom.xml b/examples/camel-example-main-artemis/pom.xml index f1ea8df..5d0ddc0 100644 --- a/examples/camel-example-main-artemis/pom.xml +++ b/examples/camel-example-main-artemis/pom.xml @@ -113,13 +113,13 @@ <artifactId>camel-main-maven-plugin</artifactId> <version>${project.version}</version> <configuration> - <logClasspath>false</logClasspath> + <logClasspath>true</logClasspath> <!-- lets show which options are unmapped --> <!-- <logUnmapped>true</logUnmapped> --> <!-- just include only the jms component --> <!-- <include>jms</include> --> <!-- to use spring caching connection factory instead of the default --> - <!-- <mappings>javax.jms.ConnectionFactory=#class:org.springframework.jms.connection.CachingConnectionFactory</mappings> --> + <mappings>javax.jms.ConnectionFactory=#class:org.springframework.jms.connection.CachingConnectionFactory</mappings> </configuration> <executions> <execution> diff --git a/examples/camel-example-main-artemis/src/main/resources/META-INF/spring-configuration-metadata.json b/examples/camel-example-main-artemis/src/main/resources/META-INF/spring-configuration-metadata.json index c787468..06960b3 100644 --- a/examples/camel-example-main-artemis/src/main/resources/META-INF/spring-configuration-metadata.json +++ b/examples/camel-example-main-artemis/src/main/resources/META-INF/spring-configuration-metadata.json @@ -784,256 +784,46 @@ "description": "The connection factory to be use. A connection factory must be configured either on the component or endpoint." }, { - "name": "camel.component.jms.connection-factory.auto-group", + "name": "camel.component.jms.connection-factory.cache-consumers", "type": "java.lang.Boolean", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setAutoGroup" + "sourceType": "org.springframework.jms.connection.CachingConnectionFactory", + "description": "Auto discovered option from class: org.springframework.jms.connection.CachingConnectionFactory to set the option via setter: setCacheConsumers" }, { - "name": "camel.component.jms.connection-factory.block-on-acknowledge", + "name": "camel.component.jms.connection-factory.cache-producers", "type": "java.lang.Boolean", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setBlockOnAcknowledge" - }, - { - "name": "camel.component.jms.connection-factory.block-on-durable-send", - "type": "java.lang.Boolean", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setBlockOnDurableSend" - }, - { - "name": "camel.component.jms.connection-factory.block-on-non-durable-send", - "type": "java.lang.Boolean", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setBlockOnNonDurableSend" - }, - { - "name": "camel.component.jms.connection-factory.cache-destinations", - "type": "java.lang.Boolean", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setCacheDestinations" - }, - { - "name": "camel.component.jms.connection-factory.cache-large-messages-client", - "type": "java.lang.Boolean", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setCacheLargeMessagesClient" - }, - { - "name": "camel.component.jms.connection-factory.call-failover-timeout", - "type": "java.lang.Long", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setCallFailoverTimeout" - }, - { - "name": "camel.component.jms.connection-factory.call-timeout", - "type": "java.lang.Long", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setCallTimeout" - }, - { - "name": "camel.component.jms.connection-factory.client-failure-check-period", - "type": "java.lang.Long", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setClientFailureCheckPeriod" + "sourceType": "org.springframework.jms.connection.CachingConnectionFactory", + "description": "Auto discovered option from class: org.springframework.jms.connection.CachingConnectionFactory to set the option via setter: setCacheProducers" }, { "name": "camel.component.jms.connection-factory.client-id", "type": "java.lang.String", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setClientID" - }, - { - "name": "camel.component.jms.connection-factory.compress-large-message", - "type": "java.lang.Boolean", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setCompressLargeMessage" - }, - { - "name": "camel.component.jms.connection-factory.confirmation-window-size", - "type": "java.lang.Integer", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setConfirmationWindowSize" - }, - { - "name": "camel.component.jms.connection-factory.connection-load-balancing-policy-class-name", - "type": "java.lang.String", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setConnectionLoadBalancingPolicyClassName" - }, - { - "name": "camel.component.jms.connection-factory.connection-ttl", - "type": "java.lang.Long", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setConnectionTTL" - }, - { - "name": "camel.component.jms.connection-factory.consumer-max-rate", - "type": "java.lang.Integer", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setConsumerMaxRate" - }, - { - "name": "camel.component.jms.connection-factory.consumer-window-size", - "type": "java.lang.Integer", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setConsumerWindowSize" - }, - { - "name": "camel.component.jms.connection-factory.deserialization-black-list", - "type": "java.lang.String", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setDeserializationBlackList" - }, - { - "name": "camel.component.jms.connection-factory.deserialization-white-list", - "type": "java.lang.String", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setDeserializationWhiteList" - }, - { - "name": "camel.component.jms.connection-factory.dups-ok-batch-size", - "type": "java.lang.Integer", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setDupsOKBatchSize" - }, - { - "name": "camel.component.jms.connection-factory.enable1x-prefixes", - "type": "java.lang.Boolean", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setEnable1xPrefixes" - }, - { - "name": "camel.component.jms.connection-factory.enable-shared-client-id", - "type": "java.lang.Boolean", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setEnableSharedClientID" - }, - { - "name": "camel.component.jms.connection-factory.failover-on-initial-connection", - "type": "java.lang.Boolean", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setFailoverOnInitialConnection" - }, - { - "name": "camel.component.jms.connection-factory.group-id", - "type": "java.lang.String", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setGroupID" - }, - { - "name": "camel.component.jms.connection-factory.ignore-jta", - "type": "java.lang.Boolean", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setIgnoreJTA" - }, - { - "name": "camel.component.jms.connection-factory.incoming-interceptor-list", - "type": "java.lang.String", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setIncomingInterceptorList" + "sourceType": "org.springframework.jms.connection.CachingConnectionFactory", + "description": "Auto discovered option from class: org.springframework.jms.connection.CachingConnectionFactory to set the option via setter: setClientId" }, { - "name": "camel.component.jms.connection-factory.initial-connect-attempts", - "type": "java.lang.Integer", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setInitialConnectAttempts" - }, - { - "name": "camel.component.jms.connection-factory.initial-message-packet-size", - "type": "java.lang.Integer", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setInitialMessagePacketSize" - }, - { - "name": "camel.component.jms.connection-factory.max-retry-interval", - "type": "java.lang.Long", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setMaxRetryInterval" - }, - { - "name": "camel.component.jms.connection-factory.min-large-message-size", - "type": "java.lang.Integer", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setMinLargeMessageSize" - }, - { - "name": "camel.component.jms.connection-factory.outgoing-interceptor-list", - "type": "java.lang.String", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setOutgoingInterceptorList" + "name": "camel.component.jms.connection-factory.exception-listener", + "type": "javax.jms.ExceptionListener", + "sourceType": "org.springframework.jms.connection.CachingConnectionFactory", + "description": "Auto discovered option from class: org.springframework.jms.connection.CachingConnectionFactory to set the option via setter: setExceptionListener" }, { - "name": "camel.component.jms.connection-factory.pre-acknowledge", + "name": "camel.component.jms.connection-factory.reconnect-on-exception", "type": "java.lang.Boolean", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setPreAcknowledge" - }, - { - "name": "camel.component.jms.connection-factory.producer-max-rate", - "type": "java.lang.Integer", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setProducerMaxRate" - }, - { - "name": "camel.component.jms.connection-factory.producer-window-size", - "type": "java.lang.Integer", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setProducerWindowSize" - }, - { - "name": "camel.component.jms.connection-factory.protocol-manager-factory-str", - "type": "java.lang.String", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setProtocolManagerFactoryStr" + "sourceType": "org.springframework.jms.connection.CachingConnectionFactory", + "description": "Auto discovered option from class: org.springframework.jms.connection.CachingConnectionFactory to set the option via setter: setReconnectOnException" }, { - "name": "camel.component.jms.connection-factory.reconnect-attempts", + "name": "camel.component.jms.connection-factory.session-cache-size", "type": "java.lang.Integer", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setReconnectAttempts" - }, - { - "name": "camel.component.jms.connection-factory.retry-interval", - "type": "java.lang.Long", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setRetryInterval" + "sourceType": "org.springframework.jms.connection.CachingConnectionFactory", + "description": "Auto discovered option from class: org.springframework.jms.connection.CachingConnectionFactory to set the option via setter: setSessionCacheSize" }, { - "name": "camel.component.jms.connection-factory.retry-interval-multiplier", - "type": "double", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setRetryIntervalMultiplier" - }, - { - "name": "camel.component.jms.connection-factory.scheduled-thread-pool-max-size", - "type": "java.lang.Integer", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setScheduledThreadPoolMaxSize" - }, - { - "name": "camel.component.jms.connection-factory.thread-pool-max-size", - "type": "java.lang.Integer", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setThreadPoolMaxSize" - }, - { - "name": "camel.component.jms.connection-factory.transaction-batch-size", - "type": "java.lang.Integer", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setTransactionBatchSize" - }, - { - "name": "camel.component.jms.connection-factory.use-global-pools", - "type": "java.lang.Boolean", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setUseGlobalPools" - }, - { - "name": "camel.component.jms.connection-factory.use-topology-for-load-balancing", - "type": "java.lang.Boolean", - "sourceType": "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", - "description": "Auto discovered option from class: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory to set the option via setter: setUseTopologyForLoadBalancing" + "name": "camel.component.jms.connection-factory.target-connection-factory", + "type": "javax.jms.ConnectionFactory", + "sourceType": "org.springframework.jms.connection.CachingConnectionFactory", + "description": "Auto discovered option from class: org.springframework.jms.connection.CachingConnectionFactory to set the option via setter: setTargetConnectionFactory" }, { "name": "camel.component.jms.username",