Re: interceptFrom ref

2011-04-05 Thread Olivier.Roger
You can definde EndPoint Object and referer to them


...


...

--
View this message in context: 
http://camel.465427.n5.nabble.com/interceptFrom-ref-tp4283865p4283901.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Hookpoint] Extensible routes ?

2011-02-21 Thread Olivier.Roger

Hello JacobS,

The solution we put in place is based on the previous comments.

The idea was to split the route into a least two OSGI bundles.

The first bundle gather all endpoint definition to external systems, like
ftp, web service, jms, ... anything really. All the incomming messages
received on those endpoint are transported to the NMR component.
The contrary is also true, all outgoing messages are sent to those endpoint
with a route that listen to an NMR endpoint.

This first bundle contains all the configuration to a specific environment,
we have one for each application server we use for instance.

On top of that one or more bundles can be plugged in and reuse those
endpoint with pure camel. To be able to change the hookpoint, we use the
config service which allows to change the route endpoint at runtime.

I hope this helps,

Olivier
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Hookpoint-Extensible-routes-tp3201249p3394096.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [OSGi] JmsComponent config for WebSphere Queue ?

2011-02-17 Thread Olivier.Roger

I realize I might not have been clear in my first post.

The blog entry is connecting the route to a WebSphere MQ endpoint by
creating a Connection Factory using spring.
I would like to connect the Application Server service integration bus (SIB)
with a Connection Factory retrieved using JNDI, that is why I used the thin
JMS client jar from application server runtime.


-- 
View this message in context: 
http://camel.465427.n5.nabble.com/OSGi-JmsComponent-config-for-WebSphere-Queue-tp3380989p3389032.html
Sent from the Camel - Users mailing list archive at Nabble.com.


[OSGi] JmsComponent config for WebSphere Queue ?

2011-02-11 Thread Olivier.Roger

Hello Camel !

I am currently trying to configure my route, deployed in Fuse 4.3, to poll
messages from a WebSphere MQ Queue.

The issue is more related to OSGI than Camel but maybe someone experienced
the same issue before, so I take my chance to post it here...

The idea is to create a feature that could load the WebSphere 7 thin jms
client bundles and the route which transport messages from WebSphere MQ
queue to an ActiveMQ queue.

The client jars are the following (from the /runtime directory):

* com.ibm.ws.ejb.thinclient_7.0.0.jar
* com.ibm.ws.orb_7.0.0.jar
* com.ibm.ws.sib.client.thin.jms_7.0.0.jar

Here is the JmsComponent configuration:

bean id=wasmq class=org.apache.camel.component.jms.JmsComponent
property name=configuration ref=wasJmsConfiguration /
property name=destinationResolver 
ref=wasDestinationResolver /
/bean

bean id=wasJmsConfiguration
class=org.apache.camel.component.jms.JmsConfiguration
property name=connectionFactory ref=wasConnectionFactory /
property name=concurrentConsumers value=1 /
/bean

bean id=wasJndiTemplate 
class=org.springframework.jndi.JndiTemplate
property name=environment
props
prop
key=java.naming.factory.initialcom.ibm.websphere.naming.WsnInitialContextFactory/prop
prop 
key=java.naming.provider.url${was.jms.broker.url}/prop
/props
/property
/bean

bean id=wasConnectionFactory
class=org.springframework.jndi.JndiObjectFactoryBean
property name=jndiTemplate ref=wasJndiTemplate /
property name=jndiName value=${messaging.cf.jndi.name} /
/bean

The bundle required some tweaking to have the correct import-packages (might
need more I am afraid):

Import-Package

org.apache.activemq.camel.component,

org.apache.camel.component.jms,

org.apache.servicemix.camel.nmr,

org.apache.servicemix.nmr.api,

org.springframework.jndi,
org.springframework.jms,

org.springframework.jms.support,

org.springframework.jms.support.destination,

org.springframework.beans,

org.springframework.beans.factory,
org.apache.activemq,
   
com.ibm.websphere.naming,
com.ibm.CORBA.iiop,
   
com.ibm.ws.sib.api.jmsra.impl,
com.ibm.ejs.j2c,
javax.naming,
javax.naming.spi,
javax.net,
*
/Import-Package

Here is the stack I get at Runtime (
http://camel.465427.n5.nabble.com/file/n3380989/WebSphere.camel.stack.txt
full stack enclosed )

Caused by: java.lang.IllegalStateException: Cannot convert value of type
[com.ibm.ws.sib.api.jms.impl.JmsConnectionFactoryImpl] to required type
[javax.jms.ConnectionFactory] for property 'connectionFactory': no matching
editors or conversion strategy found

I did some googling and according to 
http://forum.springframework.org/showthread.php?t=34920 This post , the
cause might be related to the JMS api being present at multiple level in the
classpath...

I am far from being an OSGi expert and I have some difficulties to see how I
could solve this issue.
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/OSGi-JmsComponent-config-for-WebSphere-Queue-tp3380989p3380989.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [OSGi] JmsComponent config for WebSphere Queue ?

2011-02-11 Thread Olivier.Roger

In Fact, IBM provides the client jar as OSGI bundles so I juste installed
them (osgi:install -s file:...).

However, I do not use the same bundles as in the blog entry as it indicates
that the jars used are coming from the runtime JARs provided as part of a MQ
installation. I could not find them.

Instead, I use the thin JMS client as indicated in the documentation
(http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.express.iseries.doc/info/iseriesexp/ae/rjj_jmsthcli_migrate602.html)
I already used those jar with success in non-OSGi tools (Hermes, tomcat).
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/OSGi-JmsComponent-config-for-WebSphere-Queue-tp3380989p3381510.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Aggregator] Persistence ?

