Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.
JCR ComponentThe Maven users will need to add the following dependency to their <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-jcr</artifactId> <version>x.x.x</version> <!-- use the same version as your Camel core version --> </dependency> URI formatjcr://user:password@repository/path/to/node Consumer added From Camel 2.10 onwards you can use consumer as an EventListener in JCR or a producer to read a node by identifier. UsageThe Producer
When a message is sent to a JCR producer endpoint:
Please note that the JCR Producer used message properties instead of message headers in Camel versions earlier than 2.12.3. See https://issues.apache.org/jira/browse/CAMEL-7067 for more details.
ConsumerThe consumer will connect to JCR periodically and return a List<javax.jcr.observation.Event> in the message body.
ExampleThe snippet below creates a node named from("direct:a").setHeader(JcrConstants.JCR_NODE_NAME, constant("node")) .setHeader("my.contents.property", body()) .to("jcr://user:pass@repository/home/test");
The following code will register an EventListener under the path import-application/inbox for Event.NODE_ADDED and Event.NODE_REMOVED events (event types 1 and 2, both masked as 3) and listening deep for all the children. <route> <from uri="jcr://user:pass@repository/import-application/inbox?eventTypes=3&deep=true" /> <to uri="direct:execute-import-application" /> </route> |