Re: Aggregator batchTimeout

2009-04-28 Thread Frank Schwarz


tmi wrote:
 
 Sure, you can specify a batchSize parameter instead of the batchTimeout.
 See http://camel.apache.org/aggregator.html. You can also define your own
 aggregation strategy and completedPredicate as explained in the Camel docs
 and the blog mentioned previously:
 http://tmielke.blogspot.com/2009/01/using-camel-aggregator-correctly.html.
 

OK, I obviously was on the wrong track. I inserted a completion predicate
and now things seem to work better. The predicate was actually pretty simple
to construct.

completionPredicate
simple${in.header.CamelSplitSize} ==
${property.CamelAggregatedSize}/simple
/completionPredicate

What still puzzles me, is how to define a timeout. I have learnt that
batchTimeout is inappropriate. 
Is there any built-in facility or am I to introduce some timestamp-header
and do calculations on this basis?

-- Frank
-- 
View this message in context: 
http://www.nabble.com/Aggregator-batchTimeout-tp23127654p23270670.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: HTTPS - help required

2009-04-28 Thread huntc

Hi there,

Having found the need to be able to configure JAAS for my Camel Jetty
component I made some changes on my system to JettyHttpComponent and
JettyHttpEndpoint. These changes allow you to submit a Jetty Handler e.g. a
security handler by referring to a handler bean in the Jetty URI e.g.:


jetty:http://0.0.0.0:9080/MyService?handlers=securityHandler


In my spring config, securityHandler is then defined as:


