You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2019/01/03 08:56:59 UTC

[camel] branch master updated (cbd5d63 -> 85a7a08)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from cbd5d63  Update quartz docs with misfire instructions
     new 74236f1  Regen
     new 7d21f91  Camel Maven tooling should skip empty example directories.
     new 85a7a08  Regen

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../modules/ROOT/pages/quartz2-component.adoc      | 100 +++++++++++++++++++++
 examples/README.adoc                               |  20 +----
 .../camel/maven/packaging/PrepareExampleMojo.java  |  71 ++++++++-------
 3 files changed, 140 insertions(+), 51 deletions(-)


[camel] 02/03: Camel Maven tooling should skip empty example directories.

Posted by da...@apache.org.
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 7d21f91bc1585e53bdc08b30fba35a1c14178e97
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Jan 3 09:55:45 2019 +0100

    Camel Maven tooling should skip empty example directories.
---
 .../camel/maven/packaging/PrepareExampleMojo.java  | 71 +++++++++++-----------
 1 file changed, 37 insertions(+), 34 deletions(-)

diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareExampleMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareExampleMojo.java
index 6790f19..c289bec 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareExampleMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareExampleMojo.java
@@ -19,6 +19,7 @@ package org.apache.camel.maven.packaging;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
+import java.nio.charset.Charset;
 import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -100,41 +101,43 @@ public class PrepareExampleMojo extends AbstractMojo {
 
                 if (file.isDirectory() && file.getName().startsWith("camel-example")) {
                     File pom = new File(file, "pom.xml");
-                    String existing = FileUtils.readFileToString(pom);
-
-                    ExampleModel model = new ExampleModel();
-                    model.setFileName(file.getName());
-
-                    String name = StringHelper.between(existing, "<name>", "</name>");
-                    String title = StringHelper.between(existing, "<title>", "</title>");
-                    String description = StringHelper.between(existing, "<description>", "</description>");
-                    String category = StringHelper.between(existing, "<category>", "</category>");
-
-                    if (title != null) {
-                        model.setTitle(title);
-                    } else {
-                        // fallback and use file name as title
-                        model.setTitle(asTitle(file.getName()));
-                    }
-                    if (description != null) {
-                        model.setDescription(description);
-                    }
-                    if (category != null) {
-                        model.setCategory(category);
+                    if (pom.exists()) {
+                        String existing = FileUtils.readFileToString(pom, Charset.defaultCharset());
+
+                        ExampleModel model = new ExampleModel();
+                        model.setFileName(file.getName());
+
+                        String name = StringHelper.between(existing, "<name>", "</name>");
+                        String title = StringHelper.between(existing, "<title>", "</title>");
+                        String description = StringHelper.between(existing, "<description>", "</description>");
+                        String category = StringHelper.between(existing, "<category>", "</category>");
+
+                        if (title != null) {
+                            model.setTitle(title);
+                        } else {
+                            // fallback and use file name as title
+                            model.setTitle(asTitle(file.getName()));
+                        }
+                        if (description != null) {
+                            model.setDescription(description);
+                        }
+                        if (category != null) {
+                            model.setCategory(category);
+                        }
+                        if (name != null && name.contains("(deprecated)")) {
+                            model.setDeprecated("true");
+                        } else {
+                            model.setDeprecated("false");
+                        }
+
+                        // readme files is either readme.md or readme.adoc
+                        String[] readmes = new File(file, ".").list((folder, fileName) -> fileName.toLowerCase().startsWith("readme"));
+                        if (readmes != null && readmes.length == 1) {
+                            model.setReadmeFileName(readmes[0]);
+                        }
+
+                        models.add(model);
                     }
-                    if (name != null && name.contains("(deprecated)")) {
-                        model.setDeprecated("true");
-                    } else {
-                        model.setDeprecated("false");
-                    }
-
-                    // readme files is either readme.md or readme.adoc
-                    String[] readmes = new File(file, ".").list((folder, fileName) -> fileName.toLowerCase().startsWith("readme"));
-                    if (readmes != null && readmes.length == 1) {
-                        model.setReadmeFileName(readmes[0]);
-                    }
-
-                    models.add(model);
                 }
             }
 


[camel] 01/03: Regen

Posted by da...@apache.org.
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 74236f1f717030c770dc5b74c43f3c886f30b882
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Jan 3 09:32:08 2019 +0100

    Regen
---
 .../modules/ROOT/pages/quartz2-component.adoc      | 100 +++++++++++++++++++++
 1 file changed, 100 insertions(+)

diff --git a/docs/components/modules/ROOT/pages/quartz2-component.adoc b/docs/components/modules/ROOT/pages/quartz2-component.adoc
index 7c31a6d..943463d 100644
--- a/docs/components/modules/ROOT/pages/quartz2-component.adoc
+++ b/docs/components/modules/ROOT/pages/quartz2-component.adoc
@@ -287,6 +287,106 @@ quartz2://groupName/timerName?cron=0+0/5+12-18+?+*+MON-FRI&trigger.timeZone=Euro
 
 The timeZone value is the values accepted by `java.util.TimeZone`.
 
+=== Configuring misfire instructions
+
+The quartz scheduler can be configured with a misfire instruction
+to handle misfire situations for the trigger.
+The concrete trigger type that you are using will have defined a set of additional `MISFIRE_INSTRUCTION_XXX`
+constants that may be set as this property's value.
+
+For example to configure the simple trigger to use misfire instruction 4:
+
+----
+quartz2://myGroup/myTimerName?trigger.repeatInterval=2000&trigger.misfireInstruction=4
+----
+
+And likewise you can configure the cron trigger with one of its misfire instructions as well:
+----
+quartz2://myGroup/myTimerName?cron=0/2+*+*+*+*+?trigger.misfireInstruction=2
+----
+
+The simple and cron triggers has the following misfire instructions representative:
+
+==== SimpleTrigger.MISFIRE_INSTRUCTION_FIRE_NOW = 1 (default)
+
+Instructs the Scheduler that upon a mis-fire
+situation, the SimpleTrigger wants to be fired now by Scheduler.
+
+This instruction should typically only be used for
+'one-shot' (non-repeating) Triggers. If it is used on a trigger with a
+repeat count > 0 then it is equivalent to the instruction MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_REMAINING_REPEAT_COUNT.
+
+==== SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT = 2
+
+Instructs the Scheduler that upon a mis-fire
+situation, the SimpleTrigger wants to be
+re-scheduled to 'now' (even if the associated Calendar excludes 'now')
+with the repeat count left as-is.  This does obey the
+Trigger end-time however, so if 'now' is after the
+end-time the Trigger will not fire again.
+
+Use of this instruction causes the trigger to 'forget'
+the start-time and repeat-count that it was originally setup with (this
+is only an issue if you for some reason wanted to be able to tell what
+the original values were at some later time).
+
+==== SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_REMAINING_REPEAT_COUNT = 3
+
+Instructs the Scheduler that upon a mis-fire
+situation, the SimpleTrigger wants to be
+re-scheduled to 'now' (even if the associated Calendar
+excludes 'now') with the repeat count set to what it would be, if it had
+not missed any firings.  This does obey the Trigger end-time
+however, so if 'now' is after the end-time the Trigger will
+not fire again.
+
+Use of this instruction causes the trigger to 'forget'
+the start-time and repeat-count that it was originally setup with.
+Instead, the repeat count on the trigger will be changed to whatever
+the remaining repeat count is (this is only an issue if you for some
+reason wanted to be able to tell what the original values were at some
+later time).
+
+This instruction could cause the Trigger
+to go to the 'COMPLETE' state after firing 'now', if all the
+repeat-fire-times where missed.
+
+==== SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_REMAINING_COUNT = 4
+
+Instructs the Scheduler that upon a mis-fire
+situation, the SimpleTrigger wants to be
+re-scheduled to the next scheduled time after 'now' - taking into
+account any associated Calendar and with the
+repeat count set to what it would be, if it had not missed any firings.
+
+WARNING: This instruction could cause the Trigger
+to go directly to the 'COMPLETE' state if all fire-times where missed.
+
+==== SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNT = 5
+
+Instructs the Scheduler that upon a mis-fire
+situation, the SimpleTrigger wants to be
+re-scheduled to the next scheduled time after 'now' - taking into
+account any associated Calendar, and with the repeat count left unchanged.
+
+WARNING: This instruction could cause the Trigger
+to go directly to the 'COMPLETE' state if the end-time of the trigger
+has arrived.
+
+==== CronTrigger.MISFIRE_INSTRUCTION_FIRE_ONCE_NOW = 1 (default)
+
+Instructs the Scheduler that upon a mis-fire
+situation, the CronTrigger wants to be fired now by Scheduler.
+
+==== CronTrigger.MISFIRE_INSTRUCTION_DO_NOTHING = 2
+
+Instructs the Scheduler that upon a mis-fire
+situation, the CronTrigger wants to have it's
+next-fire-time updated to the next time in the schedule after the
+current time (taking into account any associated Calendar
+but it does not want to be fired now.
+
+
 === Using QuartzScheduledPollConsumerScheduler
 
 The <<quartz2-component,Quartz2>> component provides a


[camel] 03/03: Regen

Posted by da...@apache.org.
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 85a7a0813d468e57124fa95d8e5f15cfda477559
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Jan 3 09:55:54 2019 +0100

    Regen
---
 examples/README.adoc | 20 +++-----------------
 1 file changed, 3 insertions(+), 17 deletions(-)

diff --git a/examples/README.adoc b/examples/README.adoc
index 8e7c48a..48757a3 100644
--- a/examples/README.adoc
+++ b/examples/README.adoc
@@ -11,7 +11,7 @@ View the individual example READMEs for details.
 ### Examples
 
 // examples: START
-Number of Examples: 110 (8 deprecated)
+Number of Examples: 102 (2 deprecated)
 
 [width="100%",cols="4,2,4",options="header"]
 |===
@@ -40,8 +40,6 @@ Number of Examples: 110 (8 deprecated)
 
 | link:camel-example-servlet-tomcat/README.md[Servlet Tomcat] (camel-example-servlet-tomcat) | Beginner | An example using Camel Servlet with Apache Tomcat
 
-| link:camel-example-servlet-tomcat-no-spring/README.md[Servlet Tomcat without Spring] (camel-example-servlet-tomcat-no-spring) | Beginner | An example using Camel Servlet with Apache Tomcat without using Spring
-
 | link:camel-example-spring/README.md[Spring] (camel-example-spring) | Beginner | An example showing how to work with Camel and Spring
 
 | link:camel-example-spring-boot/readme.adoc[Spring Boot] (camel-example-spring-boot) | Beginner | An example showing how to work with Camel and Spring Boot
@@ -127,8 +125,6 @@ Number of Examples: 110 (8 deprecated)
 
 | link:camel-example-validator-spring-boot/readme.adoc[Validator Spring Boot] (camel-example-validator-spring-boot) | Input/Output Type Contract | An example showing how to work with declarative validation and Spring Boot
 
-| link:camel-example-bam/README.md[BAM (deprecated)] (camel-example-bam) | Management and Monitoring | *deprecated* An example showing how to use Camel as a Business Activity Monitoring tool
-
 | link:camel-example-cdi-metrics/README.md[CDI Metrics] (camel-example-cdi-metrics) | Management and Monitoring | Dropwizard Metrics CDI example
 
 | link:camel-example-jmx/README.md[JMX] (camel-example-jmx) | Management and Monitoring | An example showing how to work with Camel and JMX
@@ -143,8 +139,6 @@ Number of Examples: 110 (8 deprecated)
 
 | link:camel-example-spring-boot-supervising-route-controller/readme.adoc[Spring Boot Supervising Route Controller] (camel-example-spring-boot-supervising-route-controller) | Management and Monitoring | An example showing how to work with Camel's Supervising Route Controller and Spring Boot
 
-| link:camel-example-tracer/README.md[Tracer] (camel-example-tracer) | Management and Monitoring | *deprecated* An example showing how to persist Camel trace event messages using JPA
-
 | link:camel-example-zipkin/README.md[Zipkin] (camel-example-zipkin) | Management and Monitoring | An example showing how to trace incoming and outgoing messages from Camel with Zipkin
 
 | link:camel-example-activemq-tomcat/README.md[ActiveMQ Tomcat] (camel-example-activemq-tomcat) | Messaging | An example using ActiveMQ Broker and Camel with Apache Tomcat
@@ -157,8 +151,6 @@ Number of Examples: 110 (8 deprecated)
 
 | link:camel-example-google-pubsub/README.adoc[Google Pubsub] (camel-example-google-pubsub) | Messaging | An example for Google Pubsub
 
-| link:camel-example-guice-jms/README.md[Guice JMS] (camel-example-guice-jms) | Messaging | *deprecated* An example showing how to work with Camel, Guice and JMS
-
 | link:camel-example-jms-file/README.md[JMS-File] (camel-example-jms-file) | Messaging | An example that persists messages from JMS to files
 
 | link:camel-example-kafka/README.adoc[Kafka] (camel-example-kafka) | Messaging | An example for Kafka
@@ -171,8 +163,6 @@ Number of Examples: 110 (8 deprecated)
 
 | link:camel-example-spring-jms/README.md[Spring JMS] (camel-example-spring-jms) | Messaging | An example using Spring XML to talk to the JMS server from different kind of client techniques
 
-| link:camel-example-cdi-osgi/README.md[CDI OSGi] (camel-example-cdi-osgi) | OSGi | *deprecated* PAX CDI example
-
 | link:camel-example-cxf-blueprint/README.md[CXF Blueprint] (camel-example-cxf-blueprint) | OSGi | An example which use a CXF consumer and the OSGI HTTP Service
 
 | link:camel-example-ehcache-blueprint/README.md[Ehcache Blueprint] (camel-example-ehcache-blueprint) | OSGi | An example using Ehcache with OSGi Blueprint
@@ -194,14 +184,8 @@ Number of Examples: 110 (8 deprecated)
 
 | link:camel-example-swagger-osgi/README.md[Swagger OSGi] (camel-example-swagger-osgi) | OSGi | An example using REST DSL in XML and Swagger API
 
-| link:camel-example-groovy/ReadMe.md[Groovy] (camel-example-groovy) | Other Languages | *deprecated* A Camel route using Groovy DSL
-
 | link:camel-example-kotlin/ReadMe.md[Kotlin] (camel-example-kotlin) | Other Languages | A Camel route using Kotlin
 
-| link:camel-example-scala/ReadMe.md[Scala] (camel-example-scala) | Other Languages | *deprecated* A Camel route using Scala
-
-| link:camel-example-java8-rx/readme.adoc[Java8 RX] (camel-example-java8-rx) | Reactive | An example for showing Camel RX for Java 8
-
 | link:camel-example-reactive-streams/readme.adoc[Reactive Streams] (camel-example-reactive-streams) | Reactive | An example that shows how Camel can exchange data using reactive streams with Spring Boot reactor
 
 | link:camel-example-cdi-rest-servlet/README.md[CDI Rest] (camel-example-cdi-rest-servlet) | Rest | REST DSL / Servlet with CDI example
@@ -244,6 +228,8 @@ Number of Examples: 110 (8 deprecated)
 
 | link:camel-example-cxf-tomcat/README.md[CXF Tomcat] (camel-example-cxf-tomcat) | WebService | An example using Camel CXF (code first) with Apache Tomcat
 
+| link:camel-example-cxf-ws-security-signature/README.md[CXF using WS-Security Signature] (camel-example-cxf-ws-security-signature) | WebService | CXF example using WS-Security Signature Action
+
 | link:camel-example-spring-ws/README.md[Spring WebService] (camel-example-spring-ws) | WebService | An example showing how to work with Camel and Spring Web Services
 |===
 // examples: END