2010-12-23 Thread Olivier.Roger

The code is now cleaned and migrated to 2.6 (was 2.4) for donation.
A patch will be provided in the first days of 2011.

Olivier
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-Persistence-tp2800301p3316667.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Serialization] CamelAuthentication is null

2010-12-10 Thread Olivier.Roger

https://issues.apache.org/jira/browse/SMX4NMR-239
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Serialization-CamelAuthentication-is-null-tp3290948p3300369.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Serialization] CamelAuthentication is null

2010-12-06 Thread Olivier.Roger

I also remarked that using the NMR adds another entry in the exchange header
: NMRMessage which holds a copy of the message before entering the NMR.

I was wondering what is it used for ? 

-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Serialization-CamelAuthentication-is-null-tp3290948p3293713.html
Sent from the Camel - Users mailing list archive at Nabble.com.


[Serialization] CamelAuthentication is null

2010-12-03 Thread Olivier.Roger

Hello Camel,

I get this error in the log when I try to serialize my Exchanges with the
DefaultExchangeHandler:

DefaultExchangeHolder| camel.impl.DefaultExchangeHolder  210 |
69 - org.apache.camel.camel-core - 2.4.0.fuse-00-00 | in headers containing
object: null with key: CamelAuthentication cannot be serialized, it will be
excluded by the holder.

Is this normal that CamelAuthentication is present but null in the exchange
headers ? 
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Serialization-CamelAuthentication-is-null-tp3290948p3290948.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Serialization] CamelAuthentication is null

2010-12-03 Thread Olivier.Roger

Yes this is a test case. 
I did not set any authentication, that is why I am surprised there is a
CamelAuthentication header present in the exchange.

I will trace the exchanges to locate more precisely where the header appears
and get back to you.

Thanks for your help
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Serialization-CamelAuthentication-is-null-tp3290948p3290979.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Aggregator] Persistence ?

2010-11-29 Thread Olivier.Roger

Claus,

I don't exactly see how to reuse the code already present in Camel.

I'm not sure, but from what I saw the HawtDB aggregator uses the transaction
manager from HawtDB. In our use cases, using an XA Transaction Manager
option. 

However, I was thinking to use Spring TransactionTemplate with an injected
TransactionManager instead of annotation. I think this would solve problem
concerning transactions.

Concerning the code donation, I have already adapted all the test for an H2
database. Still waiting for an answer ;)
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-Persistence-tp2800301p3284785.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Unit Testing Route

2010-11-29 Thread Olivier.Roger

Hello Camel,

I am using Camel for some time now and I was wondering how I could perform
unit test using the same camel context used in production but still being
able to test intermediate messages of the routes.

For instance, with the simple routes A -- B and B -- C.
At the moment I use 4 properties A,B,B' and C. In prod, B == B' and in test
A and C are direct: endpoint and B' and D are mock endpoint.

This allows to sent easily message using the template object and validate
the result by making mock assertions.

I wanted to know if there was a better solution than duplicating the
endpoint URI (B and B' here) for intermediate endpoints. 

Thanks in advance for your input!
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Unit-Testing-Route-tp3284803p3284803.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Aggregator] Persistence ?

2010-11-22 Thread Olivier.Roger

That would be great. In fact I already asked my employer for approval. I
should have an answer in the coming days.

I had another question about the transactional aspect.
At the moment I added annotation in the JdbcAggregationRepository class
which implements RecoverableAggregationRepository.

I am quite new to Spring Transaction and I think I used an old way to enable
Spring to create a proxy with transactional behavior. Here is the code I add
in the application Context:

!-- Transaction AOP with Annotation --
bean
class=org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator/

bean
class=org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor
  property name=transactionInterceptor ref=txInterceptor/
/bean

bean id=txInterceptor
class=org.springframework.transaction.interceptor.TransactionInterceptor
  property name=transactionManager ref=PlatformTransactionManager/
  property name=transactionAttributeSource
bean
class=org.springframework.transaction.annotation.AnnotationTransactionAttributeSource/
  /property
/bean

This means, that the aggregator repository will only be transactional this
boilerplate code is added.

In our uses case, the aggregator should always be transactional. Therefore,
I would like to be able to load that code in a spring context defined in the
project, like META-INF/camel/contex.xml. The user would then only have to
provide the transactionManager.

Is that possible ? If not is there a way to archive the same result in
another way ?

Thanks for your help on this

-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-Persistence-tp2800301p3275451.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Aggregator] Persistence ?

2010-11-22 Thread Olivier.Roger

I am sorry, I am not sure to understand how transacted works on the
aggregator component.

Does adding .transacted() to the aggregator include the repository
operations inside transactions?
Then, is this necessary when the aggregator already is in a transacted route
? Or does it has to be specified so that the operation could join the
current transaction ?




-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-Persistence-tp2800301p3275510.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Aggregator] Persistence ?

2010-11-17 Thread Olivier.Roger

Well, I modified the HawtDB codec to remove all hawtbuf import and simply
(un)marshall the exchange to/from byte[]. Those byte arrays are kept in Blob
field in the database using the default LobHandler.

Key are stored directly as String and therefore, do not need to be
converted.
With theses modifications, the repository appears to be functional. At least
my few unit test still pass.

I also used Spring to set all method as Transactional.
Therefore I would like to add unit tests to validate each possible use case
(message lost at any step of the process, SQL exception, ...)