lt;!-- Jetty Security handling --gt;
lt;bean id=userRealm
class=org.mortbay.jetty.plus.jaas.JAASUserRealmgt;
lt;property name=name value=tracker-users /gt;
lt;property name=loginModuleName value=ldaploginmodule 
/gt;
lt;property name=roleClassNames
value=com.classactionpl.jaas.UserGroup /gt;
lt;/beangt;
lt;bean id=constraint 
class=org.mortbay.jetty.security.Constraintgt;
lt;property name=name value=BASIC /gt;
lt;property name=roles value=tracker-users /gt;
lt;property name=authenticate value=true /gt;
lt;/beangt;
lt;bean id=constraintMapping
class=org.mortbay.jetty.security.ConstraintMappinggt;
lt;property name=constraint ref=constraint /gt;
lt;property name=pathSpec value=/* /gt;
lt;/beangt;
lt;bean id=securityHandler
class=org.mortbay.jetty.security.SecurityHandlergt;
lt;property name=userRealm ref=userRealm /gt;
lt;property name=constraintMappings ref=constraintMapping 
/gt;
lt;/beangt;


Would there be general interest in this capability? If so then I'm happy to
raise a JIRA and contribute the code. I've actually got everything above
working.

Kind regards,
Christopher
-- 
View this message in context: 
http://www.nabble.com/HTTPS---help-required-tp20932280p23270820.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.


Re: HTTPS - help required

2009-04-28 Thread Willem Jiang
Cool, we love the contribution , please feel free to create a JIRA for
the patch. Please also submit a unit test and update the wiki for it :).

Willem

huntc wrote:
 Hi there,
 
 Having found the need to be able to configure JAAS for my Camel Jetty
 component I made some changes on my system to JettyHttpComponent and
 JettyHttpEndpoint. These changes allow you to submit a Jetty Handler e.g. a
 security handler by referring to a handler bean in the Jetty URI e.g.:
 
 
 jetty:http://0.0.0.0:9080/MyService?handlers=securityHandler
 
 
 In my spring config, securityHandler is then defined as:
 
 
   lt;!-- Jetty Security handling --gt;
   lt;bean id=userRealm
 class=org.mortbay.jetty.plus.jaas.JAASUserRealmgt;
   lt;property name=name value=tracker-users /gt;
   lt;property name=loginModuleName value=ldaploginmodule 
 /gt;
   lt;property name=roleClassNames
 value=com.classactionpl.jaas.UserGroup /gt;
   lt;/beangt;
   lt;bean id=constraint 
 class=org.mortbay.jetty.security.Constraintgt;
   lt;property name=name value=BASIC /gt;
   lt;property name=roles value=tracker-users /gt;
   lt;property name=authenticate value=true /gt;
   lt;/beangt;
   lt;bean id=constraintMapping
 class=org.mortbay.jetty.security.ConstraintMappinggt;
   lt;property name=constraint ref=constraint /gt;
   lt;property name=pathSpec value=/* /gt;
   lt;/beangt;
   lt;bean id=securityHandler
 class=org.mortbay.jetty.security.SecurityHandlergt;
   lt;property name=userRealm ref=userRealm /gt;
   lt;property name=constraintMappings ref=constraintMapping 
 /gt;
   lt;/beangt;
 
 
 Would there be general interest in this capability? If so then I'm happy to
 raise a JIRA and contribute the code. I've actually got everything above
 working.
 
 Kind regards,
 Christopher



Re: HTTPS - help required

2009-04-28 Thread Claus Ibsen
Hi

Yeah looks cool. Contributions is much welcome.


On Tue, Apr 28, 2009 at 8:31 AM, Willem Jiang willem.ji...@gmail.com wrote:
 Cool, we love the contribution , please feel free to create a JIRA for
 the patch. Please also submit a unit test and update the wiki for it :).

 Willem

 huntc wrote:
 Hi there,

 Having found the need to be able to configure JAAS for my Camel Jetty
 component I made some changes on my system to JettyHttpComponent and
 JettyHttpEndpoint. These changes allow you to submit a Jetty Handler e.g. a
 security handler by referring to a handler bean in the Jetty URI e.g.:


         jetty:http://0.0.0.0:9080/MyService?handlers=securityHandler


 In my spring config, securityHandler is then defined as:


       lt;!-- Jetty Security handling --gt;
       lt;bean id=userRealm
 class=org.mortbay.jetty.plus.jaas.JAASUserRealmgt;
               lt;property name=name value=tracker-users /gt;
               lt;property name=loginModuleName value=ldaploginmodule 
 /gt;
               lt;property name=roleClassNames
 value=com.classactionpl.jaas.UserGroup /gt;
       lt;/beangt;
       lt;bean id=constraint 
 class=org.mortbay.jetty.security.Constraintgt;
               lt;property name=name value=BASIC /gt;
               lt;property name=roles value=tracker-users /gt;
               lt;property name=authenticate value=true /gt;
       lt;/beangt;
       lt;bean id=constraintMapping
 class=org.mortbay.jetty.security.ConstraintMappinggt;
               lt;property name=constraint ref=constraint /gt;
               lt;property name=pathSpec value=/* /gt;
       lt;/beangt;
       lt;bean id=securityHandler
 class=org.mortbay.jetty.security.SecurityHandlergt;
               lt;property name=userRealm ref=userRealm /gt;
               lt;property name=constraintMappings ref=constraintMapping 
 /gt;
       lt;/beangt;


 Would there be general interest in this capability? If so then I'm happy to
 raise a JIRA and contribute the code. I've actually got everything above
 working.

 Kind regards,
 Christopher





-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Apache Camel Reference Card:
http://refcardz.dzone.com/refcardz/enterprise-integration


Re: CSV options: howto setting ?

2009-04-28 Thread Claus Ibsen
On Tue, Apr 28, 2009 at 10:41 AM, Campa
stefano.campan...@tinvention.net wrote:



 Claus Ibsen-2 wrote:

 ...
                 CsvDataFormat customCsv = new CsvDataFormat();
                 CSVConfig custom = new CSVConfig();
                 custom.setDelimiter(';');
                 custom.addField(new CSVField(foo));
                 custom.addField(new CSVField(baz));
                 custom.addField(new CSVField(bar));
                 customCsv.setConfig(custom);
                 customCsv.setAutogenColumns(false);

                 from(direct:startMultiCustom).
                     marshal(customCsv).
                     to(mock:resultMultiCustom);


 Thank you for you help ...
 I have tried yout code ... but not compile the first for example the method
 setConfig on CsvDataFormat do not exists.So I'have chacked javadocs for
 http://camel.apache.org/maven/camel-core/apidocs/org/apache/camel/model/dataformat/CsvDataFormat.html
 CsvDataFormat   .

 I'm in error ? the class CsvDataFormat that you use is in 
 org.apache.camel.model.dataformat  ?
Yes. its in camel-csv.jar.

 Can be a different version ? Do I have to use old 1.6 in place of 2.0-m1 ?
I am using 2.0-SNAPSHOT, eg the bleeding edge.

The CSV data format have been improved in Camel 2.0m2 or newer. So
maybe the 2.0m1 cannot do this.
The m2 is scheduled for release this week.

Maybe in 2.0m1 there are some other methods to set the separator char.
Try see which methods exists on the CsvDataFormat class in your code
editor.



 Thank you
 Stefano


 --
 View this message in context: 
 http://www.nabble.com/CSV--options%3A-howto-setting---tp23272206p23272780.html
 Sent from the Camel - Users mailing list archive at Nabble.com.





-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Apache Camel Reference Card:
http://refcardz.dzone.com/refcardz/enterprise-integration


Re: Camel 2.0-M1 JUnit tests fail

2009-04-28 Thread Claus Ibsen
Hi

I have committed a fix in the trunk: rev 769305.

-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Apache Camel Reference Card:
http://refcardz.dzone.com/refcardz/enterprise-integration


Re: CSV options: howto setting ?

2009-04-28 Thread Claus Ibsen
On Tue, Apr 28, 2009 at 11:31 AM, Campa
stefano.campan...@tinvention.net wrote:


 Claus Ibsen-2 wrote:

 Hi

 You can try the 2.0-SNAPSHOT. There are some instructions at the download
 page
 http://camel.apache.org/download.html

 About how to set the maven repository if using maven. Or where you can
 find a .zip with the 2.0-SNAPSHOT.
 


 Done!
 But the method or other similar method to configure csvparser are not there
 ... I also read the head svn source but is the same (
 https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/CsvDataFormat.java
 ).
Ah that one is just for the DSL. You need to look in camel-csv
component, there is the real meat
https://svn.apache.org/repos/asf/camel/trunk/components/camel-csv/



 Any Ideas ? It seem strange ...

 Thanks
 Stefano



 --
 View this message in context: 
 http://www.nabble.com/CSV--options%3A-howto-setting---tp23272206p23273478.html
 Sent from the Camel - Users mailing list archive at Nabble.com.





-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Apache Camel Reference Card:
http://refcardz.dzone.com/refcardz/enterprise-integration


Re: CSV options: howto setting ?

2009-04-28 Thread Campa


Claus Ibsen-2 wrote:
 
 Hi
 
 You can try the 2.0-SNAPSHOT. There are some instructions at the download
 page
 http://camel.apache.org/download.html
 
 About how to set the maven repository if using maven. Or where you can
 find a .zip with the 2.0-SNAPSHOT.
 
 

Done! 
But the method or other similar method to configure csvparser are not there
... I also read the head svn source but is the same (
https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/CsvDataFormat.java
).

Any Ideas ? It seem strange ... 

Thanks 
Stefano



-- 
View this message in context: 
http://www.nabble.com/CSV--options%3A-howto-setting---tp23272206p23273478.html
Sent from the Camel - Users mailing list archive at Nabble.com.