camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Woonsan Ko (JIRA)" <>
Subject [jira] [Commented] (CAMEL-5155) Support JCR Component as Consumer
Date Wed, 25 Apr 2012 17:54:18 GMT


Woonsan Ko commented on CAMEL-5155:

Hi Bilgin,

My actual use case is actually very simple. I've developed a data import tool [1] for a JCR
repository product. Currently, I configure file2 component url to start the import tool at
runtime in order to import xml files to jcr nodes. So, the file2 consumer is just a signal
for the import tool execution. Now, I want to use jcr node(s) as signals instead of files,
which helps me consolidate the management user interface into CMS UI and avoid thinking of
clustering issues. My local workspace already contains jcr consumer configurations; I will
commit that upon a new camel release with the feature.

Regarding the use case of producer reading events, I agree that users probably want to do
more such as retrieving nodes from the events and doing some manipulation actions. 
But, I guess they need to weave some custom components with the consumer in most cases. For
example, one of typical scenarios is that they might want to create summary data nodes when
a news article document node is added/modified/deleted. Then a custom component, in the pipeline
with the consumer, creates a jcr session from the repository, reads event infos, queries data
from the repository and creates a summary data node.
Maybe we'll find a good use case for the idea later. e.g., simple logging node creation on
news document events. Anyway, more generic options support with the producer might be needed.
e.g., how to change primary node type for a new created node, how to change node creation
paths dynamically, etc.

Regards, Woonsan

> Support JCR Component as Consumer
> ---------------------------------
>                 Key: CAMEL-5155
>                 URL:
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-jcr
>    Affects Versions: 2.9.1
>            Reporter: Woonsan Ko
>            Assignee: Bilgin Ibryam
>             Fix For: 2.10.0
>         Attachments: jcr-consumer-patch-2.txt, jcr-consumer-patch.txt
> I tried to use jcr component as consumer, expecting jcr observation event listener like
behavior, but I realized that it's not supported yet. The current jcr component supports producer
only. So, I'm considering to implement JcrConsumer an contribute a patch. 
> My idea is as follows:
> i) the uri format is the same. e.g. 'jcr://user:password@repository/absolute/path/from/node';
the node path is used for javax.jcr.observation.ObservationManager#addEventListener(..., absPath,
> ii) additionally, we need parameters for eventTypes, isDeep, uuid[], nodeTypeName[],
noLocal parameters (See #addEventListener() for detail).
>     For example, we may probably use somethings like 'jcr://user:password@repository/absolute/path/from/node?nodeTypeName=demo:news&eventTypes=3&isDeep=true.
> iii) JcrConsumer registers JCR observation event listener from the specified uri information.
> iv) When events notified, I think it can simply return a list of javax.jcr.observation.Event
objects in IN message.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message