I hoped I could start by adapting the tests done for
HawtDBAggregationRepository but I could not find any tests in the
distributed Jar. Is there somewhere I could find sample tests for a
Persistent Aggregation Repository?
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-Persistence-tp2800301p3268799.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Aggregator] Persistence ?

2010-11-10 Thread Olivier.Roger

Hello,

I made a wrong assumption about the DefaultExchange.
Using the DefaultExchangeHolder makes it really easy.

I made a first test. It's still a bit messy but it appears to gives the
expected results/behavior.
About that, I saw that the HawtDB codec marshall the key into a Buffer.
I did not do that since all the keys are always String, and therefore stored
in a Varchar field in the database.

Did I miss something here or is it really HawtDB related ? 
I suppose there is a reason why the index are parametrized with
Buffer,Buffer and not String,Buffer.


-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-Persistence-tp2800301p3258350.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Aggregator] Persistence ?

2010-11-09 Thread Olivier.Roger

Hi Claus,

That seems to be what I needed.

I still have a few questions:

1 - In what type of database field should I persist the Exchange objects? 
I was thinking to save it as a Blob, would that be a good fit ?

2 - About the Service lifecycle, I am not sure what the aggregator
repository would do on start and stop.
Do you see a reason why I should use it ?
Maybe verify the required table are created, if not create them ?

Thanks for your help!

Olivier
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-Persistence-tp2800301p3256717.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Aggregator] Persistence ?

2010-11-09 Thread Olivier.Roger

You're right, the tables should not be created by the component in production
environment.

About the Serialization in a Blob field, I saw the HawtDB component uses a
codec object from the HAwtbuf Library to perform the convertion between
Exchange -- Buffer.
I supposed it was a restriction impose by HawtDB, but in my first tests with
a H2 in-memory database I got a NotSerializableException 
http://camel.465427.n5.nabble.com/file/n3256967/NotSerializableException.stack.txt
(stack) . 

I suppose DefaultExchange is serializable, so the issue probably comes from
the Message body, am I right ? Or do I also need to implement a codec to
perform the conversion ?
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-Persistence-tp2800301p3256967.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Properties in Java DSL

2010-11-08 Thread Olivier.Roger

Thanks Claus, 

I got this working using
getContext().resolvePropertyPlaceholders({{key}}));

However, I could not retrieve the Propeties Object from the context.
When I use this :

MapString, String properties = getContext().getProperties();
System.out.println(size= + properties.keySet().size());

The output is always size=0.

Is there a reason for this ?
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Properties-in-Java-DSL-tp3242156p3254659.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Properties in Java DSL

2010-11-08 Thread Olivier.Roger

I see,

It explains the results I observed then.
Thanks for the explanation.
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Properties-in-Java-DSL-tp3242156p3254753.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Exception] Log the stack trace in Spring DSL ?

2010-10-29 Thread Olivier.Roger

No, It does not. The toString method prints

Exception.class : message

I was hoping a simple expression could be used here like
${exception.message}, ${exception.stackTrace} for instance.
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Exception-Log-the-stack-trace-in-Spring-DSL-tp3241700p3241764.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Exception] Log the stack trace in Spring DSL ?

2010-10-29 Thread Olivier.Roger

I'll do that until Camel 2.6 is released.

Thanks for the explanations ;)
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Exception-Log-the-stack-trace-in-Spring-DSL-tp3241700p3241774.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Throttler in a Choice ?

2010-10-29 Thread Olivier.Roger

Hello Camel,

I am using Camel 2.4 and writting my first Java DSL route
I would like to translate the following route from Spring DSL:

choice
when
simple${header.JMSPriority} lt; 5/simple
throttle maximumRequestsPerPeriod=50
timePeriodMillis=6
to ref=nsResolved /
/throttle
/when
otherwise
to ref=nsResolved /
/otherwise
/choice

Here is what I did :

@Override
public void configure() throws Exception {
from(direct:throttler.in)
.choice()
.when(simple(header.JMSPriority = 5))
.throttle(50).timePeriodMillis(6)
.to(direct:nsResolved)
//.end()
.otherwise()
.to(direct:nsResolved)
.end();
}

In both case I can use otherwise() because I dont have a ChoiceDefinition
object.
Like that I get a ThrottlerDefinition, which implements block, so I should
close is with end() I suppose. 
In that case I get a ProcessDefinition not a ChoiceDefinition.

Am I doing something wrong here ?

Thanks for your help,

Olivier
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Throttler-in-a-Choice-tp3242130p3242130.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Properties in Java DSL

2010-10-29 Thread Olivier.Roger

Hello Camel !

Since using properties in non-string attribute in Spring DSL is not possible
(see CAMEL-3171).
I would like to have a example how to do it in Java DSL.

For example I use a Throttler and I would like to be able to configure the #
msg per period and the period parameters with properties (in fact with SMX
config service).

Thanks in advance,

Olivier

-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Properties-in-Java-DSL-tp3242156p3242156.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Properties in Java DSL

2010-10-29 Thread Olivier.Roger

That's exactly what I needed.

Where can I find how to load the Properties from SMX config service ?
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Properties-in-Java-DSL-tp3242156p3242178.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Properties in Java DSL

2010-10-29 Thread Olivier.Roger

I found 2 ways to do it, I do not know which one is best.

First I configure a propertiesPlaceholder in the CamelContext
osgix:cm-properties id=properties persistent-id=myRoute /

In both case I use the CamelContext using the getContext() method.
After that I can either retrieve the the Property as a Map :
MapString, String properties = getContext().getProperties();

... Or use it to resolve the properties directly
getContext().resolvePropertyPlaceholders(null)

I feel more confortable to retrieve the object and use it but I was
wondering is there was any drawback/better alternative to that method ?
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Properties-in-Java-DSL-tp3242156p3242204.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Properties in Java DSL

2010-10-29 Thread Olivier.Roger

It appears that in both cases the Properties Object does not contains any
entry.
I use this to load it in the CamelContext.

util:properties id=crg-properties
location=classpath:properties/endpoints.properties /
ctx:property-placeholder properties-ref=crg-properties /

camelContext id=camel xmlns=http://camel.apache.org/schema/spring;
trace=true
propertyPlaceholder id=properties
location=classpath:properties/endpoints.properties /

Am I doing something wrong here ?
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Properties-in-Java-DSL-tp3242156p3242285.html
Sent from the Camel - Users mailing list archive at Nabble.com.


[Camel-exec] dynamic parameters in Spring DSL

2010-10-21 Thread Olivier.Roger

Hello,

I am using Camel version 2.4 for the new Camel-exec component.

I would like to ask your opinion on this potential improvement for the usage
of this component with Spring DSL. To use dynamic parameters the
CamelExecCommandArgs header has to be set with a Java List object.

This of course requires Java code to create (simple of course, but still).
Would it not more user friendly if it a String could be given instead/also ?
In that case a separator would be necessary but I guess a blank space could
be the default value.

This way instead of doing 

setHeader headerName=execArgs
constantarg1,arg2,arg3/constant
/setHeader

setHeader headerName=CamelExecCommandArgs
method bean=helper method=parseArgs/
/setHeader

bean id=helper class=CamelExecHelper
 property name=argsHeader value=execArgs /
 property name=argsSeparator value=, / !-- optional --
/bean

This could be writtent 

!-- optional --
setHeader headerName=CamelExecCommandArgs
constant,/constant
/setHeader

setHeader headerName=CamelExecCommandArgs
simplearg1,arg2,arg3/simple !-- of course simple offers
many more advance possibilities --
/setHeader

The bean code is very simple indeed but is required 

public ListString parseArgs(@Header(field) String argsHeader){
ListString args = new ArrayListString();

args.addAll(Arrays.asList(argsHeader.split(argsSeparator)));

return args;
}

But maybe I am not seeing an easier way already applicable with the current
version. In that case, please tell me.
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-exec-dynamic-parameters-in-Spring-DSL-tp3230040p3230040.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Camel-exec] dynamic parameters in Spring DSL

2010-10-21 Thread Olivier.Roger

Sure, I just created  https://issues.apache.org/activemq/browse/CAMEL-3263
CAMEL-3263 
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-exec-dynamic-parameters-in-Spring-DSL-tp3230040p3230061.html
Sent from the Camel - Users mailing list archive at Nabble.com.


[ThreadPool] Howto ?

2010-10-19 Thread Olivier.Roger

Hello Camel,

I am trying to use a Thread Pool inside my route to call an external process
(with camel-exec).
to avoid overloading the server with request I wanted to created a fixed
size thread pool to handle those calls.

I expected multiple messages (up to 25 (maxpoolsize)) to be handled
simultaneously. 
But I must have misunderstood something because It appears only 1 requested
is handled at the time

Here is my thread pool definition

threadPool id=myPool threadName=test
poolSize=15 maxPoolSize=25 
maxQueueSize=250/

I use it in three different locations in the route like this 

threads executorServiceRef=myPool
to uri=exec:Batch1.bat / !-- same for 2 and 3 --
/threads


-- 
View this message in context: 
http://camel.465427.n5.nabble.com/ThreadPool-Howto-tp3218747p3218747.html
Sent from the Camel - Users mailing list archive at Nabble.com.


[camel-exec] feature ?

2010-10-18 Thread Olivier.Roger

Hello Camel,

I am using Camel 2.4 with has the camel-exec component. I wanted to deploy
it in servicemix but I cannot find a camel-exec feature.

It is possible to explain how I could create such a feature ?
I am using the Fuse distribution of servicemix.

Thanks in advance,

Olivier
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/camel-exec-feature-tp3217295p3217295.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [camel-exec] feature ?

2010-10-18 Thread Olivier.Roger

That's exactly what I needed,

Thanks you both ;)
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/camel-exec-feature-tp3217295p3217457.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Spring DSL: Choice does not work

2010-10-11 Thread Olivier.Roger

I'm not sure it will solve your issue but try to remove the ( ) from the
expression.

Documentation is available  http://camel.apache.org/simple.html here .
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Spring-DSL-Choice-does-not-work-tp3207085p3207127.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Hookpoint] Extensible routes ?

2010-10-08 Thread Olivier.Roger


jstrachan wrote:
 
 On 6 October 2010 13:02, Olivier.Roger olivier.ro...@bsb.com wrote:
 Hello Camel!

 I was wondering how routes could be extensible.

 I thougth I could use the following idea to do it but I appears to be
 otherwise:

 The route I created is pretty simple: It picks up message from A,
 transform
 it then send it to B.
 I would like to make it extensible so that another route could be hooked
 into it.

 My idea was to divide the route into 2 routes:

 1) A - transform - properties:hook-in
 2) properties:hook-out - B

 By default hook-in and hook-out would use the same direct:hook endpoint
 or
 anything like that.

 If another route transporting messages from C to D needs to be added, the
 properties can be changed to
 - hook-in=C
 - hook-out=D
 That way the route would be complete.
 
 
 This sounds a bit like using a class with fields for the endpoints?
 
 class MyRoute extends RouteBuilder {
   public String hookIn = direct://in;
   public String hookOut = direct://out;
 
   protected void configure() {
 from(activemq:A).to(hookIn);
 from(hookOut).to(activemq:B);
  }
 
 then you just configure the MyRoute instance with specific values of
 hookIn/hookOut?
 
 

I was thinking I could use a properties file and using the Config Admin
service from SMX I could change the values at runtime.


jstrachan wrote:
 
 Another option is to introduce a special kind of endpoint which
 basically is just a proxy which resolves itself at runtime using some
 mechanism; which you can then modify at runtime or use some registry
 or Map to decide which names map to what physical endpoints. Kinda
 like the Control Bus pattern
 
 http://www.enterpriseintegrationpatterns.com/ControlBus.html
 
 
 

I just read the page from the book again and it seems to be a better way
indeed, even if it might a bit overkill in this situation.
Is there already a component in Camel that could provides such
functionalities ? I haven't seen anything like that since now.


jstrachan wrote:
 
 
 However, since I deploy the route as separate osgi bundles (one with
 A-B,
 another with C-D), I get the following error

 CamelExchangeException: No consumers available on endpoint:
 Endpoint[direct://hook-in]

 Another complication is that I would like the route to stay transactional
 and only have A and B persisted on my JMS broker.

 Is that possible ?
 
 You do realise that having a direct: or vm: endpoint in between two
 JMS endpoints basically breaks all reliability you have; your route
 may be transactional but if the JVM processing the route goes down you
 stand to lose possibly many messages which were sat in memory on the
 direct/vm buffer.
 
 Why do you explicitly not want to add a persistence step? Might it be
 better to miss out the C and D steps, and just do one transaction from
 A to B (with whatever other things you want) then you get reliability,
 transactions and persistence?
 
 
 

The idea was to provide default routes that could be extended by other teams
for specific (client) needs.
Those routes would just have to start from hook-in and end at hook-out which
is really easy. And configuration is quite simple to start using that new
route. (simply match default.hook-in to specific.hook-in and same for out).
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Hookpoint-Extensible-routes-tp3201249p3204772.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Hookpoint] Extensible routes ?

2010-10-07 Thread Olivier.Roger

Indeed, vm: is asynchronous.

I am using SMX, I'll use the NMR then :)
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Hookpoint-Extensible-routes-tp3201249p3202709.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Hookpoint] Extensible routes ?

2010-10-07 Thread Olivier.Roger

Humm, according to the 
http://fusesource.com/docs/esb/4.3/esb_deploy_osgi/esb_deploy_osgi.pdf
documentation   NMR is also an asynchronous messaging protocol.

Can the transaction be kept accros such endpoints ?

Using the previous example: Would the path A-C-D-B be in the same
transaction ?
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Hookpoint-Extensible-routes-tp3201249p3202761.html
Sent from the Camel - Users mailing list archive at Nabble.com.


[Hookpoint] Extensible routes ?

2010-10-06 Thread Olivier.Roger

Hello Camel!

I was wondering how routes could be extensible.

I thougth I could use the following idea to do it but I appears to be
otherwise:

The route I created is pretty simple: It picks up message from A, transform
it then send it to B.
I would like to make it extensible so that another route could be hooked
into it.

My idea was to divide the route into 2 routes:

1) A - transform - properties:hook-in
2) properties:hook-out - B

By default hook-in and hook-out would use the same direct:hook endpoint or
anything like that.

If another route transporting messages from C to D needs to be added, the
properties can be changed to 
- hook-in=C
- hook-out=D
That way the route would be complete.

However, since I deploy the route as separate osgi bundles (one with A-B,
another with C-D), I get the following error

CamelExchangeException: No consumers available on endpoint:
Endpoint[direct://hook-in]

Another complication is that I would like the route to stay transactional
and only have A and B persisted on my JMS broker.

Is that possible ?


-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Hookpoint-Extensible-routes-tp3201249p3201249.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Hookpoint] Extensible routes ?

2010-10-06 Thread Olivier.Roger

I understand why direct: does not work now. Because it is limited to a single
camelContext.

However, could vm: be used for this use case ?
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Hookpoint-Extensible-routes-tp3201249p3201305.html
Sent from the Camel - Users mailing list archive at Nabble.com.


[camel-hawt] fixed in 2.5

2010-10-05 Thread Olivier.Roger

Seeing the ticket  https://issues.apache.org/activemq/browse/CAMEL-3120
CAMEL-3120  I had 
http://servicemix.396122.n5.nabble.com/Feature-Update-HawtDB-for-Camel-td3199011.html#a3199011
a question for servicemix .
I guess the question is more related to Camel so I ask it here.

I am currently using Fuse ESB distribution of SMX which is bundled with
HawtDB 1.1 and Hawtbuf 1.0.
Apparently fixed version are 1.4 and 1.2, respectively.

I was wondering if and how it would be possible to update the feature
bundles to benefit from the fixed version of HawtDB and Hawtbuf ? 

Apparently, Just changing the dependencies to HawtDB is not sufficient. I
get this error :

NoSuchMethodError:
org.fusesource.hawtdb.api.BTreeIndexFactory.create(Lorg/fusesource/hawtdb/api/Paged;I)Lorg/fusesource/hawtdb/api/SortedIndex

Maybe the API has changed.

Would it be possible to install the component camel-hauwtdb in 2.5 version
(trunk) with Camel 2.4 to benefit of the fix?
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/camel-hawt-fixed-in-2-5-tp3199363p3199363.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [HawtDB] Monitoring?

2010-09-28 Thread Olivier.Roger

I ask on the HawtDB maillinglist and it seems you are right :

http://groups.google.com/group/hawtdb/browse_thread/thread/145f0a207bebad23
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/HawtDB-Monitoring-tp2855385p2856357.html
Sent from the Camel - Users mailing list archive at Nabble.com.


[Aggregator] CompletionTimeout as property

2010-09-28 Thread Olivier.Roger

Hello !

I am trying to use the new property placeholder from Camel 2.4

I used it to set the completionTimeout attribute from the aggregator
component. Schema validation seems to be failling.

aggregate strategyRef=... completionTimeout={{aggregator.timeout}}

Here is the error :

cvc-datatype-valid.1.2.1: '{{aggregator.timeout}}' is not a valid value for
'integer'.

Is the aggregator a supported component for the propertyplaceholder? 
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-CompletionTimeout-as-property-tp2856453p2856453.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Aggregator] Howto remove from persistency

2010-09-27 Thread Olivier.Roger

Nice,

I see it's even already implemented.

Thanks!
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-Howto-remove-from-persistency-tp2852702p2854867.html
Sent from the Camel - Users mailing list archive at Nabble.com.


[HawtDB] Monitoring?

2010-09-27 Thread Olivier.Roger

Hello Camel!

I am using the new Camel 2.4 HawtDBAggregationRepository.
I was wondering if their was any way to monitor the component state.

Maybe JMX? or a special tool to see the file content?

Thanks in advance for your help,

Olivier


-- 
View this message in context: 
http://camel.465427.n5.nabble.com/HawtDB-Monitoring-tp2855385p2855385.html
Sent from the Camel - Users mailing list archive at Nabble.com.


[Splitter] stopOnException behavior

2010-09-24 Thread Olivier.Roger

Hello Camel !

I am using Camel 2.4.

After reading the documentation I was still wondering how error handling can
be performed when using the splitter with POJO as aggregationStrategy.
My POJO mehod is returning a ListMessage Object containing all my parts.

I would like to avoid that only some part of my original message are sent to
the route in case of Exception, so I guess setting the stopOnException is
what I need. 
Can I be sure that, in a transacted route, if a Exception occurs in the
split algorithm, everything will be rollbacked ?

Thanks in advance,

Olivier
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Splitter-stopOnException-behavior-tp2852371p2852371.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Splitter] stopOnException behavior

2010-09-24 Thread Olivier.Roger

I had an older version of the book, chapter 8 was not available then.

I just updated and it seems to be what I was looking for ;) Thanks
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Splitter-stopOnException-behavior-tp2852371p2852687.html
Sent from the Camel - Users mailing list archive at Nabble.com.


[Aggregator] Howto remove from persistency

2010-09-24 Thread Olivier.Roger

Hello,

I am using the new HawtDB aggregatorRepository.
I saw in the documentation that aggregated messages can be published using
one of the 5 completion checks. 

I was wondering if there was a way not to publish message if completion is
not reach after a given time.

In my case I split a message in 3, which are transformed separately (by an
external process). The transformation can provoke and error. 
In the happy path I aggregate the 3 transformed parts back into a message.
Otherwise I would like the route to fails and the aggregated message for
that correlatedId to be removed from the aggregator repository.

I guess I can do that in Java using the repository Spring Bean, it that a
better way ?

Thanks in advance,

Olivier
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-Howto-remove-from-persistency-tp2852702p2852702.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Aggregator] Howto remove from persistency

2010-09-24 Thread Olivier.Roger

I see.

I was thinking about something like a removeOnTimeout (default=false of
course) that would use the existing completionTimeout attribute but change
its behavior to remove the aggregated message instead of publishing it.
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-Howto-remove-from-persistency-tp2852702p2852731.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: [SPAM] - Re: [Aggregator] Howto remove from persistency - Number of numbers in MIME From exceeds maximum threshold

2010-09-24 Thread Olivier.Roger

Indeed, I intended to use that header in a CBR to trigger the repository 
cleanup when needed.

Thanks for the fast reply


Olivier Roger (olivier.ro...@bsb.commailto:olivier.ro...@bsb.com)
Consultant

BSB Belgium (www.bsb.comhttp://www.bsb.com)
Avenue Ath?na,2 - B-1348 Louvain-la-Neuve
T:+32 10 49 58 63 - F:+32  10 48 34 99

BUSINESS SOLUTIONS BUILDERS DISCLAIMER
This e-mail message and any attachments are intended exclusively for the 
addressee(s) and may contain information which is confidential and/or protected 
by intellectual property rights. If you receive this e-mail by mistake, please 
notify immediately the sender, or Business Solutions Builders (by e-mail at 
disclai...@bsb.commailto:disclai...@bsb.com), and delete the message and any 
attachments without printing, copying or opening it. Any disclosure, 
reproduction, distribution or use of this message or any attachments, by 
persons other than the designed addressee(s), is strictly prohibited. E-mail 
transmission and Internet use cannot be guaranteed to be secure. Business 
Solutions Builders and its subsidiaries cannot be held responsible for any 
loss, delay or damage arising from their use.

__
__


From: Claus Ibsen-2 [via Camel] 
[mailto:ml-node+2852742-2071113178-45...@n5.nabble.com]
Sent: vendredi 24 septembre 2010 16:52
To: Olivier Roger
Subject: [SPAM] - Re: [Aggregator] Howto remove from persistency - Number of 
numbers in MIME From exceeds maximum threshold

On Fri, Sep 24, 2010 at 4:45 PM, Olivier.Roger [hidden 
email]/user/SendEmail.jtp?type=nodenode=2852742i=0 wrote:

 I see.

 I was thinking about something like a removeOnTimeout (default=false of
 course) that would use the existing completionTimeout attribute but change
 its behavior to remove the aggregated message instead of publishing it.
 --

Ah the published timeout message has a header which tells it was
completed due timeout.
You can then use that to just stop/discard the message.

See http://camel.apache.org/aggregator2
The completedBy header


 View this message in context: 
 http://camel.465427.n5.nabble.com/Aggregator-Howto-remove-from-persistency-tp2852702p2852731.htmlhttp://camel.465427.n5.nabble.com/Aggregator-Howto-remove-from-persistency-tp2852702p2852731.html?by-user=t
 Sent from the Camel - Users mailing list archive at Nabble.com.




--
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.comhttp://fusesource.com?by-user=t
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus


View message @ 
http://camel.465427.n5.nabble.com/Aggregator-Howto-remove-from-persistency-tp2852702p2852742.html
To unsubscribe from [Aggregator] Howto remove from persistency, click 
herehttp://camel.465427.n5.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=2852702code=b2xpdmllci5yb2dlckBic2IuY29tfDI4NTI3MDJ8Njc1ODQxMTU1.


-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-Howto-remove-from-persistency-tp2852702p2852759.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Aggregator] Howto remove from persistency

2010-09-24 Thread Olivier.Roger

That's exactly the idea. 

I agree that deleting messages is dangerous. That's why the option should be
set explicitly (disabled by default).
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-Howto-remove-from-persistency-tp2852702p2852893.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [TypConverter] How to retrive TypeConvert in a custom split method ?

2010-09-16 Thread Olivier.Roger

I successfully get a reference to the TypeConverter API almost everywhere I
needed it.

The only method I can get it is the aggregate(Exchange oldExchange, Exchange
newExchange) method from the AggregationStrategy.

Is there something I am missing? 
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/TypConverter-How-to-retrive-TypeConvert-in-a-custom-split-method-tp2840819p2842058.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [TypConverter] How to retrive TypeConvert in a custom split method ?

2010-09-16 Thread Olivier.Roger

I spoke too soon again, I can find it using the camelcontext via the Exchange
;)

Sorry for the disturbance,

Olivier
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/TypConverter-How-to-retrive-TypeConvert-in-a-custom-split-method-tp2840819p2842074.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Converter] Generics ?

2010-09-15 Thread Olivier.Roger

Claus, FallbackConverter seems to be something that could work indeed.

However, when I implement the my converter that way I get this error
message:

Caused by: java.lang.ClassCastException:
com.bsb.docgen.xml.notification.impl.NotificationTypeImpl cannot be cast to
org.apache.camel.StreamCache

Accorindg to the online documentation
(http://camel.apache.org/stream-caching.html) the stream-caching feature is
disabled by default in Camel 2.0+

When I try to force disabling the feature by setting route
streamCaching=false, It appears to have been removed completely from the
XML Schema:

Caused by: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute
'streamCaching' is not allowed to appear in element 'route'.

Any idea on how to solve this ?
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Converter-Generics-tp2839250p2840218.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Converter] Generics ?

2010-09-15 Thread Olivier.Roger

You're right, I spoke too soon. sorry.

The documentation mix streamCaching and streamCache on the same page (I
suppose it changed on 2.0).
However, event with streamCache=fasle, the route still attempt to convert
from my custom Type to StreamCache.

I don't really see why it would do that if streamCache is set to false. Any
idea about that?
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Converter-Generics-tp2839250p2840234.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Converter] Generics ?

2010-09-15 Thread Olivier.Roger

Thanks for this information

My route fairly simple actually since I am testing the custom converters:

route streamCache=false
from uri=direct:test /
convertBodyTo type=Message /
convertBodyTo type=NotificationType /
bean ref=converter method=showMsg /
to uri=mock:test /
/route

Message can contains any type of Payload, NotficationType is one of them.
The bean showMsg method simple log the content of the file:

public NotificationType showMsg(NotificationType msg) {
System.out.println(msg.xmlText());
return msg;
}

The explicit convertion to NotificationType is not necessary since when I
register a converter, it is used automatocally.

The convertion to Message however cannot be deduced automatically.

As I explained, when I used a normal converter this sample works fine :

@Converter
private NotificationType toPayload(MessageNotificationType msg){
return msg.getPayload();
}

Since Message can hold ony type of paylaod I would like this method to be
generic, so I tried to use the FallBackconverter like this:

@FallbackConverter
public T T toPayload(ClassT type, Exchange exchange, Object value,
TypeConverterRegistry registry){
if (Message.class.isAssignableFrom(value.getClass())) {
return ((Message) value).getPayload();
}
return null;
}

I'll try to debug to find the exact source of the problem.
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Converter-Generics-tp2839250p2840278.html
Sent from the Camel - Users mailing list archive at Nabble.com.


[TypConverter] How to retrive TypeConvert in a custom split method ?

2010-09-15 Thread Olivier.Roger

Hello Camel!

I am using Camel 2.4.
I made a custom split strategy with a bean.

In that strategy I need to perform some type convertion. Therefore I already
have @Converter registered.
Is it possible to obtain a reference to the TypeConverter Object inside the
split method ?

If not, how could I proceed to be able to use the converter inside the split
strategy ?

Thanks!
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/TypConverter-How-to-retrive-TypeConvert-in-a-custom-split-method-tp2840819p2840819.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [TypConverter] How to retrive TypeConvert in a custom split method ?

2010-09-15 Thread Olivier.Roger

It's exactly what I needed, Thanks !
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/TypConverter-How-to-retrive-TypeConvert-in-a-custom-split-method-tp2840819p2840833.html
Sent from the Camel - Users mailing list archive at Nabble.com.


[Converter] Generics ?

2010-09-14 Thread Olivier.Roger

hello Camel!

Is it possible to use generics in annotated converters ?

I tried to do this

@Converter
public T T toPayload(MessageT msg){
return msg.getPayload();
}

Which does not work. However, replacing T by a real class definition is
working for that type.
I would like to avoid to create one converter for each type of payload my
messages can have, is that possible ?

Thanks in advance,

Olivier
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Converter-Generics-tp2839250p2839250.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Aggregator] completionPredicate evaluated only once ?

2010-09-13 Thread Olivier.Roger

I finally switched to Camel 2.4.

The completionPredicate is working just like you said.
Thanks
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-completionPredicate-evaluated-only-once-tp2805740p2837484.html
Sent from the Camel - Users mailing list archive at Nabble.com.


[Aggregator] wait indefinitely ?

2010-09-13 Thread Olivier.Roger

Hello Camel!

I am using Camel 2.4 with its new Aggregator component.

I wanted to have a confirmation on some change in the component behavior.

In Camel 2.2 there was default values for batchTimeout (1000) and batchSize
(100).
According to the documentation, the new aggregator does not have default
values for those options (renamed to completionTimeout and completionSize).

Does it means that the new aggregator will wait forever by default (if not
completionSize, CompletionTimeout and completionPredicate is set of course).

Thanks in advance.

Olivier
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-wait-indefinitely-tp2837494p2837494.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Aggregator] wait indefinitely ?

2010-09-13 Thread Olivier.Roger

That's exactly what I wanted to know,

Thanks! 
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-wait-indefinitely-tp2837494p2837705.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Aggregator] oldExchange always null ?

2010-09-07 Thread Olivier.Roger

Thanks for your help claus,

I fact the issue was in the aggregationStrategy. 
I transformed the message and the correlationId was lost.

Setting back the id solve the issue.
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-oldExchange-always-null-tp2805136p2805708.html
Sent from the Camel - Users mailing list archive at Nabble.com.


[Aggregator] completionPredicate evaluated only once ?

2010-09-07 Thread Olivier.Roger

Hello,

I still have some issues with the aggregator component.
According to my tests the completionPredicate is evaluated only once the
first message is received.

After that the method is not executed anymore.
Is there anything that could provoke this behaviour ?

I put here under the trace of my test

running aggregate method
old Exchange: null
new Exchange: Exchange[Message: ns:message xml ...
running isCompleted method
old Exchange: Exchange[Message: generic message ...
new Exchange: Exchange[Message: ns:message xml ...
running aggregate method
old Exchange: Exchange[Message: generic message ...
new Exchange: Exchange[Message: ns:message xml ...
running aggregate method
old Exchange: Exchange[Message: generic message ...
new Exchange: Exchange[Message: ns:message xml ...

-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-completionPredicate-evaluated-only-once-tp2805740p2805740.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Aggregator] completionPredicate evaluated only once ?

2010-09-07 Thread Olivier.Roger

I see.

Unfortunately, I am stuck with 2.2 at the moment.
It there any known issue with the completionPredicate in version below 2.3 ?

Thank for your help,

Olivier
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-completionPredicate-evaluated-only-once-tp2805740p2805769.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Aggregator] completionPredicate evaluated only once ?

2010-09-07 Thread Olivier.Roger

I see,

That explains my observations.
I will switch to 2.3+ as soon a possible.

Thanks for your explanations on this matter
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-completionPredicate-evaluated-only-once-tp2805740p2805774.html
Sent from the Camel - Users mailing list archive at Nabble.com.


[Aggregator] oldExchange always null ?

2010-09-06 Thread Olivier.Roger

Hello Camel,

I have a strange behavior with the aggregator component. After a few hours I
still cannot explains what happens.

I have an aggregator define as 

aggregate strategyRef=crgAggregatorStrategy
batchSize=3
correlationExpression
xpath/ns:message/ns:correlation/xpath
!--method bean=crgAggregatorStrategy
method=correlationId /--
/correlationExpression
to ref=cbr/
/aggregate

The xpath expression is the correct xpath expression and message have
content.
I also tried to set a constant or to use a bean returning a fix value but in
all cases the oldExchanged variable is null.

It would be great if someone could indicates where I made a mistake,

Thanks in advance,

Olivier
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-oldExchange-always-null-tp2805136p2805136.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: [Aggregator] oldExchange always null ?

2010-09-06 Thread Olivier.Roger

By the way, I use Camel 2.2.
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-oldExchange-always-null-tp2805136p2805137.html
Sent from the Camel - Users mailing list archive at Nabble.com.


[Aggregator] Persistence ?

2010-09-02 Thread Olivier.Roger

Hello,

I would like to have an Aggregator aggregationStrategy that persists
messages. I saw that Camel 2.3 bring some new features to the Aggregator
pattern, including persistence on File with HawtDB.

Unfortunately, I am currently using Camel 2.2. If possible I would like not
to upgrade for external reasons.
I have a database at my disposal for persistence.
 
Here is my question: Does a strategy persisting messages in Database exists
? if not, would it be difficult to create one according to you ?

Thanks you ins advance,

Olivier
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-Persistence-tp2800301p2800301.html
Sent from the Camel - Users mailing list archive at Nabble.com.