Re: camel-google-mail NPE null configuration
Fixed up for camel-google-mail here https://issues.apache.org/jira/browse/CAMEL-10381 I'll check the other components later but its likely same case. On Tue, Oct 11, 2016 at 2:16 PM, Claus Ibsenwrote: > Hi > > Yes its a bug you are welcome to report a JIRA ticket > http://camel.apache.org/support.html > > Its similar problem in google-drive and google-calendar I assume. > > On Tue, Oct 11, 2016 at 1:50 AM, xuloo wrote: > > I'm trying to simply list the messages in a gmail inbox. > > > > I've imported camel-google-mail 2.17.0 > > I've created the access/refresh tokens for the correct client/secret for > the > > gmail account. > > I've configured the component in a simple route via java api > > (google-mail://messages/list?clientId=) > > > > When i run the application and start the route i get an NPE which points > to > > > > org.apache.camel.component.google.mail.GoogleMailComponent.getClient( > GoogleMailComponent.java:50 > > > > as the culprit. > > > > Doing a bit of digging in the source reveals that the configuration > property > > of GoogleMailComponent is never set, so it's null... so i don't > understand > > how this component could ever work... unless there's some magic going on > > that i'm not privy to (and which isn't documented at > > http://camel.apache.org/googlemail.html > > > > Am i missing something obvious here? > > > > > > > > -- > > View this message in context: http://camel.465427.n5.nabble. > com/camel-google-mail-NPE-null-configuration-tp5788571.html > > Sent from the Camel - Users mailing list archive at Nabble.com. > > > > -- > Claus Ibsen > - > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2 > -- Cheers, Jon --- Red Hat, Inc. Email: jans...@redhat.com Web: http://redhat.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Camel in Action: https://www.manning.com/books/camel-in-action-second-edition
Re: how to debug child instance remotely on child instance
Try using admin:change-opts to add debug java opts to the child. On Dec 18, 2015 12:27 PM, "nono"wrote: > > sorry here is not correct place to post this question > but i did not get reply from jboss forum, i assume maybe camel user is also > using > camel on jboss fuse. maybe have some hints about this question > > I am able to debug root instance on jboss fuse 620 > but it seems i could not debug child instance on jboss fuse > > what i did is > > i just go to /instances/child/bin, put export > KARAF_DEBUG=true > entry at /instances/child/bin/karaf file but it doesnot work > how do i debug my bundle on child instance?there are two files under > //instances/child/bin , one is karaf another is start, what > are different? Which file will be called during child instance starting? > Any hints will be more than welcomed.! > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/how-to-debug-child-instance-remotely-on-child-instance-tp5775257.html > Sent from the Camel - Users mailing list archive at Nabble.com. >
Re: Very long processing of the Consumer in the file component…
Hmm not sure what is up here. Haven't seen this myself :-) Maybe try taking a few thread dumps during this 3 second period to see if anything is holding up the processing? On Dec 17, 2015 5:09 AM, "Victor NOËL"wrote: > Also, to complete, there is this log just before the poll related to the > locking, it is maybe linked: > > 2015/12/16 18:11:26,790 GMT+0100 FINE > [org.apache.camel.component.file.FileEndpoint] : Parameters for Generic > file process strategy {readLockMinAge=0, readLockMarkerFile=true, > readLock=markerFile, readLockRemoveOnCommit=false, readLockTimeout=1, > readLockRemoveOnRollback=true, readLockLoggingLevel=WARN, > readLockDeleteOrphanLockFiles=true, readLockMinLength=1, > readLockCheckInterval=1000} > 2015/12/16 18:11:26,901 GMT+0100 FINE > [org.apache.camel.component.file.FileEndpoint] : Using Generic file process > strategy: > org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy@4266b6 > 2015/12/16 18:11:26,903 GMT+0100 FINE > [org.apache.camel.component.file.strategy.MarkerFileExclusiveReadLockStrategy] > : Prepare on startup by deleting orphaned lock files from: > /tmp/junit6150402493774267253/in > > Also the problem does not happen all the time and on all my machines… > > > Le 17/12/2015 09:37, Victor NOËL a écrit : > >> Hi, >> >> I set-up a route with the following consumer URI: >> from("file:///tmp/junit6150402493774267253/in?initialDelay=500")... >> >> At one point in the log I get the following information: >> 2015/12/16 18:11:26,278 GMT+0100 FINE >> [org.apache.camel.impl.DefaultScheduledPollConsumerScheduler] : Scheduling >> poll (fixed delay) with initialDelay: 500, delay: 500 (milliseconds) for: >> Endpoint[file:///tmp/junit6150402493774267253/in?initialDelay=500] >> 2015/12/16 18:11:26,282 GMT+0100 INFO >> [org.apache.camel.impl.DefaultCamelContext] : Route: route3 started and >> consuming from: >> Endpoint[file:///tmp/junit6150402493774267253/in?initialDelay=500] >> >> Just after starting it, I simply move a file into the following directory. >> >> Then more or less 500ms after the first log, later there is the first >> poll: >> 2015/12/16 18:11:26,910 GMT+0100 FINE >> [org.apache.camel.component.file.FileConsumer] : Took 0.006 seconds to >> poll: /tmp/junit6150402493774267253/in >> >> And then after that, 3 seconds later, I get this message (which according >> to the code is logged before the Exchange are sent…) >> 2015/12/16 18:11:29,191 GMT+0100 FINE >> [org.apache.camel.component.file.FileConsumer] : Total 1 files to consume >> >> How come 3 seconds passes before the exchange is sent into the route? >> >> Thank you for your help (I'm using Camel 2.16.0). >> > >
Re: camel threshold
Routes keep going until they are paused or stopped. Your best bet is probably a custom RoutePolicy http://camel.apache.org/routepolicy.html that does the custom throttling (pausing or stopping a route i guess) after X exchanges. On Mon, Aug 12, 2013 at 7:53 AM, kiranreddykasa kirankuma...@fss.co.inwrote: Hi How can we find out the threshold for any camel route ? I mean how to find the maximum number of messages a particular route can process and it can't take any more messages. I came across camel throttle , if the threshold is reached the new messages will be saved somewhere for processing ? - Regards kiran Reddy -- View this message in context: http://camel.465427.n5.nabble.com/camel-threshold-tp5737136.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon --- Red Hat, Inc. Email: jans...@redhat.com Web: http://redhat.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
fw: hello
http://personeelsservice-kwb.nl/tcxfv/hniyxuwxstblt janstey 7/21/2013 5:52:25 PM
Re: fw: hello
Please don't click this link. Some hacker in Belarus hijacked my account today and sent this out. Cheers, Jon On 2013-07-21 2:23 PM, Jon Anstey jans...@gmail.com wrote: http://personeelsservice-kwb.nl/tcxfv/hniyxuwxstblt janstey 7/21/2013 5:52:25 PM
Re: How to replace hard coded URIs?
Take a look at http://camel.apache.org/properties.html to see how to use a property for a URI. On Mon, May 6, 2013 at 11:00 AM, Al Ferguson alfer...@hotmail.com wrote: Hi, I defined the following route that works very well. However, I have to read the URIs of the 3 services from ZooKeeper nodes. How to replace the 3 hard coded URIs in the initial route by value nodes read from Zookeeper? Thanks -- View this message in context: http://camel.465427.n5.nabble.com/How-to-replace-hard-coded-URIs-tp5732083.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon --- Red Hat, Inc. Email: jans...@redhat.com Web: http://redhat.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: How to replace hard coded URIs?
Ah you wanted dynamic URIs - I thought you meant you wanted the initial route configured at startup (i.e. once). enrich() doesn't support dynamic URIs ATM. See https://issues.apache.org/jira/browse/CAMEL-4596 for more info and work around. Basically you have to create a bean that then uses a consumer template to consume from whatever URI you want. On Tue, May 7, 2013 at 9:10 AM, Al Ferguson alfer...@hotmail.com wrote: Yes I see, thanks for the proposal. However the properties are immutables, right? For steps 1 and 3, I'll use a Header and a RecipientList. But it seems I cannot use a RecipientList for the second step, the *enricher*. Any possibilities anyone? Claus? Thanks, Al. F -- View this message in context: http://camel.465427.n5.nabble.com/How-to-replace-hard-coded-URIs-tp5732083p5732122.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon --- Red Hat, Inc. Email: jans...@redhat.com Web: http://redhat.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: How do we have the log: component log to a file?
The log component utilizes whatever underlying logging mechanism you are using, like log4j or logback, etc. For log4j just google something like org.apache.log4j.RollingFileAppender and you'll find config options to add to log4j.properties. On Tue, May 7, 2013 at 5:35 PM, Chris Wolf cwolf.a...@gmail.com wrote: I notice all kinds of options for the log compenent, except for how to log to a file, as opposed to stdout: http://camel.apache.org/log.html I'm sure I'm some obvious piece of documentation on that, but I just can't find it... Any help? Thanks, Chris -- Cheers, Jon --- Red Hat, Inc. Email: jans...@redhat.com Web: http://redhat.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: Error when start camel-jackson
What version of Karaf are you using? I just tried Karaf 2.3.1, ran the following and all was well features:chooseurl camel 2.11.0 features:install camel-jackson On Tue, May 7, 2013 at 10:19 PM, skysw...@gmail.com skysw...@gmail.comwrote: Hi When I want to start camel-jackson 2.11.0 in karaf, I got the following error org.osgi.framework.BundleException: Unresolved constraint in bundle org.apache.camel.camel-jackson [177]: Unable to reso lve 177.0: missing requirement [177.0] package; ((package=org.apache.camel)(version=2.11.0)(!(version=2.12.0))) How can I fix this? -- Cheers, Jon --- Red Hat, Inc. Email: jans...@redhat.com Web: http://redhat.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: DSL trim on body of type string
Try this: from(...).transform().simple(${in.body.trim()})... On Wed, Aug 1, 2012 at 8:47 AM, cgsk karthik2...@gmail.com wrote: Hi There, I need to do trim() on the body of type String in the DSL. Is there any staright way out in camel by using transform/convertor/regex? I dont prefer writing something some processor or custom convertor. Apologies if it sounds stupid. Thanks, CGSK -- View this message in context: http://camel.465427.n5.nabble.com/DSL-trim-on-body-of-type-string-tp5716660.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: Scala DSL - How do I give a route an id?
Did you try using routeId? from(direct:start) .routeId(foo) ... On Mon, Jul 30, 2012 at 1:59 PM, Lance Walton lancewal...@mac.com wrote: Hi. I'm using the Scala DSL to add routes to the CamelContext. However, I also want to be able to remove some of these routes from the CamelContext later. I can see how to do this if I have a route id, but I can't see how to assign an id to a route in the DSL. Can anyone point me at the right thing? Thanks, Lance _ http://www.stateofflow.com http://www.casualmiracles.com http://www.twitter.com/lancewalton +44 (0)7779 026533 -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: Scala DSL - How do I give a route an id?
Here's an example http://svn.apache.org/repos/asf/camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/RouteIdTest.scala On Mon, Jul 30, 2012 at 2:25 PM, Lance Walton lancewal...@mac.com wrote: Hi. Thanks for the reply. That looks Java DSL like. That's what I want to do but with the Scala DSL. Regards, Lance On 30 Jul 2012, at 17:46, Jon Anstey jans...@gmail.com wrote: Did you try using routeId? from(direct:start) .routeId(foo) ... On Mon, Jul 30, 2012 at 1:59 PM, Lance Walton lancewal...@mac.com wrote: Hi. I'm using the Scala DSL to add routes to the CamelContext. However, I also want to be able to remove some of these routes from the CamelContext later. I can see how to do this if I have a route id, but I can't see how to assign an id to a route in the DSL. Can anyone point me at the right thing? Thanks, Lance _ http://www.stateofflow.com http://www.casualmiracles.com http://www.twitter.com/lancewalton +44 (0)7779 026533 -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: Create a new Camel component via Scala-Component-Archetype?
On Sun, May 13, 2012 at 8:04 PM, megachucky megachu...@googlemail.comwrote: I think about writing a new Camel component (e.g. for Salesforce or Neo4j). I also think about using Scala for the new component. However, there is only a Java-Component-Archetype at the moment. Is this for any reason? Should new components be in Java, too (because more people will understand and maybe maintain the source code then)? Otherwise, I would try to create a Scala-Component-Archetype first, before writing the new component. IMO that would be great to have a choice when creating new components. I don't think anyone would strongly oppose a component in scala. We already have a scala DSL after-all. I never created a Maven archetype before, but this is probably very easy ?! I used this years ago and it worked fine http://maven.apache.org/archetype/maven-archetype-plugin/advanced-usage.htmlnot sure if that still works as I expect though :) Maybe the easiest thing is to just copy one of the preexisting archetypes as a starting point? -- View this message in context: http://camel.465427.n5.nabble.com/Create-a-new-Camel-component-via-Scala-Component-Archetype-tp5708543.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: How to bind an object in the registry camel?
I use camel-bindy in a Blueprint file here: https://github.com/janstey/rider-auto-osgi/blob/master/rider-auto-normalizer/src/main/resources/OSGI-INF/blueprint/camel-context.xmlMaybe that will help. You don't to explicitly add that to the registry. Of course, for camel-bindy to be available to the blueprint container, you will need the camel-bindy feature installed (if you are using a Karaf-based container). Cheers, Jon On Fri, May 4, 2012 at 2:12 PM, sekaijin jean-yves.terr...@sap.aphp.frwrote: Hi I use blueprint for my camel osgi bundles. I don't understand how to register a dataformat or a codec in the registry camel My xml is as follows and in my road builder I can not see my dataformat (I.E. my codec) if I understand well Camel:Bindy adds dataformat in the blueprint container. but my route are looking in the registry camel. How to bind an object in the registry camel? xml does not seem to be the right solution. and in the routebuilder getContext().getRegistry () returns a Registry that does not support the bind method. thank Bye. sorry for my approximative english -- View this message in context: http://camel.465427.n5.nabble.com/How-to-bind-an-object-in-the-registry-camel-tp5686392.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: Help with RUNNING simple camel example with spring dsl without using maven
You can generate your own Spring-based project with the camel-archetype-spring archetype: mvn archetype:generate -DarchetypeGroupId=orache.camel.archetypes -DarchetypeArtifactId=camel-archetype-spring -DarchetypeVersion=2.9.2 -DgroupId=myGroupId -DartifactId=myArtifactId You can run that with mvn camel:run A listing of all the Spring support in Camel is here: http://camel.apache.org/spring.html Also, chapter 2 of Camel in Action has an intro to configuring routes in Spring XML. Cheers, Jon On Fri, May 4, 2012 at 8:18 PM, dmhatre darpan27...@gmail.com wrote: Hi Folks, Can someone help me with the architecture of simple camel with spring dsl example.And how to run it. Just an overview will be great help. I already have running examples with java dsl. But want to do it in spring. Thanks In Advance, Darpan Mhatre. -- View this message in context: http://camel.465427.n5.nabble.com/Help-with-RUNNING-simple-camel-example-with-spring-dsl-without-using-maven-tp5687107.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: org.apache.camel.spring.Main class not found exception
Do you have a Maven dependency for camel-spring in your pom? On Sun, Nov 27, 2011 at 12:20 AM, newbiee m_ess...@hotmail.com wrote: Hi I am trying to use database (MySQL) in CAMEL (v. 2.6). I have defined my SQL using Spring DSL. When I run mvn -e camel:run I get the following error: Error occurred while running main from: org.apache.camel.spring.Main java.lang.ClassNotFoundException: org.apache.camel.spring.Main at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:409) at java.lang.Thread.run(Thread.java:662) Though it is a class not found exception, since I am using maven to download all the dependencies, is there anything that I might be missing, please comment. Thank you -- View this message in context: http://camel.465427.n5.nabble.com/org-apache-camel-spring-Main-class-not-found-exception-tp5025882p5025882.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: Could not resolve a binding for null
Looks like you are using Spring DM (not Aries Blueprint) for dependency injection so you'll need to add in CXF import elements like the ones shown here: http://camelinaction.googlecode.com/svn/trunk/chapter7/cxf/code_first/src/main/resources/META-INF/spring/camel-cxf.xml Cheers, Jon On Wed, Nov 16, 2011 at 8:21 AM, yadavi yadavi.kankanw...@wipro.com wrote: Hi, Greetings!! Here i am deploying jar into servicemix.Trying to pickup wsdl from cxf:endpoint and trying to get the soap request into the outbox. *This is my camel-context file:* beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:camel=http://camel.apache.org/schema/spring; xmlns:osgi=http://www.springframework.org/schema/osgi; xmlns:cxf=http://camel.apache.org/schema/cxf; xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd http://camel.apache.org/schema/osgi http://camel.apache.org/schema/osgi/camel-osgi.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd; cxf:cxfEndpoint id=pleaseRoute address=http://localhost:8080/3.34/services/CustomerIncidentServiceSoap?; serviceClass=com.camel.StockEndPointService /cxf:cxfEndpoint bean id=myroutebuilder class=com.camel.StockRouteBuilder/ camel:camelContext xmlns=http://camel.apache.org/schema/spring; camel:routeBuilder ref=myroutebuilder/ /camel:camelContext /bean bAnd here is my StockRouteBuilder class:* public class StockRouteBuilder extends RouteBuilder{ @Override public void configure() throws Exception { System.out.println(Inside Configure); from(cxf:bean:pleaseRoute) .convertBodyTo(StockBean.class) .setHeader(Exchange.FILE_NAME, constant(request-${date:now:-MM-dd-HHmmssSSS})) .wireTap(file://target/inbox/) .to(file://outbox/); } } And this is the error i am getting. I am using fuse 4.4.1 and camel 2.8.1 org.apache.camel.RuntimeCamelException: org.apache.cxf.service.factory.ServiceConstructionException: Could not resolve a binding for null at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1149)[83:org.apache.camel.camel-core:2.8.0.fuse-00-08] at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:108)[89:org.apache.camel.camel-spring:2.8.0.fuse-00-08] at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:240)[89:org.apache.camel.camel-spring:2.8.0.fuse-00-08] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)[69:org.springframework.context:3.0.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)[69:org.springframework.context:3.0.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)[69:org.springframework.context:3.0.5.RELEASE] at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235)[75:org.springframework.osgi.core:1.2.1] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358)[75:org.springframework.osgi.core:1.2.1] at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[75:org.springframework.osgi.core:1.2.1] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[75:org.springframework.osgi.core:1.2.1] at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)[78:org.springframework.osgi.extender:1.2.1] at java.lang.Thread.run(Thread.java:662)[:1.6.0_24] Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Could not resolve a binding for null at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:350)[399:org.apache.cxf.bundle:2.4.2.fuse-00-08] at
Re: http://repository.apache.org does NOT respond
Try again? There are some bits of Apache infra that were/are down this morning. On Wed, Nov 2, 2011 at 8:28 AM, bvahdat babak.vah...@swissonline.ch wrote: Hi, while trying to do mvn install -Pfastinstall on the trunk I'm blocked as it hangs on ... ... ... Downloading: http://repository.apache.org/snapshots/org/apache/camel/camel-buildtools/2.9-SNAPSHOT/maven-metadata.xml Just wonder if I'm the only one having this problem right now. On the other hand the central repos http://repo1.maven.apache.org/maven2 http://repo2.maven.apache.org/maven2 seem to be O.K. Regards, Babak -- View this message in context: http://camel.465427.n5.nabble.com/http-repository-apache-org-does-NOT-respond-tp4957786p4957786.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: recipientList inside SEDA route with CXF
FYI created https://issues.apache.org/jira/browse/CAMEL-4503 for the recipient list bug and Achim is trying out another approach to workaround this issue. On Thu, Sep 29, 2011 at 11:46 AM, Achim Nierbeck bcanh...@googlemail.comwrote: I did take a look at the sources and I think I found the root of my problem, though I'm not sure how to get around it: RecipientList class contains a producer cache, in this cache the RecipientListProcessor class does store the endpoints depending on the uri as key. Now since only my header changes I don't know how to get around this. Any ideas? Thanks in advance, Achim 2011/9/29 Achim Nierbeck bcanh...@googlemail.com: Ok, some more worrying details. Right now I have two Remote Hosts After a successful run on Host A a second run is done (not parallel but sequential) on Host B. And I'm able to see that the header.address is set to host B still I see that the request is made on Host A. Is this intentional, are there any ways of not remembering which call did go to which Host? Thanks again, Achim 2011/9/29 Achim Nierbeck bcanh...@googlemail.com: Hi using Camel 2.8.0 I'm having the following scenario. I'm using the CXF for connecting to a couple .NET Webservices. !-- CXF config -- cxf:cxfEndpoint id=productionServer serviceClass=net.testservices.productionservice._2011_07.IService endpointName=s:basicHttpProductionService serviceName=s:ProductionService wsdlURL=classpath:/wsdl/_1.wsdl xmlns:s= http://tempuri.org/; xmlns:a= http://schemas.microsoft.com/2003/10/Serialization/Arrays; xmlns:i=http://www.w3.org/2001/XMLSchema-instance; cxf:properties entry key=dataFormat value=POJO / /cxf:properties cxf:outInterceptors ref bean=loggingOutInterceptor / /cxf:outInterceptors /cxf:cxfEndpoint Now I have a route for looking up some data in the DB for example also looking for a free WebService to call: camel:route id=pollQueue camel:from uri=timer://pollQueueTimer?fixedRate=trueamp;period=3 / ... do preparation ... also set the address of the remote host into the header of the exchange ... ... call the production route ... camel:to uri=seda:production / /camel:route the production route does call the Webservice on the available remote host as follows ... again a couple of preparations beforehand !-- Altering Body to contain no data -- camel:setBody camel:mvel[ ]/camel:mvel /camel:setBody !-- service call -- camel:setHeader headerName=operationName camel:constantProduceData/camel:constant /camel:setHeader ... the address of the remote webservice was previously added to the header in the starting route ... ... I needed to set the parallelProcessing to true, if not everything fails because the Timer Route tries to start another recipientList ... camel:recipientList parallelProcessing=true camel:simplecxf:bean:productionServer?address=${header.address}/camel:simple /camel:recipientList ... some more calls checking data, errorhandling and so forth Now the following happened to me when I had more than one Remote Host available: Calls to Host A did run on Host B Results expecting to be retrieved from Host A where polled from Host B. Now I wonder if the calls to certain Methods are cached or if the re-running timmer route does interfere somehow with the already running route. A Complete run of a route can take up to about 30 Minutes after that the Production-Route is done. Since there are multiple hosts available we want to do parallel processing. Any hints are welcome, Achim -- -- *Achim Nierbeck* Apache Karaf http://karaf.apache.org/ Committer PMC OPS4J Pax Web http://wiki.ops4j.org/display/paxweb/Pax+Web/ Committer Project Lead blog http://notizblog.nierbeck.de/ -- -- *Achim Nierbeck* Apache Karaf http://karaf.apache.org/ Committer PMC OPS4J Pax Web http://wiki.ops4j.org/display/paxweb/Pax+Web/ Committer Project Lead blog http://notizblog.nierbeck.de/ -- -- *Achim Nierbeck* Apache Karaf http://karaf.apache.org/ Committer PMC OPS4J Pax Web http://wiki.ops4j.org/display/paxweb/Pax+Web/ Committer Project Lead blog http://notizblog.nierbeck.de/ -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in
Re: Configuring multicasts broker
You need to pass a discovery broker URI to the ConnectionFactory: http://activemq.apache.org/discovery-transport-reference.html On Fri, Sep 16, 2011 at 9:06 AM, Muhammad Ichsan ich...@gmail.com wrote: I set up many ActiveMQ brokers using this: transportConnector uri=tcp://localhost:0 discoveryUri=multicast://default/ How to configure Camel to connect to the cluster? Because ports the brokers listen to is vary (not fixed). I'm new to clustering. Thanks -- ~The best men are men who benefit to others http://michsan.web.id 一緒に勉強しましょう! Yang berkualitas memang beda rasanya! http://rizqi-cookies.com -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: how to run and use the web-module?
Some info on the web console is here: http://camel.apache.org/web-console.html On Fri, Aug 26, 2011 at 7:41 AM, xiangqiuzhao xiangqiuz...@gmail.comwrote: i have see the camel source with camel-web-standalone components, but can't find the document about it on apache. how to monitor and control the route or endpoint? -- View this message in context: http://camel.465427.n5.nabble.com/how-to-run-and-use-the-web-module-tp4737628p4737628.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: Cipher type definable?
Don't think there is an option for that. You'll have to manually configure a JSch instance with the ciphers you want. Cheers, Jon On Thu, Aug 25, 2011 at 10:58 AM, laxad dax2...@rogers.com wrote: I am using SFTP component and my new requirement is to specify the type of cipher going to be used for the transfer. I checked the FTP2 page on camel website but there is no option for cipher strength. Is this an option that is going to be included in the later releases of camel? Thanks. -- View this message in context: http://camel.465427.n5.nabble.com/Cipher-type-definable-tp4734500p4734500.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: Cipher type definable?
Yeah, there is no option for this so I've created https://issues.apache.org/jira/browse/CAMEL-4382 to track this enhancement. On Thu, Aug 25, 2011 at 2:16 PM, Jon Anstey jans...@gmail.com wrote: Don't think there is an option for that. You'll have to manually configure a JSch instance with the ciphers you want. Cheers, Jon On Thu, Aug 25, 2011 at 10:58 AM, laxad dax2...@rogers.com wrote: I am using SFTP component and my new requirement is to specify the type of cipher going to be used for the transfer. I checked the FTP2 page on camel website but there is no option for cipher strength. Is this an option that is going to be included in the later releases of camel? Thanks. -- View this message in context: http://camel.465427.n5.nabble.com/Cipher-type-definable-tp4734500p4734500.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: Cipher type definable?
FYI I've adding this as the ciphers URI option for the SFTP component. Some documentation is available here https://cwiki.apache.org/confluence/display/CAMEL/FTP2 It will be available in Camel 2.9. On Thu, Aug 25, 2011 at 2:19 PM, Jon Anstey jans...@gmail.com wrote: Yeah, there is no option for this so I've created https://issues.apache.org/jira/browse/CAMEL-4382 to track this enhancement. On Thu, Aug 25, 2011 at 2:16 PM, Jon Anstey jans...@gmail.com wrote: Don't think there is an option for that. You'll have to manually configure a JSch instance with the ciphers you want. Cheers, Jon On Thu, Aug 25, 2011 at 10:58 AM, laxad dax2...@rogers.com wrote: I am using SFTP component and my new requirement is to specify the type of cipher going to be used for the transfer. I checked the FTP2 page on camel website but there is no option for cipher strength. Is this an option that is going to be included in the later releases of camel? Thanks. -- View this message in context: http://camel.465427.n5.nabble.com/Cipher-type-definable-tp4734500p4734500.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: Maven dependencies for camel-ftp
What was the error message and what Camel version are you using? camel-ftp shouldn't require camel-spring. On Tue, Aug 23, 2011 at 12:45 PM, Tristan23 tristanlst...@gmail.com wrote: I made a simple example using Camels FTP component. For that I added artifactIdcamel-ftp/artifactId to my pom.xml file. Unfortunately when running the code I got some strange error messages. What solved the problem was adding an additional line to my pom.xml file: artifactIdcamel-spring/artifactId Question: Why does Maven not automatically add this dependency when using camel-ftp ? cheers, T. -- View this message in context: http://camel.465427.n5.nabble.com/Maven-dependencies-for-camel-ftp-tp4727138p4727138.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: Strange behavior of Camel-Bindy and windows
Hi Achim, This could be a Windows only problem occurring... but you could try putting a convertBodyTo type=java.lang.String/ before the unmarshal to see if loading the file content into memory will workaround this. Cheers, Jon On Fri, Aug 5, 2011 at 12:11 PM, Achim Nierbeck bcanh...@googlemail.comwrote: Hi I do have a very strange behavior with camel 2.8 and the camel-bindy module on my windows machine. My camel route is quite straight forward camel:route id=readBrandConfig camel:from ref=fileEndpoint / camel:unmarshal ref=bindyDataformat / camel:convertBodyTo type=myentity.entity.Dummy / camel:to id=storeEntity uri=jpa://myentity.entity.Dummy / camel:to uri=mock:test / /camel:route Now while debugging I'm in the class BindyCsvDataFormat running through the unmarshall method. after the Scanner class is created with the given InputStreamReader the scanner obect looks good. There is no entry for the lastException field inside of the scanner object. After the while loop with scanner.hasNextLine() the scanner object contains a lastException which is IOException telling me that the file is locked by another process. Now I used the SysInternals handle exec to give me a clue which process does take a hold on this file that is supposed to be unmarshalled. It shows me that my java executable does take a hold on my csv file twice. I guess this is the problem but how can I get around it? Thanx, Achim -- Apache Karaf http://karaf.apache.org/ Committer PMC OPS4J Pax Web http://wiki.ops4j.org/display/paxweb/Pax+Web/ Committer Project Lead blog http://notizblog.nierbeck.de/ -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: How print header without square brackets
The brackets are there I'm guessing because your file_header header is some sort of Java collection? You can most likely do an inline trim or substring using another scripting language instead of simple - Groovy for example http://camel.apache.org/groovy.html. But it would be just as easy to create a simple bean or processor for this IMO. Cheers, Jon On Thu, Aug 4, 2011 at 3:40 PM, ruangerm ruang...@gmail.com wrote: Hi all, I need to send a text message response to a JMS queuethat contains an existing header (file_header) value (in this case something like B,S,3,10) in the outgoing body . So the response needs to look something like this: B,S,3,10 2,2,3,4,List 2,BList2 2,2,3,4,List 3,BList3 ... I am using the following to construct the response: transform(simple(${header.file_header}\n${body})).to(jms: However, the output is being created like this on my JMS queue [B,S,3,10] 2,2,3,4,List 2,BList2 2,2,3,4,List 3,BList3 Is it possible to have the brackets removed without having to revert to some kind of string manipulation in Java in a process/bean? Any help is appreciated greatly. Regards Ruan -- View this message in context: http://camel.465427.n5.nabble.com/How-print-header-without-square-brackets-tp4667349p4667349.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: camel-example-cxf-proxy need help
Some more context from the logs would help like maybe the full stack trace so we can see which bit is failing. Cheers, Jon On Thu, Aug 4, 2011 at 4:22 PM, chandraprabha chandrapra...@gmail.comwrote: Hi All, Please help . I am using the camel-example-cxf-proxy profile with fuse camel . I deployed it as it on servicemix 4 and it works fine . Now i want to modify it to call my external webservice. Changes i did are : 1. Modified camel-config.xml to realwebservice url with my external webservice url 2.Modified the wsdl 3.Modified RealWebServiceBean with my real service url 4.Modiffied this ReportIncidentEndpointService to implement the my SEI when i run i get Starting real webservice Fatal Error :-1:-1: Premature end of file. -- View this message in context: http://camel.465427.n5.nabble.com/camel-example-cxf-proxy-need-help-tp4667517p4667517.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: To set client authentication false in SSL communication using Camel-netty 2.6
Good idea. I've created https://issues.apache.org/jira/browse/CAMEL-4303 to track this. On Wed, Aug 3, 2011 at 3:59 AM, Claus Ibsen claus.ib...@gmail.com wrote: On Mon, Aug 1, 2011 at 6:02 PM, Jon Anstey jans...@gmail.com wrote: Most likely this was just the most common configuration used. Setting the auth required to false is possible though. To do this you'll need to set the sslHandler property on the producer URI. For example: ...to(netty:tcp://localhost:12345?sslHandler=#myHandler); You can see how the default SSL handler is created in here http://svn.apache.org/repos/asf/camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultClientPipelineFactory.java http://svn.apache.org/repos/asf/camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultClientPipelineFactory.java Cheers, Jon Maybe we should create a JIRA to make it easier for end users to set that option to true|false ? On Mon, Aug 1, 2011 at 9:43 AM, Sachin sachin2...@gmail.com wrote: Hi, Is there any specific reason to hard code the client authentication to true. In SSLEngineFactory class i found below: serverEngine.setNeedClientAuth(true); I have a specific requirement to send message from a java client which i need not to be authenticated. Please suggest if it's possible. Regards Sachin -- View this message in context: http://camel.465427.n5.nabble.com/To-set-client-authentication-false-in-SSL-communication-using-Camel-netty-2-6-tp4654878p4654878.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/ -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: Can't use jersey library classes within processor
Make sure you are using m2eclipse as well. Like Willem said, adding a dependency to your pom.xml file will get the lib added to the project classpath. A good m2eclipse reference is here http://www.sonatype.com/books/m2eclipse-book/reference/ Cheers, Jon On Tue, Aug 2, 2011 at 4:32 AM, Willem Jiang willem.ji...@gmail.com wrote: You are using maven, please update the jersey dependency in the pom. It has nothing to do with your eclipse project build path. On Tue Aug 2 14:14:25 2011, dead_devil_66 wrote: Greetings. I had a similar issue with activemq and httpservlet, that, until now, stayed unsolved, in the activemq forum. Now, its camel and jersey classes. This is what its going on: this is my code: http://pastie.org/2307602 I have already included the jersey jar in the eclipse project buildpath. But, when i start the router, this is what i get, in the console: http://pastie.org/2307614 But, as i said, i included the jar in the buildpath! Im really lost in here. :/ -- View this message in context: http://camel.465427.n5.nabble.** com/Can-t-use-jersey-library-**classes-within-processor-** tp4657633p4657633.htmlhttp://camel.465427.n5.nabble.com/Can-t-use-jersey-library-classes-within-processor-tp4657633p4657633.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Willem --** FuseSource Web: http://www.fusesource.com Blog: http://willemjiang.blogspot.**comhttp://willemjiang.blogspot.com(English) http://jnn.javaeye.com (Chinese) Twitter: willemjiang Weibo: willemjiang -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: To set client authentication false in SSL communication using Camel-netty 2.6
Most likely this was just the most common configuration used. Setting the auth required to false is possible though. To do this you'll need to set the sslHandler property on the producer URI. For example: ...to(netty:tcp://localhost:12345?sslHandler=#myHandler); You can see how the default SSL handler is created in here http://svn.apache.org/repos/asf/camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultClientPipelineFactory.java http://svn.apache.org/repos/asf/camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultClientPipelineFactory.java Cheers, Jon On Mon, Aug 1, 2011 at 9:43 AM, Sachin sachin2...@gmail.com wrote: Hi, Is there any specific reason to hard code the client authentication to true. In SSLEngineFactory class i found below: serverEngine.setNeedClientAuth(true); I have a specific requirement to send message from a java client which i need not to be authenticated. Please suggest if it's possible. Regards Sachin -- View this message in context: http://camel.465427.n5.nabble.com/To-set-client-authentication-false-in-SSL-communication-using-Camel-netty-2-6-tp4654878p4654878.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: maxConcurrentConsumers and idling
That looks like a new property in Spring 3... we should add that option to camel-jms but for now you should be able to make your own custom JmsConfiguration class (extending the Camel JmsConfiguration one) and override configureMessageListenerContainer to set up your idleConsumerLimit value. You can use a custom JmsConfiguration like this: bean id=jmsConfig class=com.foo.MyJmsConfiguration property name=connectionFactory ref=jmsConnectionFactory/ property name=idleConsumerLimit value=10/ property name=concurrentConsumers value=2/ property name=maxConcurrentConsumers value=20/ /bean bean id=activemq class=org.apache.activemq.camel.component.ActiveMQComponent property name=configuration ref=jmsConfig/ /bean Cheers, Jon On Mon, Aug 1, 2011 at 2:22 PM, Tommy Chheng tommy.chh...@gmail.com wrote: Looking at http://bsnyderblog.blogspot.com/2010/05/tuning-jms-message-consumption-in.html , it looks like the setting i need is idleConsumerLimit idleConsumerLimit property specifies the limit on the number of idle consumers I think this means that after the message volume decreases, the consumers will become idle and thus be limited to this parameter. Unfortunately, I get a Unknown parameters=[{idleConsumerLimit=10}] when i use it in the activemq connection for camel. I notice this is parameter is not listed in http://camel.apache.org/jms.html Is this the right parameter or is there a workaround? On Mon, Aug 1, 2011 at 8:56 AM, Claus Ibsen claus.ib...@gmail.com wrote: On Mon, Aug 1, 2011 at 5:12 PM, Tommy Chheng tommy.chh...@gmail.com wrote: I'm using camel 2.7.2 and connecting to an ActiveMQ queue with concurrentConsumers=2maxConcurrentConsumers=20 Should the current # of concurrent consumers dynamically adjust due to message volume from activemq? At the start, when there are 0 messages, the # of consumers is 2. When I have a large volume, the # of consumers goes up to 20, but after the volume goes back to 0, the current # of consumers still remain at 20. The threads should have a idel time, that after X period should cause them to terminate. Check the spring documentation as its the spring-jms message listener container, that is used when consuming messages. I'm checking the # of consumers using the activemq web console. Any ideas how to make the # of consumers go back to 2 when there's no volume? -- @tommychheng http://tommy.chheng.com -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/ -- @tommychheng http://tommy.chheng.com -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: maxConcurrentConsumers and idling
FYI idleConsumerLimit will be configurable in the next release of Camel (2.9) see https://issues.apache.org/jira/browse/CAMEL-4290 On Mon, Aug 1, 2011 at 2:41 PM, Claus Ibsen claus.ib...@gmail.com wrote: Hi Tommy Fell free to create a JIRA ticket as I there may be new/missing options from DMLC that we have not exposed in camel-jms yet. http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/jms/listener/DefaultMessageListenerContainer.html On Mon, Aug 1, 2011 at 6:52 PM, Tommy Chheng tommy.chh...@gmail.com wrote: Looking at http://bsnyderblog.blogspot.com/2010/05/tuning-jms-message-consumption-in.html , it looks like the setting i need is idleConsumerLimit idleConsumerLimit property specifies the limit on the number of idle consumers I think this means that after the message volume decreases, the consumers will become idle and thus be limited to this parameter. Unfortunately, I get a Unknown parameters=[{idleConsumerLimit=10}] when i use it in the activemq connection for camel. I notice this is parameter is not listed in http://camel.apache.org/jms.html Is this the right parameter or is there a workaround? On Mon, Aug 1, 2011 at 8:56 AM, Claus Ibsen claus.ib...@gmail.com wrote: On Mon, Aug 1, 2011 at 5:12 PM, Tommy Chheng tommy.chh...@gmail.com wrote: I'm using camel 2.7.2 and connecting to an ActiveMQ queue with concurrentConsumers=2maxConcurrentConsumers=20 Should the current # of concurrent consumers dynamically adjust due to message volume from activemq? At the start, when there are 0 messages, the # of consumers is 2. When I have a large volume, the # of consumers goes up to 20, but after the volume goes back to 0, the current # of consumers still remain at 20. The threads should have a idel time, that after X period should cause them to terminate. Check the spring documentation as its the spring-jms message listener container, that is used when consuming messages. I'm checking the # of consumers using the activemq web console. Any ideas how to make the # of consumers go back to 2 when there's no volume? -- @tommychheng http://tommy.chheng.com -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/ -- @tommychheng http://tommy.chheng.com -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/ -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: Is ActiveMQComponent automatically pooled?
Looks like org.apache.activemq.pool.PooledConnectionFactory is used by default if you don't override the connectionFactory property. Cheers, Jon On Wed, Jul 20, 2011 at 12:24 PM, Brendan Long bren...@realgo.com wrote: The ActiveMQ section of the help isn't clear on this. In one of the examples, it looks like this: bean id=activemq class=org.apache.activemq.camel.component.ActiveMQComponent property name=brokerURL value=tcp://somehost:61616/ /bean Just giving the brokerURL. Later on we get this (PooledConnectionFactory): bean id=pooledConnectionFactory class=org.apache.activemq.pool.PooledConnectionFactory property name=maxConnections value=8 / property name=maximumActive value=500 / property name=connectionFactory ref=jmsConnectionFactory / /bean bean id=jmsConfig class=org.apache.camel.component.jms.JmsConfiguration property name=connectionFactory ref=pooledConnectionFactory/ property name=transacted value=false/ property name=concurrentConsumers value=10/ /bean bean id=activemq class=org.apache.activemq.camel.component.ActiveMQComponent property name=configuration ref=jmsConfig/ /bean My question is what kind of ConnectionFactory is used by default if we just give the brokerURL? Is it just the standard ActiveMQConnectionFactory? The documentation seems to imply this, but then at the end we get this: ActiveMQ 4.x For this version you must use the JMS http://camel.apache.org/jms.html component instead. Please be careful to use a pooling connection factory as described in the JmsTemplate Gotchas http://activemq.apache.org/jmstemplate-gotchas.html Which seems to imply that the connection factory is pooled automatically for ActiveMQ 5 + ActiveMQComponent. Can someone clear this up (making it more clear in the docs would be helpful in the future too). -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: XML to XSLT in camel using Queue's
If you want to send an element to a queue, you can just use xpath something like from(file:/path/to/my/files).setBody().xpath(/foo/bar).to(jms:queue:myQueue); that will take the bar element and send that to myQueue. For information about using Camel in a blueprint container see http://camel.apache.org/using-osgi-blueprint-with-camel.html and also there is an example in ServiceMix http://svn.apache.org/repos/asf/servicemix/smx4/features/trunk/examples/camel-blueprint/ Cheers, Jon On Mon, Jul 4, 2011 at 4:14 AM, Gnanaguru S gnanaguru.sattanat...@wipro.com wrote: Hi I want to send the value or a element from a xml file to a queue . I want to do with camel-blueprint. Help me out Cheers Guru -- View this message in context: http://camel.465427.n5.nabble.com/XML-to-XSLT-in-camel-using-Queue-s-tp4549136p4549136.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: ProducerTemplate is not started
What version of Camel are you using? Wondering if you are using a SNAPSHOT such that the code may have changed since Friday :) On Mon, Jul 4, 2011 at 8:43 AM, ctapobep stanislav.bashkirt...@gmail.comwrote: Dunno why, but from time to time my integration tests fail with: /java.lang.IllegalStateException: ProducerTemplate has not been started at org.apache.camel.impl.DefaultProducerTemplate.getProducerCache(DefaultProducerTemplate.java:674) at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:114) at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:101)/ Have no slightest clue what's wrong.. On Friday everything seemed to work. Monday ruines peoples lives.. -- View this message in context: http://camel.465427.n5.nabble.com/ProducerTemplate-is-not-started-tp4549701p4549701.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: why i building camel2.7.2 use maven install error?
FYI I can build Camel trunk fine with IBM JDK 1.6.0 on Linux. So least that platform works :) janstey@duffman:/x1/asf/camel/trunk$ mvn --version Apache Maven 3.0.2 (r1056850; 2011-01-08 21:28:10-0330) Java version: 1.6.0, vendor: IBM Corporation Java home: /opt/ibm-java-i386-60/jre Default locale: en_CA, platform encoding: UTF-8 OS name: linux, version: 2.6.32-27-generic, arch: x86, family: unix On Wed, Jun 29, 2011 at 11:49 AM, Claus Ibsen claus.ib...@gmail.com wrote: Its likely not only IBM JDKs. HP-UX has been know to have compiling issues as well. Well we can always blame sun for creating the crappy confusing generics. I guess the compiler engineers dont even get generics right as well. The work around I have seen was to add a type cast to the super type ProcessorDefinition def = (ProcessorDefinition) processorType And then do that instacenof check afterwards. So something like ProcessorDefinition def = (ProcessorDefinition) processorType; if (def instanceof LoadBalanceDefinition) { On Wed, Jun 29, 2011 at 4:05 PM, bvahdat babak.vah...@swissonline.ch wrote: Hi Claus, I suspect xiangqiuzhao uses the IBM-JDK6 which has this issue, @xiangqiuzhao is this really the case? I used to experience exactly the same problem while using IBM-JDK, however since moving to SUN-JDK the problem is resolved for me. On my box if I set JAVA_HOME to IBM's JDK, then 'mvn clean compile' on 'camel-core' comes up with (same as for xiangqiuzhao): [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default compile) on project camel-core: Compilation failure [ERROR] \Data\eclipse-workspace\camel-trunk\camel-core\src\main\java\org\apache\camel\model\LoadBalanceDefinition.java:[134,16] inconvertible types [ERROR] found : org.apache.camel.model.ProcessorDefinitionlt;capture#945 of ?gt; [ERROR] required: org.apache.camel.model.LoadBalanceDefinition Where 'mvn -version' says: Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100) Maven home: P:\My Documents\dev\env\apache-maven-3.0.3\bin\.. Java version: 1.6.0, vendor: IBM Corporation Java home: C:\Program Files\IBM\SDP75\jdk\jre Default locale: de_CH, platform encoding: Cp1252 OS name: windows xp, version: 5.1 build 2600 service pack 3, arch: x86, family: windows If one would change the line 134 on LoadBalanceDefinition from: if (processorType instanceof LoadBalanceDefinition) { To: if (LoadBalanceDefinition.class.isInstance(processorType)) { Then the compilation would pass on this class. I didn't find anything about this issue on http://camel.apache.org/does-camel-work-on-ibms-jdk.html Regards, Babak PS: actually there're more compilation issues while using IBM-JDK -- View this message in context: http://camel.465427.n5.nabble.com/why-i-building-camel2-7-2-use-maven-install-error-tp4532013p4535242.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/ -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: why i building camel2.7.2 use maven install error?
Yeah, I built with mvn clean install -Dtest= Trying now without the -Dtest= On Thu, Jun 30, 2011 at 11:50 AM, Daniel Kulp dk...@apache.org wrote: On Thursday, June 30, 2011 11:29:00 AM Jon Anstey wrote: FYI I can build Camel trunk fine with IBM JDK 1.6.0 on Linux. So least that platform works :) janstey@duffman:/x1/asf/camel/trunk$ mvn --version Apache Maven 3.0.2 (r1056850; 2011-01-08 21:28:10-0330) Java version: 1.6.0, vendor: IBM Corporation Java home: /opt/ibm-java-i386-60/jre Default locale: en_CA, platform encoding: UTF-8 OS name: linux, version: 2.6.32-27-generic, arch: x86, family: unix Even from a clean? For me, a mvn clean install would fail with strange errors and such: Apache Maven 3.0.3 (r1075438; 2011-02-28 12:31:09-0500) Maven home: /opt/tools/maven Java version: 1.6.0, vendor: IBM Corporation Java home: /opt/ibm-jdk-bin-1.6.0.8_p1/jre Default locale: en_US, platform encoding: ANSI_X3.4-1968 OS name: linux, version: 2.6.39, arch: amd64, family: unix Dan On Wed, Jun 29, 2011 at 11:49 AM, Claus Ibsen claus.ib...@gmail.com wrote: Its likely not only IBM JDKs. HP-UX has been know to have compiling issues as well. Well we can always blame sun for creating the crappy confusing generics. I guess the compiler engineers dont even get generics right as well. The work around I have seen was to add a type cast to the super type ProcessorDefinition def = (ProcessorDefinition) processorType And then do that instacenof check afterwards. So something like ProcessorDefinition def = (ProcessorDefinition) processorType; if (def instanceof LoadBalanceDefinition) { On Wed, Jun 29, 2011 at 4:05 PM, bvahdat babak.vah...@swissonline.ch wrote: Hi Claus, I suspect xiangqiuzhao uses the IBM-JDK6 which has this issue, @xiangqiuzhao is this really the case? I used to experience exactly the same problem while using IBM-JDK, however since moving to SUN-JDK the problem is resolved for me. On my box if I set JAVA_HOME to IBM's JDK, then 'mvn clean compile' on 'camel-core' comes up with (same as for xiangqiuzhao): [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default compile) on project camel-core: Compilation failure [ERROR] \Data\eclipse-workspace\camel-trunk\camel-core\src\main\java\org\apache\ camel\model\LoadBalanceDefinition.java:[134,16] inconvertible types [ERROR] found : org.apache.camel.model.ProcessorDefinitionlt;capture#945 of ?gt; [ERROR] required: org.apache.camel.model.LoadBalanceDefinition Where 'mvn -version' says: Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100) Maven home: P:\My Documents\dev\env\apache-maven-3.0.3\bin\.. Java version: 1.6.0, vendor: IBM Corporation Java home: C:\Program Files\IBM\SDP75\jdk\jre Default locale: de_CH, platform encoding: Cp1252 OS name: windows xp, version: 5.1 build 2600 service pack 3, arch: x86, family: windows If one would change the line 134 on LoadBalanceDefinition from: if (processorType instanceof LoadBalanceDefinition) { To: if (LoadBalanceDefinition.class.isInstance(processorType)) { Then the compilation would pass on this class. I didn't find anything about this issue on http://camel.apache.org/does-camel-work-on-ibms-jdk.html Regards, Babak PS: actually there're more compilation issues while using IBM-JDK -- View this message in context: http://camel.465427.n5.nabble.com/why-i-building-camel2-7-2-use-maven-in stall-error-tp4532013p4535242.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/ -- Daniel Kulp dk...@apache.org http://dankulp.com/blog Talend - http://www.talend.com -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: example app to embed camel-web-console
Now it depends on what jar you are talking about but in general since a WAR classloader is flat, you can't have two versions of the same class... so you will either have to find some way of using the same version of this jar in your application as Camel uses or separate this into 2 WARs. On Fri, Jun 24, 2011 at 12:05 PM, fachhoch fachh...@gmail.com wrote: It worked well in the test application, I tried in my actual application It failed with no such method error, because camel and my application both had the same jar with different version , so what is the solution for this ? I mean both wars might have same jars with differnt version and obviously it lead to probelms os how to what do you suggest ? -- View this message in context: http://camel.465427.n5.nabble.com/example-app-to-embed-camel-web-console-tp4512075p4521186.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: Custom exclusiveReadLockStrategy in Servicemix + Camel
Hmmm.. not sure without looking at your app. Maybe create a new ticket ( https://issues.apache.org/jira/browse/CAMEL) and attach a zip of your project? Cheers, Jon On Fri, Jun 24, 2011 at 10:37 AM, Laurentiu Trica laurentiu.tr...@moredevs.ro wrote: Hello, I tried using the same version but it doesn't work either. Any other ideas? On Thu, Jun 23, 2011 at 4:28 PM, Jon Anstey jans...@gmail.com wrote: Are you using the same exact version of Camel in your pom.xml and SMX install? On Thu, Jun 23, 2011 at 2:15 PM, Laurentiu Trica laurentiu.tr...@moredevs.ro wrote: Hi everyone, I have a problem using the exclusiveReadLockStrategy for Ftp2 component. I implemented the GenericFileExclusiveReadLockStrategy interface in my class and imported the bean in the DSL and then specified the exclusiveReadLockStrategy=#mybean on the FTP component URI (like I saw here: http://camel.465427.n5.nabble.com/How-to-Use-exclusiveReadLockStrategy-property-in-file-component-td604330.html ) The problem is I get this error: javax.jbi.JBIException: java.lang.Exception: Error deploying SU msp-endpoints-ftp-test at org.apache.servicemix.jbi.deployer.impl.ServiceAssemblyInstaller.install(ServiceAssemblyInstaller.java:101)[93:org.apache.servicemix.jbi.deployer:1.4.0.fuse-01-09] at org.apache.servicemix.jbi.deployer.impl.Deployer.onBundleStarted(Deployer.java:334)[93:org.apache.servicemix.jbi.deployer:1.4.0.fuse-01-09] at org.apache.servicemix.jbi.deployer.impl.Deployer.bundleChanged(Deployer.java:264)[93:org.apache.servicemix.jbi.deployer:1.4.0.fuse-01-09] at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:919)[osgi-3.6.0.v20100517.jar:] at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)[osgi-3.6.0.v20100517.jar:] at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149)[osgi-3.6.0.v20100517.jar:] at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEventPrivileged(Framework.java:1349)[osgi-3.6.0.v20100517.jar:] at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1300)[osgi-3.6.0.v20100517.jar:] at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:380)[osgi-3.6.0.v20100517.jar:] at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)[osgi-3.6.0.v20100517.jar:] at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1136)[6:org.apache.felix.fileinstall:3.0.2] at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1122)[6:org.apache.felix.fileinstall:3.0.2] at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1115)[6:org.apache.felix.fileinstall:3.0.2] at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:433)[6:org.apache.felix.fileinstall:3.0.2] at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:241)[6:org.apache.felix.fileinstall:3.0.2] Caused by: java.lang.Exception: Error deploying SU msp-endpoints-ftp-test at org.apache.servicemix.jbi.deployer.impl.ServiceAssemblyInstaller.deploySUs(ServiceAssemblyInstaller.java:213)[93:org.apache.servicemix.jbi.deployer:1.4.0.fuse-01-09] at org.apache.servicemix.jbi.deployer.impl.ServiceAssemblyInstaller.install(ServiceAssemblyInstaller.java:85)[93:org.apache.servicemix.jbi.deployer:1.4.0.fuse-01-09] ... 14 more Caused by: javax.jbi.management.DeploymentException: component-task-result xmlns=http://java.sun.com/xml/ns/jbi/management-message; component-nameservicemix-camel/component-name component-task-result-details task-result-details task-iddeploy/task-id task-resultFAILED/task-result message-typeERROR/message-type task-status-msgmsg-loc-infoloc-token/loc-messageCould not deploy xbean service unit/loc-message/msg-loc-info/task-status-msg exception-info nesting-level1/nesting-level msg-loc-info loc-token / loc-messageorg.apache.camel.FailedToCreateRouteException: Failed to create route route24: Route[[From[ftp://ftp-test@/MSP-ORDERS-TEST?pas... because of Failed to resolve endpoint: ftp://ftp-test @/MSP-ORDERS-TEST?binary=trueexclusiveReadLockStrategy=%23lockStrategymove=.archivemoveFailed=.errorpassword= due to: Could not find a suitable setter for property: exclusiveReadLockStrategy as there isn't a setter method with same type: de.edigrid.maspero.FtpChangedLockStrategy nor type conversion possible: No type converter available to convert from type: de.edigrid.maspero.FtpChangedLockStrategy to the required type
Re: Custom exclusiveReadLockStrategy in Servicemix + Camel
Are you using the same exact version of Camel in your pom.xml and SMX install? On Thu, Jun 23, 2011 at 2:15 PM, Laurentiu Trica laurentiu.tr...@moredevs.ro wrote: Hi everyone, I have a problem using the exclusiveReadLockStrategy for Ftp2 component. I implemented the GenericFileExclusiveReadLockStrategy interface in my class and imported the bean in the DSL and then specified the exclusiveReadLockStrategy=#mybean on the FTP component URI (like I saw here: http://camel.465427.n5.nabble.com/How-to-Use-exclusiveReadLockStrategy-property-in-file-component-td604330.html ) The problem is I get this error: javax.jbi.JBIException: java.lang.Exception: Error deploying SU msp-endpoints-ftp-test at org.apache.servicemix.jbi.deployer.impl.ServiceAssemblyInstaller.install(ServiceAssemblyInstaller.java:101)[93:org.apache.servicemix.jbi.deployer:1.4.0.fuse-01-09] at org.apache.servicemix.jbi.deployer.impl.Deployer.onBundleStarted(Deployer.java:334)[93:org.apache.servicemix.jbi.deployer:1.4.0.fuse-01-09] at org.apache.servicemix.jbi.deployer.impl.Deployer.bundleChanged(Deployer.java:264)[93:org.apache.servicemix.jbi.deployer:1.4.0.fuse-01-09] at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:919)[osgi-3.6.0.v20100517.jar:] at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)[osgi-3.6.0.v20100517.jar:] at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149)[osgi-3.6.0.v20100517.jar:] at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEventPrivileged(Framework.java:1349)[osgi-3.6.0.v20100517.jar:] at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1300)[osgi-3.6.0.v20100517.jar:] at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:380)[osgi-3.6.0.v20100517.jar:] at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)[osgi-3.6.0.v20100517.jar:] at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1136)[6:org.apache.felix.fileinstall:3.0.2] at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1122)[6:org.apache.felix.fileinstall:3.0.2] at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1115)[6:org.apache.felix.fileinstall:3.0.2] at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:433)[6:org.apache.felix.fileinstall:3.0.2] at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:241)[6:org.apache.felix.fileinstall:3.0.2] Caused by: java.lang.Exception: Error deploying SU msp-endpoints-ftp-test at org.apache.servicemix.jbi.deployer.impl.ServiceAssemblyInstaller.deploySUs(ServiceAssemblyInstaller.java:213)[93:org.apache.servicemix.jbi.deployer:1.4.0.fuse-01-09] at org.apache.servicemix.jbi.deployer.impl.ServiceAssemblyInstaller.install(ServiceAssemblyInstaller.java:85)[93:org.apache.servicemix.jbi.deployer:1.4.0.fuse-01-09] ... 14 more Caused by: javax.jbi.management.DeploymentException: component-task-result xmlns=http://java.sun.com/xml/ns/jbi/management-message; component-nameservicemix-camel/component-name component-task-result-details task-result-details task-iddeploy/task-id task-resultFAILED/task-result message-typeERROR/message-type task-status-msgmsg-loc-infoloc-token/loc-messageCould not deploy xbean service unit/loc-message/msg-loc-info/task-status-msg exception-info nesting-level1/nesting-level msg-loc-info loc-token / loc-messageorg.apache.camel.FailedToCreateRouteException: Failed to create route route24: Route[[From[ftp://ftp-test@/MSP-ORDERS-TEST?pas... because of Failed to resolve endpoint: ftp://ftp-test @/MSP-ORDERS-TEST?binary=trueexclusiveReadLockStrategy=%23lockStrategymove=.archivemoveFailed=.errorpassword= due to: Could not find a suitable setter for property: exclusiveReadLockStrategy as there isn't a setter method with same type: de.edigrid.maspero.FtpChangedLockStrategy nor type conversion possible: No type converter available to convert from type: de.edigrid.maspero.FtpChangedLockStrategy to the required type: org.apache.camel.component.file.GenericFileExclusiveReadLockStrategy with value de.edigrid.maspero.FtpChangedLockStrategy@38a10fbf/loc-message stack-trace![CDATA[org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route route24: Route[[From[ftp://ftp-test@/MSP-ORDERS-TEST?pas... because of Failed to resolve endpoint: ftp://ftp-test @/MSP-ORDERS-TEST?binary=trueexclusiveReadLockStrategy=%23lockStrategymove=.archivemoveFailed=.errorpassword= due to: Could not find a suitable setter for property: exclusiveReadLockStrategy as there isn't a setter method with same type:
Re: example app to embed camel-web-console
Yeah, what Taariq suggested should work. Keep in mind that when you specify camel-web as a dependency, the maven-jetty-plugin will overlay the camel webconsole web app in your own web app and run it as one web app. You would probably have to have multiple executions of the maven-jetty-plugin in your pom to get both web apps to be independent. On Thu, Jun 23, 2011 at 2:59 PM, Taariq Levack taar...@gmail.com wrote: I would expect the following to work. http://localhost:8080/artms/routes http://localhost:8080/routes http://localhost:8080/artms/endpoints http://localhost:8080/endpoints On Thu, Jun 23, 2011 at 3:17 PM, fachhoch fachh...@gmail.com wrote: Thanks for the reply ,I emebdded camel war to my war project which I deploy using jetty-maven-plugin ,context root for my war is artms ,please tell me how to access camel console , I mean what is the url my jetty runs on 8080 so I acces my application as localhost:8080/artms what should be for camel ? -- View this message in context: http://camel.465427.n5.nabble.com/example-app-to-embed-camel-web-console-tp4512075p4517407.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: example app to embed camel-web-console
Instead of maven-jetty-plugin use the newer jetty-maven-plugin which does overlay properly plugin groupIdorg.mortbay.jetty/groupId artifactIdjetty-maven-plugin/artifactId version7.2.2.v20101205/version /plugin since this is an overlay (2 WARs merged into 1), the web.xml file from the Camel web console is overwritten by your web.xml file. I modified your web.xml file to include Camel web console: ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-namemyproject/display-name context-param param-namecontextConfigLocation/param-name param-value classpath:com/mycompany/applicationContext-camel.xml /param-value /context-param !-- There are three means to configure Wickets configuration mode and they are tested in the order given. 1) A system property: -Dwicket.configuration 2) servlet specific init-param 3) context specific context-param The value might be either development (reloading when templates change) or deployment. If no configuration is found, development is the default. -- filter filter-namewicket.myproject/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.mycompany.WicketApplication/param-value /init-param /filter filter-mapping filter-namewicket.myproject/filter-name url-pattern/*/url-pattern /filter-mapping listener listener-classorg.springframework.web.context.ContextLoaderListener/listener-class /listener filter filter-nameJersey Filter/filter-name filter-classcom.sun.jersey.spi.spring.container.servlet.SpringServlet/filter-class init-param param-namecom.sun.jersey.config.property.resourceConfigClass/param-name param-valueorg.apache.camel.web.util.CamelResourceConfig/param-value /init-param init-param param-namecom.sun.jersey.config.feature.FilterForwardOn404/param-name param-valuetrue/param-value /init-param !-- TODO scrap this when we move to latest jersey: 1.4-ea05 -- init-param param-namecom.sun.jersey.config.property.WebPageContentRegex/param-name param-value/(images|css|js)/.*/param-value /init-param init-param param-namecom.sun.jersey.config.feature.ImplicitViewables/param-name param-valuetrue/param-value /init-param init-param param-namecom.sun.jersey.config.feature.Trace/param-name param-valuetrue/param-value /init-param init-param param-namecom.sun.jersey.config.feature.Redirect/param-name param-valuetrue/param-value /init-param init-param param-namecom.sun.jersey.config.property.packages/param-name param-valueorg.apache.camel.web:/param-value /init-param init-param param-namecom.sun.jersey.config.property.WadlResourceUri/param-name param-value/api/param-value /init-param /filter filter-mapping filter-nameJersey Filter/filter-name url-pattern/*/url-pattern /filter-mapping servlet servlet-nameTemplateEngineServlet/servlet-name servlet-classorg.fusesource.scalate.servlet.TemplateEngineServlet/servlet-class load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameTemplateEngineServlet/servlet-name url-pattern*.mustache/url-pattern /servlet-mapping servlet-mapping servlet-nameTemplateEngineServlet/servlet-name url-pattern*.scaml/url-pattern /servlet-mapping servlet-mapping servlet-nameTemplateEngineServlet/servlet-name url-pattern*.ssp/url-pattern /servlet-mapping error-page error-code500/error-code location/WEB-INF/scalate/errors/500.scaml/location /error-page /web-app Your wicket app is at: http://localhost:8080/myproject/ Browse routes at: http://localhost:8080/routes Cheers, Jon On Thu, Jun 23, 2011 at 3:48 PM, fachhoch fachh...@gmail.com wrote: I dont want both the apps to be independent , I want to have camel web console in my app as a web resource, I tried http://localhost:8080/artms/routes url it did not work , so to test it in simple way I created a a wicket quickstart project added camel-web-console as dependency. this project is maven eclipse project it has jetty pluign .I attached this project. Please help me run web-console in this. http://camel.465427.n5.nabble.com/file/n4517697/myproject.zipmyproject.zip this can run using mvn jetty:run to access this in browser http://localhost:8080/myproject/ -- View this message in context: http://camel.465427.n5.nabble.com/example-app-to-embed-camel-web-console-tp4512075p4517697.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey
Re: Shutting down camel from a test!
If you just want to start a simple Camel app and then shutdown, there is no requirement to use a test case - you can just use a standard main method like in the jms-file example: http://svn.apache.org/repos/asf/camel/trunk/examples/camel-example-jms-file/src/main/java/org/apache/camel/example/jmstofile/CamelJmsToFileExample.java This uses the exec-maven-plugin to run the main method on the class with all Maven deps on the classpath. Alternatively, you can keep your Camel app running and use a Quartz endpoint to do cron-like scheduling http://camel.apache.org/quartz.html Cheers, Jon On Fri, Mar 11, 2011 at 12:14 PM, kanmisc kango...@gmail.com wrote: Hi All I have a requirement of monitoring my system and it is implemented with the help of camel sending messages often to different ports and checks for system status. When i developed, i used mvn camel:run command and executed the camel routes to send messages. But now i have to automate it by executing this camel functionality from unix cron. For this i have written a junit test which is called from cron and it triggers the camel to send messages every hour. it starts and sends messages fine but I am not able to shutdown the camel completely. I tried shutdown strategy but it is not getting shut down. Please provide suggestions - 1) Is it ok to call camel like this from a test class? Or is it possible to execute camel from unix cron directly? 2) How to shutdown the camel (i.e until next triggering of messages so that no resource consumption) Thanks in advance. -- View this message in context: http://camel.465427.n5.nabble.com/Shutting-down-camel-from-a-test-tp3425270p3425270.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: Bridging from JMS to Websphere
FYI when I was successfully using that targetClient option mentioned in the wiki, it was connecting to WMQ with the new OSGi client libs (ex com.ibm.mq.osgi.directip_7.0.1.1.jar, com.ibm.msg.client.osgi*_7.0.1.1.jar). Not sure if that makes any different here. Cheers, Jon On Fri, Mar 11, 2011 at 2:05 PM, John McDonald mcdon...@gmail.com wrote: Thanks for that Tarun I would classify my level of Camel expertise to be just about the same - perhaps 'enthusiast' too - I'm pretty impressed! Camel JMS doesnt know about it because its a WMQ feature is something I have read on several occasions now and this is consistent with your account - which is most useful background. I also came across a thread at http://camel.465427.n5.nabble.com/Camel-2-4-0-Websphere-MQ-NONJMS-Message-td3241328.htmlthat looks as though it addresses the same issue I am going to pair with a bottle of wine on this problem later - if I get a breakthrough I will let you know On 11 Mar 2011, at 17:15, Tarun Ramakrishna wrote: The error is in attempting to set that value but I am unclear why it should be. Well..I can explain the reason if not how to solve this problem specifically for the camel jms component. I probably will run into your problem in the future since we have need to post and reply using native messages to Websphere MQ, though we haven't got around to doing this yet. The reason is because legacy Websphere MQ clients cannot understand Websphere MQ JMS compliant messages. The 'native' WMQ message format was invented before the days of the JMS spec, so they needed to add another header called the MQRFH2 header to support JMS compliant messages. (for features like typed message properties, etc). Unfortunately, those legacy applications (usually on mainframes, etc) cannot parse such messages. So, one needs to tell the driver to form WMQ messages without the MQRFH2 header. This is generally done by using MQDestination.setTargetClient(JMSC.MQJMS_CLIENT_NONJMS_MQ). The value of JMS.MQJMS_CLIENT_NONJMS_MQ is 1. Additionally, if you are using the Reply-To header, you also need to call MQConnectionFactory.setTargetClientMatching(true), so that the replies do not construct the RFH2 header. I am just a Camel beginner, but it looks to me as if the camel jms component doesn't know about all this stuff.. Best Regards, Tarun -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: Dynamic URI in Java DSL
From the compoment page http://camel.apache.org/freemarker.html you can use the CamelFreemarkerResourceUri header for this: from(direct:in). setHeader(CamelFreemarkerResourceUri).constant(path/to/my/template.ftl). to(freemarker:dummy); Just use a simple expression instead of constant. Cheers, Jon On Fri, Mar 11, 2011 at 3:57 PM, stephaniswork...@gmx.de wrote: Hi all, I'm new to Camel and already searched the mailling list for this issue but couldn't find a solution for JavaDSL. I'd like to build a to URI dynamically from a value coming from the body. More concrete: I'd like to load a FreeMarker template depending on a body value. I've tried this: to(freemarker://templateHome/${body.templateName}.ftl) It seems that the URI is not evaluated. I also tried this: to(freemarker://templateHome + simple(${body.templateName}) + .ftl) But both seems not to work. Am I missing something or did I something get wrong with the simple syntax usage? Thanks in advance. Best regards Stephan -- Schon gehört? GMX hat einen genialen Phishing-Filter in die Toolbar eingebaut! http://www.gmx.net/de/go/toolbar -- Cheers, Jon --- FuseSource Email: j...@fusesource.com Web: fusesource.com Twitter: jon_anstey Blog: http://janstey.blogspot.com Author of Camel in Action: http://manning.com/ibsen
Re: IBM Websphere MQ -- Camel routes
targetClient is a WMQ option so you need to set that on the JMS destination name, not the Camel endpoint URI: ... .setHeader(CamelJmsDestinationName, constant(queue:///MY_QUEUE?targetClient=1)) .to(ibmmq:queue:MY_QUEUE?useMessageIDAsCorrelationID=true); On Tue, Feb 1, 2011 at 11:35 AM, Claus Ibsen claus.ib...@gmail.com wrote: On Tue, Feb 1, 2011 at 3:45 PM, tnk jus...@gmail.com wrote: route id=ActiveMq_to_IBM from uri=activemq:queue:RESPONSE.TEST?disableReplyTo=true / setExchangePattern pattern=InOnly / convertBodyTo type=java.lang.String / recipientList !-- simple${in.headers.RPL_TO_DST2}/simple-- simpleibmmq:queue://qmngr/queueName?targetClient=1/simple /recipientList /route I assume qmngr/queueName is something you have put to not reveal the real name? The naming of JMS destination shouldn't contain chars. Also make sure the ibmmq bean is some IBM WebSphere component. You should configure the ?targetClient=1 on the ibmmq instead. So the expression is something like this: simpleibmmq://queue:myManager/myQueue/simple There has been plenty of people around using IBM MQ with Camel. So you should be able to search and find previous talks how to do this. LOG: 17:07:04,984 | ERROR | tenerContainer-1 | EndpointMessageListener | rg.apache.camel.processor.Logger 248 | 68 - org.apache.camel.camel-core - 2.4.0 .fuse-01-00 | Caused by: [org.apache.camel.ResolveEndpointFailedException - Failed to resolve endpoint: ibmmq://queue://qmngr/queueName?targetClient=1 due to: Failed to resolve endpoint: ibmmq://queue://qmngr/queueName?targetClient=1 due to: There are 1 parameters that couldn't be set on the endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[ {targetClient=1}]] org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: ibmmq://queue://qmngr/queueName?targetClient=1 due to: Failed to resolve endpoint: ibmmq://queue://qmngr/queueName?targetClient=1 due to: There are 1 parameters that couldn't be set on th e endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[{targetClient=1}] On Tue, Feb 1, 2011 at 4:32 PM, Claus Ibsen-2 [via Camel] ml-node+3366287-1337063321-148...@n5.nabble.comml-node%2b3366287-1337063321-148...@n5.nabble.com wrote: Hi Post the route configuration for the route which is supposed to do the reply that fails with the targetClient. On Tue, Feb 1, 2011 at 3:27 PM, tnk [hidden email] wrote: Hello, I have several IBM MQ brokers, who are sending messages through MQ hub. Messages arriving to Camel have JMSReplyTo property of format queue://QManager/QueueName. I need to define two Camel routes: first route reads requests from MQ queue and puts messages to ActiveMQ (IBMMQ2ActiveMQ), and the seconds route takes response from ActiveMQ queue and sends back to IBM MQ (ActiveMQ2IBMMQ). Response message must be delivered to the same QManager, which sent the request. The first route IBMMQ2ActiveMQ works fine (it also stores JMSReplyTo value in message headers). The problem in with ActiveMQ2IBMMQ route. Messages are not delivered to IBM MQ. I am getting error: Failed to resolve endpoint: ibmmq://queue://qmngr/queue?targetClient=1 due to: Failed to resolve endpoint: ibmmq://queue://qmngr/queue?targetClient=1 due to: There are 1 parameters that couldn't be set on th e endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[{targetClient=1}] (it is strange why camel puts too many // in ibmmq://queue://) Without targetClient=1, error is returned: javax.jms.InvalidDestinationException: MQJMS2008: failed to open MQ queue qmngr/queue; nested exception is com.ibm.mq.MQExce ption: MQJE001: Completion Code 2, Reason 2085 The test route, which justs returns the same message to IBM MQ works without problems: route id=IMBMQ_echo from uri=ibmmq:queue:queue?useMessageIDAsCorrelationID=true / setExchangePattern pattern=InOut / convertBodyTo type=java.lang.String / /route Has anyone experienced similar problems and could help with solution? Is it possible, that camel can't handle endpoint with uri=ibmmq:queue://qmngr/queue? Thanks. -- View this message in context: http://camel.465427.n5.nabble.com/IBM-Websphere-MQ-Camel-routes-tp3366282p3366282.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - FuseSource Email: [hidden email] Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/ If
Re: example using produce annoation with ref
There could be an example in the unit tests of the camel-spring module - you may want to check there. You should be able to define an endpoint in the Spring XML file like camelContext id=camel xmlns=http://camel.apache.org/schema/spring; endpoint id=foo uri=activemq:queue:foo/ ... /camelContext and then ref that endpoint in the annotation. Let me know if this doesn't work. On Wed, Aug 18, 2010 at 8:23 PM, Jason Chaffee jchaf...@ebates.com wrote: I am currently using the produce annotation with the uri attribute. I would like to change that to use the ref and configure the uri differently for different apps, so that I can reuse the same producer code. However, I haven't been able to find an example of doing this way. Can anyone point me to an example? @Produce(uri = activemq:queue:foo) MyProducer producer; Would like it be: @Produce(ref = foo) MyProducer producer; And define foo somehow in my spring config xml. Thanks, Jason -- Cheers, Jon Camel in Action: http://manning.com/ibsen Open Source Integration: http://fusesource.com Blog: http://janstey.blogspot.com
Re: Is Camel working with Websphere MQ/MQseries as well?
For WMQ another user posted some notes here: http://camel.465427.n5.nabble.com/Camel-and-IBM-MQ-Series-td476223.html#a476223 http://camel.465427.n5.nabble.com/Camel-and-IBM-MQ-Series-td476223.html#a476223I would say in general most JMS brokers should be supported. I've seen a few folks over the years use WMQ, I know SonicMQ works, MQs from Oracle TIBCO should work too. Of course the best supported tested MQ for use with Camel would be ActiveMQ :) On Sat, Jun 26, 2010 at 8:36 AM, benxs bxsto...@yahoo.co.uk wrote: Did anyone worked successfully with Camel on an IBM Websphere MQ Message Broker? Is there somewhere a guide on how to use Camel in such a scenario? Which Message brokers are support at all? Ben -- View this message in context: http://camel.465427.n5.nabble.com/Is-Camel-working-with-Websphere-MQ-MQseries-as-well-tp511466p511466.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: Wiki web page : camel aggregator not up to date for camel 2.x
Were you looking at http://camel.apache.org/aggregator.html or http://camel.apache.org/aggregator2.html? aggregator2.html has the most up to date config for Camel 2.3 and greater versions. On Mon, Jun 7, 2010 at 9:34 AM, Charles Moulliard cmoulli...@gmail.comwrote: Hi, I think that the wiki page of camel aggregator is not up to date. For camel 2.x, the following syntax is not longer correct : // our route is aggregating from the direct queue and sending the response to the mock from(direct:start) // aggregated by header id and use our own strategy how to aggregate .aggregate(new MyAggregationStrategy()).header(id) // wait for 0.5 seconds to aggregate .batchTimeout(500L) .to(mock:result); -- but should be // our route is aggregating from the direct queue and sending the response to the mock from(direct:start) // aggregated by header id and use our own strategy how to aggregate .aggregate(new MyAggregationStrategy()).header(id) // wait for 0.5 seconds to aggregate .completionTimeout(500L) .to(mock:result); Remark : completionTimeout is not defined in the batch option KR, Charles Moulliard Senior Enterprise Architect (J2EE, .NET, SOA) Apache Camel/ServiceMix Committer *** - Blog : http://cmoulliard.blogspot.com - Twitter : http://twitter.com/cmoulliard - Linkedlin : http://www.linkedin.com/in/charlesmoulliard -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: How Do We Specify Operation To Choose In Camel CXf
You just have to set the operationName header before invoking the CXF endpoint. Something like this if you want to do this within a route: ... setHeader headerName=operationName constantmyOperation/constant /setHeader to uri=cxf:bean:myCXFEndpointBeanWith2Operations/ ... On Tue, Jun 1, 2010 at 4:01 PM, Carlo Camerino carlo.camer...@gmail.comwrote: Hi, how do you specify the operation which camel will use. In the documentation, you can specify the service name and the port name but you can't specify the operation. i have two operations with the same type of arguments. camel seems to choose one but i don't know how camel is choosing it. thanks carlo -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: webservice to transform/enrich content
Try the following as the CXF endpoint URI cxf:// http://192.168.5.1:9763/services/myservice?wsdlURL=/services/myservice%3Fwsdl On Wed, May 26, 2010 at 2:04 PM, Francois Lefoll francois.lef...@racinegroup.com wrote: Hi, I got a remote webservice and I'm trying to use it to transform/enrich some queued messages. I'm trying to do : route from uri=activemq:queueA/ to uri=cxf:// 192.168.5.1:9763/services/myservice?wsdlURL=/services/myservice%3Fwsdl/ !-- wsdl(s) url are : http://192.168.5.1:9763/services/myservice?wsdl; http://192.168.5.1:9763/services/myservice?wsdl2; -- to uri=activemq:queueB/ /route Camel claims : Failed to resolve endpoint: 192.168.5.1:9763/services/myservice due to: Illegal character in scheme name at index 0: 192.168.5.1:9763/services/myservice The web service is a provided by axis2, and I have few doubt on wsdl correctness, What's wrong with this approach ? Great thanks in advance for your answer, Francois. -- View this message in context: http://old.nabble.com/webservice-to-transform-enrich-content-tp28683162p28683162.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: routingSlip and async destinations
In RoutingSlipCreator maybe add a slip like jms:foo?exchangePattern=InOut,jms:bar?exchangePattern=InOut instead of just the plain endpoint URIs. On Tue, May 11, 2010 at 7:12 PM, Scott Parkerson scott.parker...@gmail.comwrote: Camel riders, I've got a route that makes use of the Routing Slip EIP. Right now, a processor is used to create the header to be used with the routingSlip processor. Once that is done, the routingSlip then passes the messages on to one or more ActiveMQ queues as targets. It was my understanding that the Routing Slip EIP is supposed to take a message and send it to each destination synchronously (i.e. go to destination A, then destination B, and so on until all of the destinations in the routing slip header are visited, or an exception occurs). However, during my experimentation, I've seen that the routing slip processor seems to happily fulfill its duties by sending to all of the destinations near simultaneously if the destinations are ActiveMQ queues. Here's my RouteBuilder: /*..*/ getContext().addInterceptStrategy(new Tracer()); from(activemq:results) .unmarshal(bufFormatter) .bean(RoutingSlipCreator.class) /* adds activemq:foo, etc. as needed .routingSlip(routingSlip); from(activemq:foo) .bean(Foo.class); from(activemq:bar) .bean(Bar.class); from(activemq:baz) .bean(Baz.class); from(activemq:quux) .bean(Quux.class); And here's an example of the tracer tracing this interaction (I've deleted the contents of the body for brevity): DefaultMessageListenerContainer-1 INFO [org.apache.camel.processor.interceptor.Tracer] - ID:xyzzy.ateb.com-52179-1273613387168-2:5:1:1:1 (route1) -- com.ateb.dataproc.obc_processor.processor.postcontact.routingslipcrea...@407e75d2 Pattern:InOnly, Headers:{JMSPriority=4, JMSDeliveryMode=2, JMSMessageID=ID:xyzzy.ateb.com-52179-1273613387168-2:5:1:1:1, JMSCorrelationID=null, JMSRedelivered=false, JMSTimestamp=1273613390576, JMSType=null, JMSReplyTo=null, underTest=true, JMSDestination=queue://results, JMSXGroupID=null, JMSExpiration=0}, BodyType:java.util.HashMap, Body:{ ... } DefaultMessageListenerContainer-1 INFO [org.apache.camel.processor.interceptor.Tracer] - ID:xyzzy.ateb.com-52179-1273613387168-2:5:1:1:1 (route1) com.ateb.dataproc.obc_processor.processor.postcontact.routingslipcrea...@407e75d2 -- routingSlip[routingSlip] Pattern:InOnly, Headers:{JMSDeliveryMode=2, routingSlip=activemq:foo,activemq:bar,activemq:baz,activemq:quux, JMSMessageID=ID:xyzzy.ateb.com-52179-1273613387168-2:5:1:1:1, JMSDestination=queue://results, JMSRedelivered=false, underTest=true, JMSPriority=4, JMSTimestamp=1273613390576, JMSCorrelationID=null, JMSType=null, JMSReplyTo=null, JMSXGroupID=null, JMSExpiration=0}, BodyType:java.util.HashMap, Body:{ ... } DefaultMessageListenerContainer-1 INFO [org.apache.camel.processor.interceptor.Tracer] - ID:xyzzy.ateb.com-52179-1273613387168-2:7:1:2:1 (route3) from(activemq://bar) -- com.ateb.dataproc.obc_processor.processor.postcontact@1ee2433b Pattern:InOnly, Headers:{JMSCorrelationID=null, CamelJmsDeliveryMode=2, underTest=true, JMSType=null, JMSXGroupID=null, JMSTimestamp=1273613391428, JMSExpiration=0, JMSDestination=queue://bar, JMSReplyTo=null, JMSRedelivered=false, JMSMessageID=ID:xyzzy.ateb.com-52179-1273613387168-2:7:1:2:1, JMSPriority=4, JMSDeliveryMode=2, routingSlip=activemq:baz,activemq:quux}, BodyType:java.util.HashMap, Body:{ ... } DefaultMessageListenerContainer-1 INFO [org.apache.camel.processor.interceptor.Tracer] - ID:xyzzy.ateb.com-52179-1273613387168-2:7:1:3:1 (route4) from(activemq://baz) -- com.ateb.dataproc.obc_processor.processor.postcontact@5809fdee Pattern:InOnly, Headers:{JMSTimestamp=1273613391434, JMSXGroupID=null, CamelJmsDeliveryMode=2, JMSMessageID=ID:xyzzy.ateb.com-52179-1273613387168-2:7:1:3:1, JMSPriority=4, routingSlip=activemq:quux, JMSDeliveryMode=2, JMSExpiration=0, JMSReplyTo=null, JMSType=null, JMSRedelivered=false, JMSDestination=queue://baz, JMSCorrelationID=null, underTest=true}, BodyType:java.util.HashMap, Body:{ ... } DefaultMessageListenerContainer-1 INFO [org.apache.camel.processor.interceptor.Tracer] - ID:xyzzy.ateb.com-52179-1273613387168-2:7:1:1:1 (route2) from(activemq://foo) -- com.ateb.dataproc.obc_processor.processor.postcontact@43ce663c Pattern:InOnly, Headers:{JMSXGroupID=null, JMSPriority=4, JMSDeliveryMode=2, CamelJmsDeliveryMode=2, JMSTimestamp=1273613391410, JMSExpiration=0, JMSType=null, JMSCorrelationID=null, underTest=true, JMSReplyTo=null, JMSDestination=queue://foo, routingSlip=activemq:bar,activemq:baz,activemq:quux, JMSRedelivered=false, JMSMessageID=ID:xyzzy.ateb.com-52179-1273613387168-2:7:1:1:1}, BodyType:java.util.HashMap, Body:{...} DefaultMessageListenerContainer-1 INFO [org.apache.camel.processor.interceptor.Tracer]
Re: routingSlip and async destinations
Of course, in your case use activemq:foo not jms:foo :) On Tue, May 11, 2010 at 8:51 PM, Jon Anstey jans...@gmail.com wrote: In RoutingSlipCreator maybe add a slip like jms:foo?exchangePattern=InOut,jms:bar?exchangePattern=InOut instead of just the plain endpoint URIs. On Tue, May 11, 2010 at 7:12 PM, Scott Parkerson scott.parker...@gmail.com wrote: Camel riders, I've got a route that makes use of the Routing Slip EIP. Right now, a processor is used to create the header to be used with the routingSlip processor. Once that is done, the routingSlip then passes the messages on to one or more ActiveMQ queues as targets. It was my understanding that the Routing Slip EIP is supposed to take a message and send it to each destination synchronously (i.e. go to destination A, then destination B, and so on until all of the destinations in the routing slip header are visited, or an exception occurs). However, during my experimentation, I've seen that the routing slip processor seems to happily fulfill its duties by sending to all of the destinations near simultaneously if the destinations are ActiveMQ queues. Here's my RouteBuilder: /*..*/ getContext().addInterceptStrategy(new Tracer()); from(activemq:results) .unmarshal(bufFormatter) .bean(RoutingSlipCreator.class) /* adds activemq:foo, etc. as needed .routingSlip(routingSlip); from(activemq:foo) .bean(Foo.class); from(activemq:bar) .bean(Bar.class); from(activemq:baz) .bean(Baz.class); from(activemq:quux) .bean(Quux.class); And here's an example of the tracer tracing this interaction (I've deleted the contents of the body for brevity): DefaultMessageListenerContainer-1 INFO [org.apache.camel.processor.interceptor.Tracer] - ID:xyzzy.ateb.com-52179-1273613387168-2:5:1:1:1 (route1) -- com.ateb.dataproc.obc_processor.processor.postcontact.routingslipcrea...@407e75d2 Pattern:InOnly, Headers:{JMSPriority=4, JMSDeliveryMode=2, JMSMessageID=ID:xyzzy.ateb.com-52179-1273613387168-2:5:1:1:1, JMSCorrelationID=null, JMSRedelivered=false, JMSTimestamp=1273613390576, JMSType=null, JMSReplyTo=null, underTest=true, JMSDestination=queue://results, JMSXGroupID=null, JMSExpiration=0}, BodyType:java.util.HashMap, Body:{ ... } DefaultMessageListenerContainer-1 INFO [org.apache.camel.processor.interceptor.Tracer] - ID:xyzzy.ateb.com-52179-1273613387168-2:5:1:1:1 (route1) com.ateb.dataproc.obc_processor.processor.postcontact.routingslipcrea...@407e75d2 -- routingSlip[routingSlip] Pattern:InOnly, Headers:{JMSDeliveryMode=2, routingSlip=activemq:foo,activemq:bar,activemq:baz,activemq:quux, JMSMessageID=ID:xyzzy.ateb.com-52179-1273613387168-2:5:1:1:1, JMSDestination=queue://results, JMSRedelivered=false, underTest=true, JMSPriority=4, JMSTimestamp=1273613390576, JMSCorrelationID=null, JMSType=null, JMSReplyTo=null, JMSXGroupID=null, JMSExpiration=0}, BodyType:java.util.HashMap, Body:{ ... } DefaultMessageListenerContainer-1 INFO [org.apache.camel.processor.interceptor.Tracer] - ID:xyzzy.ateb.com-52179-1273613387168-2:7:1:2:1 (route3) from(activemq://bar) -- com.ateb.dataproc.obc_processor.processor.postcontact@1ee2433b Pattern:InOnly, Headers:{JMSCorrelationID=null, CamelJmsDeliveryMode=2, underTest=true, JMSType=null, JMSXGroupID=null, JMSTimestamp=1273613391428, JMSExpiration=0, JMSDestination=queue://bar, JMSReplyTo=null, JMSRedelivered=false, JMSMessageID=ID:xyzzy.ateb.com-52179-1273613387168-2:7:1:2:1, JMSPriority=4, JMSDeliveryMode=2, routingSlip=activemq:baz,activemq:quux}, BodyType:java.util.HashMap, Body:{ ... } DefaultMessageListenerContainer-1 INFO [org.apache.camel.processor.interceptor.Tracer] - ID:xyzzy.ateb.com-52179-1273613387168-2:7:1:3:1 (route4) from(activemq://baz) -- com.ateb.dataproc.obc_processor.processor.postcontact@5809fdee Pattern:InOnly, Headers:{JMSTimestamp=1273613391434, JMSXGroupID=null, CamelJmsDeliveryMode=2, JMSMessageID=ID:xyzzy.ateb.com-52179-1273613387168-2:7:1:3:1, JMSPriority=4, routingSlip=activemq:quux, JMSDeliveryMode=2, JMSExpiration=0, JMSReplyTo=null, JMSType=null, JMSRedelivered=false, JMSDestination=queue://baz, JMSCorrelationID=null, underTest=true}, BodyType:java.util.HashMap, Body:{ ... } DefaultMessageListenerContainer-1 INFO [org.apache.camel.processor.interceptor.Tracer] - ID:xyzzy.ateb.com-52179-1273613387168-2:7:1:1:1 (route2) from(activemq://foo) -- com.ateb.dataproc.obc_processor.processor.postcontact@43ce663c Pattern:InOnly, Headers:{JMSXGroupID=null, JMSPriority=4, JMSDeliveryMode=2, CamelJmsDeliveryMode=2, JMSTimestamp=1273613391410, JMSExpiration=0, JMSType=null, JMSCorrelationID=null, underTest=true, JMSReplyTo=null, JMSDestination=queue://foo, routingSlip=activemq:bar,activemq:baz,activemq:quux, JMSRedelivered=false, JMSMessageID=ID:xyzzy.ateb.com-52179-1273613387168-2:7:1:1
Re: How does Camel work with ActiveMQ ?
Here is some AMQ documentation about that http://activemq.apache.org/enterprise-integration-patterns.html On Tue, Jan 26, 2010 at 12:57 PM, Claus Ibsen claus.ib...@gmail.com wrote: On Tue, Jan 26, 2010 at 5:21 PM, BenXS bxsto...@yahoo.co.uk wrote: Hi Ashwin, thank you for response. But this procedure seems to me rather long-winded. Do I really need Spring? Are there really no pre-compiled, ready-to-use *.jars of Camel? What I expect is a camel.jar which I have to put into the target applications (here: ActiveMQ) lib subdirectory. Secondly a camel-config.xml where the user should specify what to log and to do with the JMS msgs. That should be all. Is this somehow possible? Yeah Camel is included by default in ActiveMQ. There should be a sample camel XML file in AMQ you can take a peak at. Then just drop your camel app in the lib folder of AMQ. There should be some docu about this at the AMQ website Ben Ashwin Karpe wrote: Here is a quick response to the general steps. a Start the ActiveMQ Broker. It typically comes up on tcp://localhost:61616 b Check out the example camel-install-dir/examples/camel-example-spring-jms. This example is available in the 1.6 version of Camel. c Build and deploy into a Spring container -- View this message in context: http://old.nabble.com/How-does-Camel-work-with-ActiveMQ---tp27311853p27325345.html Sent from the Camel - Users (activemq) 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.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: Publish source jar files to maven repository
I set up Hudson to deploy the source jars a while ago but there was some problem... the issue is tracked here https://issues.apache.org/jira/browse/INFRA-2352 Hopefully we can get a resolution to this soon! On Wed, Jan 6, 2010 at 9:10 AM, Willem Jiang willem.ji...@gmail.com wrote: Hi We publish the source jar when doing the camel release, but we don't deploy the source jar when publishing the snapshot. Do you means we need to do the same thing for snapshot deploy? If so, you can check out camel source code do that kind of build yourself. I don't think there are lots of people working on Camel SNAPSHOT :) Willem Jörn Kottmann wrote: Hello, I am just doing some debugging of the camel-mail component with eclipse and noticed that the camel team is not publishing the camel source jars to their maven repository. Publishing the source jars has the advantage that the camel jar files are automatically linked to the source code in eclipse when using mvn eclipse:eclipse. The linking of the source code is needed to debug the camel code. If there is interest in this I could open a jira issue. Jörn -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: The latest camel java archetype (2.1.0) is not working correctly
Darn! Looks like a change I made to support Maven 3 broke Maven 2. I've put a fix on trunk so the artifact/group substitution will work for next time. On Wed, Dec 23, 2009 at 2:59 PM, Ryadh Amar magnetic.gan...@gmail.comwrote: Hello Community, When I run the following mvn archetype:generate -DarchetypeGroupId=org.apache.camel.archetypes -DarchetypeArtifactId=camel-archetype-java -DarchetypeVersion=2.1.0 -DgroupId=com.corp.projects -DartifactId=camel-jira-ws Everything looks ok, but glancing at the generated pom.xml in the newly created project, it seems the archetype didn't pick the groupId and the artifactID = groupId${project.groupId}/groupId artifactId${project.artifactId}/artifactId packagingjar/packaging version1.0-SNAPSHOT/version = the 2.0.0 archetype works fine. just a FYI Should a JIRA issue be raised? -- View this message in context: http://old.nabble.com/The-latest-camel-java-archetype-%282.1.0%29-is-not-working-correctly-tp26905679p26905679.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: Help to understand xpath expression in camel routebuilder
Have you created a mapping file for your custom class? You need to provide JiBX with a mapping file so it knows how to do the marshalling. In the article, they've defined one for their classes in InsuranceSMDZone/jibx/InsuranceMapping.xml On Wed, Dec 16, 2009 at 1:43 PM, Kenneth H phecda...@gmail.com wrote: janstey wrote: In JBI applications, each SU has its own classloader so I *think* if you make sure that your custom classes are available on the Camel SU's classpath and the JMS SU's classpath all will be well. You were right. After moving the relevant classes to the classpath directory, the exception is gone. However, it would be to easy if things just worked, so Servicmix throws a new exception. This time it's JiBX, annoying: javax.jms.JMSException: Error sending JBI exchange at org.apache.servicemix.jms.endpoints.AbstractConsumerEndpoint.onMessage(AbstractConsumerEndpoint.java:575) at org.apache.servicemix.jms.endpoints.JmsConsumerEndpoint$1.onMessage(JmsConsumerEndpoint.java:505) at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:518) at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:479) at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:451) at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:323) at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:982) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:974) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:876) at java.lang.Thread.run(Thread.java:619) Caused by: org.jibx.runtime.JiBXException: Error marshalling XML to Object at terror.util.JiBXUtil.marshalDocument(JiBXUtil.java:51) at terror.util.TerrorJMSMarshaler.populateMessage(TerrorJMSMarshaler.java:19) at org.apache.servicemix.jms.endpoints.DefaultConsumerMarshaler.createExchange(DefaultConsumerMarshaler.java:99) at org.apache.servicemix.jms.endpoints.AbstractConsumerEndpoint.onMessage(AbstractConsumerEndpoint.java:544) ... 10 more The function that throws the exceptions is this: public static Source marshalDocument(Object src, String encoding) throws JiBXException { Source result = null; try { ByteArrayOutputStream bOut = new ByteArrayOutputStream(); IMarshallingContext ctx = BindingDirectory.getFactory(src.getClass()) .createMarshallingContext(); ctx.marshalDocument(src, UTF-8, null, bOut); result = new StreamSource(new ByteArrayInputStream(bOut.toByteArray())); } catch (Exception e) { throw new JiBXException(Error marshalling XML to Object,e); } return result; } I don't know where the problems is. The exceptiopns doesn't give much information. Kind regards, Kenneth -- View this message in context: http://old.nabble.com/Help-to-understand-xpath-expression-in-camel-routebuilder-tp26779963p26814820.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: Help to understand xpath expression in camel routebuilder
On Tue, Dec 15, 2009 at 9:43 AM, Kenneth H phecda...@gmail.com wrote: Hi Jon, Your answer definitely helped. I have a couple of more questions though: 1. Where can I read about the .namespace() function syntax? I still don't get why ins is used in both functions. I tried w3schools but didn't find it. Did you find this page? http://www.w3schools.com/XML/xml_namespaces.asp That should help you understand usage of the namespace prefix and URI. 2. Is it possible to debug in the Camel routebuilder somehow? If I want to know how the message looks like before and after the .convertBodyTo(DOMSource.class). And most important: I want to know if an expression evaluates to true, i.e. I want to print-out the result of the when statement. Maybe something like this pseudocode: var travelRequest = xpath(//ins:TravelInsuranceRequest).namespace ins,http://dzone.com/insurance;)) print(travelRequest); .when(travelRequest).to(LUXURY_CAR_OUT); I guess it depends on how you have this deployed... if its a JUnit test, well Eclipse or IntelliJ can easily debug that for you. Other setups may require extra configuration of the app server / ESB to get debugging working. Actually, if you just want to see what the messages look like at various points in your route, try enabling the tracer http://camel.apache.org/tracer.html Kind regards, Kenneth H -- View this message in context: http://old.nabble.com/Help-to-understand-xpath-expression-in-camel-routebuilder-tp26779963p26794573.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: Help to understand xpath expression in camel routebuilder
On Tue, Dec 15, 2009 at 11:26 AM, Kenneth H phecda...@gmail.com wrote: 1. Where can I read about the .namespace() function syntax? I still don't get why ins is used in both functions. I tried w3schools but didn't find it. Did you find this page? http://www.w3schools.com/XML/xml_namespaces.asp That should help you understand usage of the namespace prefix and URI. I know namespaces in general, bit it was the syntax of the .namespace() function in xpath, I was looking for. Ah Cool stuff. The public javadoc may be helpful to you then http://camel.apache.org/maven/camel-core/apidocs/org/apache/camel/builder/xml/XPathBuilder.html#namespace(java.lang.String,%20java.lang.String) 2. Is it possible to debug in the Camel routebuilder somehow? If I want to know how the message looks like before and after the .convertBodyTo(DOMSource.class). And most important: I want to know if an expression evaluates to true, i.e. I want to print-out the result of the when statement. Maybe something like this pseudocode: var travelRequest = xpath(//ins:TravelInsuranceRequest).namespace ins,http://dzone.com/insurance;)) print(travelRequest); .when(travelRequest).to(LUXURY_CAR_OUT); I guess it depends on how you have this deployed... if its a JUnit test, well Eclipse or IntelliJ can easily debug that for you. Other setups may require extra configuration of the app server / ESB to get debugging working. Actually, if you just want to see what the messages look like at various points in your route, try enabling the tracer http://camel.apache.org/tracer.html I will look into the tracer - didn't know of that. I have just created a Maven project and deployed it on the Servicemix ESB. Hard to find out how to debug :) If you are using the latest ServiceMix, you can follow some notes here to turn on debugging https://repository.apache.org/content/groups/public/org/apache/felix/karaf/manual/1.3.0-SNAPSHOT/manual-1.3.0-SNAPSHOT.html#KarafUsers%27Guideinonepage-5.1.Troubleshooting%2CDebuggingandProfiling One last novice question. In the statement: from(seda:a).filter(header(foo).isEqualTo(bar)).to(seda:b); Where does the foo comes from, I mean, where do I set it? From Eclipse I'm creating a JMS Message, but the only headers availbe is these: http://publib.boulder.ibm.com/infocenter/tivihelp/v2r1/index.jsp?topic=/com.ibm.IBMDI.doc/referenceguide95.htm Do you know how I can use these headers/properties in a Camel choice statement? Basicly, I just want to create the most simple example, where to messages are send from Eclipse and goes to two different queues in a Camel choice statement. The messages should be simple tect or objects. You should be able to access any of the JMS headers you mentioned in the same way the foo header is referenced. So how are you sending JMS messages from Eclipse? I'm assuming its a function of Tivoli in the link you provided? You can also use Camel to set a header like so from(seda:a).setHeader(foo, constant(bar))... Kend regards, Kenneth H -- View this message in context: http://old.nabble.com/Help-to-understand-xpath-expression-in-camel-routebuilder-tp26779963p26795823.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: Maven problem
Hmm... the pom.xml file looks fine from the actual Apache snapshot repo https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-spring-integration/2.1-SNAPSHOT/camel-spring-integration-2.1-SNAPSHOT.pom I'm assuming cde.foobar.com is an internal URL for you? :) Your Nexus instance may have a corrupt cache of that pom or something... you may want to go into the Nexus UI and clear out its cache for org/apache/camel/camel-spring-integrationhttps://cde.foobar.com/nexus/content/groups/public/org/apache/camel/camel-spring-integration/2.1-SNAPSHOT/camel-spring-integration-2.1-SNAPSHOT.pomand see if that works. On Tue, Dec 15, 2009 at 12:29 PM, Mond Ray Mond opengr...@gmail.com wrote: Guys, I am trying to obtain the 2.1 SNAPSHOT and Maven is puking. Any ideas? Downloading: https://cde.foobar.com/nexus/content/groups/public/org/apache/camel/camel-spring-integration/2.1-SNAPSHOT/camel-spring-integration-2.1-SNAPSHOT.pom [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Error building POM (may not be this project's POM). Project ID: org.apache.camel:camel-spring-integration Reason: Failed to build model from file 'c:\.m2\org\apache\camel\camel-spring-integration\2.1-SNAPSHOT\camel-spring-integration-2.1-SNAPSHOT.pom'. Error: 'no more data available - expected end tags /dependency/dependencies/project to close start tag dependency from line 110 and start tag dependencies from line 101 and start tag project from line 18, parser stopped on END_TAG seen ...version${spring-integration-version}/version\n ... @114:6' for project org.apache.camel:camel-spring-integration Thanks Ray -- View this message in context: http://old.nabble.com/Maven-problem-tp26796124p26796124.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: Maven problem
Also maybe try deleting your local cache of that file. Like delete the following: c:\.m2\org\apache\camel\camel-spring-integration On Tue, Dec 15, 2009 at 12:36 PM, Jon Anstey jans...@gmail.com wrote: Hmm... the pom.xml file looks fine from the actual Apache snapshot repo https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-spring-integration/2.1-SNAPSHOT/camel-spring-integration-2.1-SNAPSHOT.pom I'm assuming cde.foobar.com is an internal URL for you? :) Your Nexus instance may have a corrupt cache of that pom or something... you may want to go into the Nexus UI and clear out its cache for org/apache/camel/camel-spring-integrationhttps://cde.foobar.com/nexus/content/groups/public/org/apache/camel/camel-spring-integration/2.1-SNAPSHOT/camel-spring-integration-2.1-SNAPSHOT.pomand see if that works. On Tue, Dec 15, 2009 at 12:29 PM, Mond Ray Mond opengr...@gmail.comwrote: Guys, I am trying to obtain the 2.1 SNAPSHOT and Maven is puking. Any ideas? Downloading: https://cde.foobar.com/nexus/content/groups/public/org/apache/camel/camel-spring-integration/2.1-SNAPSHOT/camel-spring-integration-2.1-SNAPSHOT.pom [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Error building POM (may not be this project's POM). Project ID: org.apache.camel:camel-spring-integration Reason: Failed to build model from file 'c:\.m2\org\apache\camel\camel-spring-integration\2.1-SNAPSHOT\camel-spring-integration-2.1-SNAPSHOT.pom'. Error: 'no more data available - expected end tags /dependency/dependencies/project to close start tag dependency from line 110 and start tag dependencies from line 101 and start tag project from line 18, parser stopped on END_TAG seen ...version${spring-integration-version}/version\n ... @114:6' for project org.apache.camel:camel-spring-integration Thanks Ray -- View this message in context: http://old.nabble.com/Maven-problem-tp26796124p26796124.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: Help to understand xpath expression in camel routebuilder
On Tue, Dec 15, 2009 at 1:33 PM, Kenneth H phecda...@gmail.com wrote: On Tue, Dec 15, 2009 at 11:26 AM, Kenneth H phecda...@gmail.com wrote: 1. Where can I read about the .namespace() function syntax? I still don't get why ins is used in both functions. I tried w3schools but didn't find it. Did you find this page? http://www.w3schools.com/XML/xml_namespaces.asp That should help you understand usage of the namespace prefix and URI. I know namespaces in general, bit it was the syntax of the .namespace() function in xpath, I was looking for. Ah Cool stuff. The public javadoc may be helpful to you then http://camel.apache.org/maven/camel- core/apidocs/org/apache/camel/builder/xml/XPathBuilder.html#namespace(java.lang.String,%20java.lang.String) Perfect. Actually I was looking here earlier, but I must have missed it. 2. Is it possible to debug in the Camel routebuilder somehow? If I want to know how the message looks like before and after the .convertBodyTo(DOMSource.class). And most important: I want to know if an expression evaluates to true, i.e. I want to print-out the result of the when statement. Maybe something like this pseudocode: var travelRequest = xpath(//ins:TravelInsuranceRequest).namespace ins,http://dzone.com/insurance;)) print(travelRequest); .when(travelRequest).to(LUXURY_CAR_OUT); I guess it depends on how you have this deployed... if its a JUnit test, well Eclipse or IntelliJ can easily debug that for you. Other setups may require extra configuration of the app server / ESB to get debugging working. Actually, if you just want to see what the messages look like at various points in your route, try enabling the tracer http://camel.apache.org/tracer.html I will look into the tracer - didn't know of that. I have just created a Maven project and deployed it on the Servicemix ESB. Hard to find out how to debug :) If you are using the latest ServiceMix, you can follow some notes here to turn on debugging https://repository.apache.org/content/groups/public/org/apache/felix/karaf/manual/1.3.0- SNAPSHOT/manual-1.3.0-SNAPSHOT.html#KarafUsers%27Guideinonepage-5.1.Troubleshooting%2CDebuggingandProfiling This might be very helpful to me! One last novice question. In the statement: from(seda:a).filter(header(foo).isEqualTo(bar)).to(seda:b); Where does the foo comes from, I mean, where do I set it? From Eclipse I'm creating a JMS Message, but the only headers availbe is these: http://publib.boulder.ibm.com/infocenter/tivihelp/v2r1/index.jsp?topic=/com.ibm.IBMDI.doc/referenceguide95.htm Do you know how I can use these headers/properties in a Camel choice statement? Basicly, I just want to create the most simple example, where to messages are send from Eclipse and goes to two different queues in a Camel choice statement. The messages should be simple tect or objects. You should be able to access any of the JMS headers you mentioned in the same way the foo header is referenced. So how are you sending JMS messages from Eclipse? I'm assuming its a function of Tivoli in the link you provided? I (or the writer of the document I'm reading) made af Response class called InsuranceResponse. The response class is sent to the Camel Routebuilder. I would like to swith on either the classname of the object I'm sending or a field, e.g. CompanyName, in the object. I create/send like this: ObjectMessage insuranceMessage = session.createObjectMessage(); InsuranceResponse response = new InsuranceResponse(); response.setRequestID(1); response.setInsuranceCompanyName(Luxury Cars); response.setPrice(100f); response.setResponseID(UUID.randomUUID().toString()); insuranceMessage.setObject(response); producer.send(insuranceMessage); Then I receive like this (responseMessage returns null all the time, but I guess it's beacuse my Camel Routebuilder isn't wotking, so no object is send to the queue): ObjectMessage responseMessage = (ObjectMessage) consumer.receive(); InsuranceResponse insuranceMessageReceived = (InsuranceResponse) responseMessage.getObject(); So I think you are looking at: http://soa.dzone.com/articles/pattern-based-development-with-0?page=0,3 And it looks like they are using JIBX to convert between InsuranceResponses and XML. So, in the Camel route, the message is already in XML form so we can use an XPath expression something like the following to switch on the company name: xpath(//ins:TravelInsuranceRequest/ins:insuranceCompanyName/text() = 'Luxury Cars').namespace(ins,http://dzone.com/insurance;) I haven't booted up the example myself so I don't know why you are not getting any messages using the raw JMS API. Do the ServiceMix logs or Camel logs with trace enabled give you any more info on where the holdup could be? You can also use Camel to set a header like so from(seda:a).setHeader(foo,
Re: Help to understand xpath expression in camel routebuilder
On Tue, Dec 15, 2009 at 1:33 PM, Kenneth H phecda...@gmail.com wrote: On Tue, Dec 15, 2009 at 11:26 AM, Kenneth H phecda...@gmail.com wrote: 1. Where can I read about the .namespace() function syntax? I still don't get why ins is used in both functions. I tried w3schools but didn't find it. Did you find this page? http://www.w3schools.com/XML/xml_namespaces.asp That should help you understand usage of the namespace prefix and URI. I know namespaces in general, bit it was the syntax of the .namespace() function in xpath, I was looking for. Ah Cool stuff. The public javadoc may be helpful to you then http://camel.apache.org/maven/camel- core/apidocs/org/apache/camel/builder/xml/XPathBuilder.html#namespace(java.lang.String,%20java.lang.String) Perfect. Actually I was looking here earlier, but I must have missed it. 2. Is it possible to debug in the Camel routebuilder somehow? If I want to know how the message looks like before and after the .convertBodyTo(DOMSource.class). And most important: I want to know if an expression evaluates to true, i.e. I want to print-out the result of the when statement. Maybe something like this pseudocode: var travelRequest = xpath(//ins:TravelInsuranceRequest).namespace ins,http://dzone.com/insurance;)) print(travelRequest); .when(travelRequest).to(LUXURY_CAR_OUT); I guess it depends on how you have this deployed... if its a JUnit test, well Eclipse or IntelliJ can easily debug that for you. Other setups may require extra configuration of the app server / ESB to get debugging working. Actually, if you just want to see what the messages look like at various points in your route, try enabling the tracer http://camel.apache.org/tracer.html I will look into the tracer - didn't know of that. I have just created a Maven project and deployed it on the Servicemix ESB. Hard to find out how to debug :) If you are using the latest ServiceMix, you can follow some notes here to turn on debugging https://repository.apache.org/content/groups/public/org/apache/felix/karaf/manual/1.3.0- SNAPSHOT/manual-1.3.0-SNAPSHOT.html#KarafUsers%27Guideinonepage-5.1.Troubleshooting%2CDebuggingandProfiling This might be very helpful to me! One last novice question. In the statement: from(seda:a).filter(header(foo).isEqualTo(bar)).to(seda:b); Where does the foo comes from, I mean, where do I set it? From Eclipse I'm creating a JMS Message, but the only headers availbe is these: http://publib.boulder.ibm.com/infocenter/tivihelp/v2r1/index.jsp?topic=/com.ibm.IBMDI.doc/referenceguide95.htm Do you know how I can use these headers/properties in a Camel choice statement? Basicly, I just want to create the most simple example, where to messages are send from Eclipse and goes to two different queues in a Camel choice statement. The messages should be simple tect or objects. You should be able to access any of the JMS headers you mentioned in the same way the foo header is referenced. So how are you sending JMS messages from Eclipse? I'm assuming its a function of Tivoli in the link you provided? I (or the writer of the document I'm reading) made af Response class called InsuranceResponse. The response class is sent to the Camel Routebuilder. I would like to swith on either the classname of the object I'm sending or a field, e.g. CompanyName, in the object. I create/send like this: ObjectMessage insuranceMessage = session.createObjectMessage(); InsuranceResponse response = new InsuranceResponse(); response.setRequestID(1); response.setInsuranceCompanyName(Luxury Cars); response.setPrice(100f); response.setResponseID(UUID.randomUUID().toString()); insuranceMessage.setObject(response); producer.send(insuranceMessage); Then I receive like this (responseMessage returns null all the time, but I guess it's beacuse my Camel Routebuilder isn't wotking, so no object is send to the queue): ObjectMessage responseMessage = (ObjectMessage) consumer.receive(); InsuranceResponse insuranceMessageReceived = (InsuranceResponse) responseMessage.getObject(); You can also use Camel to set a header like so from(seda:a).setHeader(foo, constant(bar))... Cool. But what is the corresponding function in Eclipse/JMS to the setHeader?! You are using the raw JMS API so you can set a property on the ObjectMessage before sending. See: http://java.sun.com/j2ee/1.4/docs/api/javax/jms/Message.html Kind regards Kenneth H -- View this message in context: http://old.nabble.com/Help-to-understand-xpath-expression-in-camel-routebuilder-tp26779963p26798115.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: Help to understand xpath expression in camel routebuilder
The xpath expression is going to be evaluated against the incoming message body. So, if we have a message like: ?xml version=1.0 encoding=UTF-8? TravelInsuranceRequest xmlns=http://dzone.com/insurance; ... /TravelInsuranceRequest the first when clause will evaluate to true since the xpath expression is searching for any element like TravelInsuranceRequest. The namespace bit tells Camel to search for TravelInsuranceRequest elements only in the http://dzone.com/insurance namespace. Does this help any? On Mon, Dec 14, 2009 at 3:40 PM, Kenneth H phecda...@gmail.com wrote: Hi, I'm trying to udnerstand a camel example, but I'm stuck at a poit where xpath is used. The builder is shown here: public void configure() { from(SERVICE_IN) // SERVICE_IN = jbi:service:http://esbinaction.com/insurance/insuranceDSLRouter .convertBodyTo(DOMSource.class) // Convert to DOM tree .choice() .when(xpath(//ins:TravelInsuranceRequest).namespace(ins, http://dzone.com/insurance;)) .to(TRAVEL_OUT) .when(xpath(//ins:CarInsuranceRequest).namespace(ins, http://dzone.com/insurance;)) .to(LUXURY_CAR_OUT, BUDGET_CAR_OUT) .otherwise() .to(FAILURE_OUT); } My problem is the when: what exactly does: when(xpath(//ins:TravelInsuranceRequest).namespace(ins, http://dzone.com/insurance;)) mean? Can anybody help me? Kind regards, Kenneth H -- View this message in context: http://old.nabble.com/Help-to-understand-xpath-expression-in-camel-routebuilder-tp26779963p26779963.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: start/stop routes programmatically
You can set custom ids for each route like this: from(activemq:queue1).id(InboundRoute).to(activemq:queue2); from(activemq:queue2).id(ProcessingRoute).to(activemq:queue3); in the Spring DSL you can just use standard id attributes like: ... route id=InboundRoute ... On Mon, Dec 14, 2009 at 9:45 PM, boday bo...@vektrel.com wrote: I see that Camel 2.1 now support starting/stopping routes via JMX/APIs. But, how do I identify routes properly at runtime... For example, assume I have the following route... from(activemq:queue1).to(activemq:queue2); from(activemq:queue2).to(activemq:queue3); They show up in JMX as route1 and route2. The description/endpointURI fields definitely help, but might be problematic to use when there are a lot of routes. The same applies to finding a routes with Camel APIs. I can get a list of routes using this... getContext().getRouteCollection().getRoutes() I see that I can then call the following on a RouteDefinition to get to the first endpoint name routeDefinition.getInputs().get(0).getLabel() I guess I could use this name to identify a route and then call stop()/start() on it...but this seems like a very indirect approach to identify it? Am I missing something? What I'd like to do is give a route an explicit name that can be referenced later (in JMX/programmatically)...maybe the DescriptionDefinition class could help, but am not sure how to use it... something along these lines is what I'm looking for... setRouteName(InboundRoute).from(activemq:queue1).to(activemq:queue2); setRouteName(ProcessingRoute).from(activemq:queue2).to(activemq:queue3); thanks in advance... - Ben - Senior Consultant using SMX 3.3.1/Camel 2.0 -- View this message in context: http://old.nabble.com/start-stop-routes-programmatically-tp26781725p26781725.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: start/stop routes programmatically
Ha! This must have changed since the last time I used it ;) On Mon, Dec 14, 2009 at 11:15 PM, Willem Jiang willem.ji...@gmail.comwrote: Hi Jon, After checking the code, I think the DSL should be from(activemq:queue1).routeId(InboundRoute).to(activemq:queue2); from(activemq:queue2).routeId(ProcessingRoute).to(activemq:queue3); Willem Jon Anstey wrote: You can set custom ids for each route like this: from(activemq:queue1).id(InboundRoute).to(activemq:queue2); from(activemq:queue2).id(ProcessingRoute).to(activemq:queue3); in the Spring DSL you can just use standard id attributes like: ... route id=InboundRoute ... On Mon, Dec 14, 2009 at 9:45 PM, boday bo...@vektrel.com wrote: I see that Camel 2.1 now support starting/stopping routes via JMX/APIs. But, how do I identify routes properly at runtime... For example, assume I have the following route... from(activemq:queue1).to(activemq:queue2); from(activemq:queue2).to(activemq:queue3); They show up in JMX as route1 and route2. The description/endpointURI fields definitely help, but might be problematic to use when there are a lot of routes. The same applies to finding a routes with Camel APIs. I can get a list of routes using this... getContext().getRouteCollection().getRoutes() I see that I can then call the following on a RouteDefinition to get to the first endpoint name routeDefinition.getInputs().get(0).getLabel() I guess I could use this name to identify a route and then call stop()/start() on it...but this seems like a very indirect approach to identify it? Am I missing something? What I'd like to do is give a route an explicit name that can be referenced later (in JMX/programmatically)...maybe the DescriptionDefinition class could help, but am not sure how to use it... something along these lines is what I'm looking for... setRouteName(InboundRoute).from(activemq:queue1).to(activemq:queue2); setRouteName(ProcessingRoute).from(activemq:queue2).to(activemq:queue3); thanks in advance... - Ben - Senior Consultant using SMX 3.3.1/Camel 2.0 -- View this message in context: http://old.nabble.com/start-stop-routes-programmatically-tp26781725p26781725.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: How to break from routing slip in camel on exception?
Just took a look into this and found that setting the Exception on the Exchange doesn't really break you out of the routing slip as you want. I'm gonna fix that up on the trunk. But, throwing an Exception from a recipient does stop the routing slip. See this test case for an example http://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/routingslip/RoutingSlipWithExceptionTest.java On Tue, Dec 1, 2009 at 1:34 PM, murugess msan...@gmail.com wrote: We are using camel binding component, with camel version 1.6.1.0, on servicemix for our project. We are leveraging dynamic routing slip in camel to process our request and are facing issues related to exception handling. We have already defined global errorHandler which handles any exception that occurs in any of the route. Now, whenever an exception occurs in any of the endpoints within routing slip, exception handler is called as expected but then once the exceptionHandler route is finished, control comes back to the routingslip and rest of the endpoints get executed. No matter what we set on exception route ( such as handled=false), all the endpoints in routing slip eventually gets called. Here is the code snippet from RoutingSlip : for (String nextRecipient : recipients) { EndpointExchange endpoint = resolveEndpoint(exchange, nextRecipient); ProducerExchange producer = producerCache.getProducer(endpoint); Exchange ex = current.newInstance(); updateRoutingSlip(current); copyOutToIn(ex, current); producer.process(ex); current = ex; } We don't see any provision to break from the above loop. Right now, the work around we have adopted is to set EXCEPTION_HANDLED_PROPERTY on the exchange so that the pipeline class does not delegate the request to the actual endpoint. But there is still an overhead of pipeline being called for all the endpoints configured within the routing slip. Any suggestions are welcome. -- View this message in context: http://old.nabble.com/How-to-break-from-routing-slip-in-camel-on-exception--tp26594251p26594251.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: Are sources not published for snapshot builds by design?
Yeah, it should be easy but the deploy is not working in Hudson... source jars are built fine (see http://hudson.zones.apache.org/hudson/job/Camel/510/org.apache.camel$camel-core/) but are then ignored during the Hudson deploy. I've opened a ticket with infra to see if they have any suggestions: https://issues.apache.org/jira/browse/INFRA-2352 On Fri, Nov 27, 2009 at 3:13 AM, Claus Ibsen claus.ib...@gmail.com wrote: On Wed, Nov 25, 2009 at 1:53 PM, Jon Anstey jans...@gmail.com wrote: So I enabled javadoc too yesterday, which does take a long time to generate... The build should now only be deploying source jars. Ah it appears as it only generates one big -src.zip file https://repository.apache.org/content/repositories/snapshots/org/apache/camel/apache-camel/2.1-SNAPSHOT/ I think it should generate -sources.jar for each of the bundles. Then its easy for others to debug and learn Camel. https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-core/2.1-SNAPSHOT/ So is it possible to generate -sources.jar for all the fine grained .jars instead? On Tue, Nov 24, 2009 at 9:19 PM, Jon Anstey jans...@gmail.com wrote: Oh, and it *shouldn't* add too much to the build time... famous last words ;) On Tue, Nov 24, 2009 at 9:19 PM, Jon Anstey jans...@gmail.com wrote: Hey guys, I just updated Hudson to deploy source jars and kicked off a new build. Lemme know if it doesn't work. On Tue, Nov 24, 2009 at 4:40 PM, Claus Ibsen claus.ib...@gmail.com wrote: On Tue, Nov 24, 2009 at 8:05 PM, Barry Kaplan grou...@memelet.com wrote: Its a bit painful to have to generate and install the source jars everyday. Would it be possible to publish them to the repository? Its Apache Hudson doing the builds and deploys. http://hudson.zones.apache.org/hudson/ I dont know if that is possible to do as it takes longer time then and its a general server for many of the other Apache projects. Try to get in touch with Gert V. he knows more about this server and what it can do. -- View this message in context: http://old.nabble.com/Are-sources-not-published-for-snapshot-builds-by-design--tp26499928p26499928.html 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.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: Are sources not published for snapshot builds by design?
So I enabled javadoc too yesterday, which does take a long time to generate... The build should now only be deploying source jars. On Tue, Nov 24, 2009 at 9:19 PM, Jon Anstey jans...@gmail.com wrote: Oh, and it *shouldn't* add too much to the build time... famous last words ;) On Tue, Nov 24, 2009 at 9:19 PM, Jon Anstey jans...@gmail.com wrote: Hey guys, I just updated Hudson to deploy source jars and kicked off a new build. Lemme know if it doesn't work. On Tue, Nov 24, 2009 at 4:40 PM, Claus Ibsen claus.ib...@gmail.comwrote: On Tue, Nov 24, 2009 at 8:05 PM, Barry Kaplan grou...@memelet.com wrote: Its a bit painful to have to generate and install the source jars everyday. Would it be possible to publish them to the repository? Its Apache Hudson doing the builds and deploys. http://hudson.zones.apache.org/hudson/ I dont know if that is possible to do as it takes longer time then and its a general server for many of the other Apache projects. Try to get in touch with Gert V. he knows more about this server and what it can do. -- View this message in context: http://old.nabble.com/Are-sources-not-published-for-snapshot-builds-by-design--tp26499928p26499928.html 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.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: Are sources not published for snapshot builds by design?
Hey guys, I just updated Hudson to deploy source jars and kicked off a new build. Lemme know if it doesn't work. On Tue, Nov 24, 2009 at 4:40 PM, Claus Ibsen claus.ib...@gmail.com wrote: On Tue, Nov 24, 2009 at 8:05 PM, Barry Kaplan grou...@memelet.com wrote: Its a bit painful to have to generate and install the source jars everyday. Would it be possible to publish them to the repository? Its Apache Hudson doing the builds and deploys. http://hudson.zones.apache.org/hudson/ I dont know if that is possible to do as it takes longer time then and its a general server for many of the other Apache projects. Try to get in touch with Gert V. he knows more about this server and what it can do. -- View this message in context: http://old.nabble.com/Are-sources-not-published-for-snapshot-builds-by-design--tp26499928p26499928.html 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.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: Are sources not published for snapshot builds by design?
Oh, and it *shouldn't* add too much to the build time... famous last words ;) On Tue, Nov 24, 2009 at 9:19 PM, Jon Anstey jans...@gmail.com wrote: Hey guys, I just updated Hudson to deploy source jars and kicked off a new build. Lemme know if it doesn't work. On Tue, Nov 24, 2009 at 4:40 PM, Claus Ibsen claus.ib...@gmail.comwrote: On Tue, Nov 24, 2009 at 8:05 PM, Barry Kaplan grou...@memelet.com wrote: Its a bit painful to have to generate and install the source jars everyday. Would it be possible to publish them to the repository? Its Apache Hudson doing the builds and deploys. http://hudson.zones.apache.org/hudson/ I dont know if that is possible to do as it takes longer time then and its a general server for many of the other Apache projects. Try to get in touch with Gert V. he knows more about this server and what it can do. -- View this message in context: http://old.nabble.com/Are-sources-not-published-for-snapshot-builds-by-design--tp26499928p26499928.html 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.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: Cyclic dependency in latest 2.1-SNAPSHOT
Oops! Will fix that up right away. On Tue, Nov 17, 2009 at 3:46 PM, Claus Ibsen claus.ib...@gmail.com wrote: Hi This was a bad commit recently. Jonathan, you should move the jms based test you added in camel-test to camel-jms. camel-test should just be the test API and have no dep. on any other than the camel-core. On Tue, Nov 17, 2009 at 7:47 PM, Dragisa Krsmanovic dkrsmano...@plos.org wrote: mvn -Dtest=false clean install [ERROR] BUILD FAILURE [INFO] [INFO] The projects in the reactor contain a cyclic reference: Edge between 'Vertex{label='org.apache.camel:camel-test'}' and 'Vertex{label='org.apache.camel:camel-jms'}' introduces to cycle in the graph org.apache.camel:camel-jms -- org.apache.camel:camel-test -- org.apache.camel:camel-jms -- Dragisa Krsmanovic Java Developer Public Library of Science http://www.plos.org -- This email is confidential to the intended recipient. If you have received it in error, please notify the sender and delete it from your system. Any unauthorized use, disclosure or copying is not permitted. The views or opinions presented are solely those of the sender and do not necessarily represent those of Public Library of Science unless otherwise specifically stated. Please note that neither Public Library of Science nor any of its agents accept any responsibility for any viruses that may be contained in this e-mail or its attachments and it is your responsibility to scan the e-mail and attachments (if any). -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: Geronimo 2.2 Release Status
I have no idea about the Geronimo release plans. I've copied the Geronimo users list for further info. On Sun, Nov 15, 2009 at 4:51 PM, frapien frank.pien...@gmx.de wrote: How are the plans? Will Geronimo 2.2 get out this year? Are there any open isues? Releaseplan speaks from Proposed Release date: 3Q2009 http://cwiki.apache.org/GMOxPMGT/geronimo-22-release-status.html Thanks for information Frank -- View this message in context: http://old.nabble.com/Geronimo-2.2-Release-Status-tp26362898p26362898.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: Release plans for Camel 2.1
I think we're aiming to have 2.1 available by the end of the year. On Sun, Nov 15, 2009 at 5:15 PM, frapien frank.pien...@gmx.de wrote: are there any release plans with dates for Camel 2.1? http://camel.apache.org/camel-210-release.html Thanks for sharing, Frank -- View this message in context: http://old.nabble.com/Release-plans-for-Camel-2.1-tp26363137p26363137.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: Problem of skipped items/stories in Camel RSS reader
Yeah, I considered using Apache Abdera to do the RSS support under the hood but at the time it was just a bit of code in a sandbox. Now, its still not released anywhere :) I guess for now we'll just stick with ROME. Though, maybe in the future we can consider Abdera if it is better. On Thu, Nov 5, 2009 at 11:21 AM, Claus Ibsen claus.ib...@gmail.com wrote: Hi I wonder if that ROME library is maintained anymore. Seems that 1.0 is the last release which is also fairly old. What about that Apache ATOM component. Can't it read RSS feeds also? On Thu, Nov 5, 2009 at 3:46 PM, Cliff Court cl...@vine.co.za wrote: Hi Jon Many thanks for the very prompt reply. The RSS feed we have been testing quite a bit is http://www.iafrica.com/pls/cms/grapevine.xml?p_section=world_news We did check it with a few RSS validators just to be sure it was valid RSS, and it seems to be. That said, we are seeing this with all RSS feeds we're testing. Of course the RSS reader component may not be the issue, perhaps it's the parser that places the feed items onto the ActiveMQ queues, but I thought I'd just ask the community if they seen this behavior generally Many thanks again. Cliff janstey wrote: On Thu, Nov 5, 2009 at 10:32 AM, Cliff Court cl...@vine.co.za wrote: Good Day We have a system which makes use of the Camel RSS reader. We are getting intermittent problems with it whereby not all items/stories within an RSS feed are being read into the Camel system. Unfortunately I am unable to isolate a repeatable case to describe but I was wondering is anyone else has had a similar experience and if you can advise any solutions? I haven't experienced this myself but it sounds pretty bad... are there any more details you can provide of your usecase? Like, are you consuming any public RSS feeds that we can try out? Related to this, we are also have a problem where, if we update the publication date of items within the RSS feed, these are also not read. The component documentation refers to configuration such that only 'new' stories are read, but it does not specify what property make a story 'new'. We have assumed it is the publication date but it would be very useful to get clarity on this? To see if a story is new Camel first checks the updated date, if there is no updated date (i.e. its the first post) then the publication date is used. Many thanks Cliff Court -- View this message in context: http://old.nabble.com/Problem-of-skipped-items-stories-in-Camel-RSS-reader-tp26214545p26214545.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com -- View this message in context: http://old.nabble.com/Problem-of-skipped-items-stories-in-Camel-RSS-reader-tp26214545p26215729.html 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.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Re: Running Camel Examples with Maven in version 2.0.0
Whoa, that is bad. I tried out the latest from http://repo2.maven.org/maven2/org/apache/camel/apache-camel/2.0.0/apache-camel-2.0.0.tar.gzand it only seems that examples/camel-example-tracer/pom.xml has the SNAPSHOT (still bad of course but not as bad as all examples containing SNAPSHOTs!). Btw where did you download the distribution? On Thu, Oct 15, 2009 at 6:52 AM, Ryadh Amar magnetic.gan...@gmail.comwrote: Hello Camel Riders, I wanted to tryout some of the examples bundled with the current downloadable distribution of Camel (2.0.0) Maven fails, but I have pinpointed the culprit; in each example, the parent pom (which can be found in the examples directory) is referenced this way: == parent groupIdorg.apache.camel/groupId artifactIdexamples/artifactId version2.0-SNAPSHOT/version /parent == So obviously, since the preconfigured repositories don't allow the download of snapshots, the Maven build fails. The snippet above should be replaced with == parent groupIdorg.apache.camel/groupId artifactIdexamples/artifactId version2.0.0/version /parent == I believe it is important to fix this issue, as newcomers with cursory Maven experience will quickly give up on running the examples. ps. looks like all the examples are affected with the version problem -- View this message in context: http://www.nabble.com/Running-Camel-Examples-with-Maven-in-version-2.0.0-tp25905465p25905465.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon http://janstey.blogspot.com/
Re: Running Camel Examples with Maven in version 2.0.0
No worries. Thanks for reporting this. I think I have a fix for the next release :) On Thu, Oct 15, 2009 at 11:20 AM, Ryadh Amar magnetic.gan...@gmail.comwrote: Hi Janstey, Looks like I was wrong, I really believed that all the examples were affected... Excuse the haste :D But as you've noticed, camel-tracer-example still references the SNAPSHOT. Thanks for you efforts. janstey wrote: Whoa, that is bad. I tried out the latest from http://repo2.maven.org/maven2/org/apache/camel/apache-camel/2.0.0/apache-camel-2.0.0.tar.gzand it only seems that examples/camel-example-tracer/pom.xml has the SNAPSHOT (still bad of course but not as bad as all examples containing SNAPSHOTs!). Btw where did you download the distribution? On Thu, Oct 15, 2009 at 6:52 AM, Ryadh Amar magnetic.gan...@gmail.comwrote: Hello Camel Riders, I wanted to tryout some of the examples bundled with the current downloadable distribution of Camel (2.0.0) Maven fails, but I have pinpointed the culprit; in each example, the parent pom (which can be found in the examples directory) is referenced this way: == parent groupIdorg.apache.camel/groupId artifactIdexamples/artifactId version2.0-SNAPSHOT/version /parent == So obviously, since the preconfigured repositories don't allow the download of snapshots, the Maven build fails. The snippet above should be replaced with == parent groupIdorg.apache.camel/groupId artifactIdexamples/artifactId version2.0.0/version /parent == I believe it is important to fix this issue, as newcomers with cursory Maven experience will quickly give up on running the examples. ps. looks like all the examples are affected with the version problem -- View this message in context: http://www.nabble.com/Running-Camel-Examples-with-Maven-in-version-2.0.0-tp25905465p25905465.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon http://janstey.blogspot.com/ -- View this message in context: http://www.nabble.com/Running-Camel-Examples-with-Maven-in-version-2.0.0-tp25905465p25909007.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon http://janstey.blogspot.com/
Re: reading endpoints from a properties file
You should be able to use a PropertyPlaceholderConfigurer [1] to load up the properties file and then use a URI like uri=${serviceOne} [1] http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.html On Wed, Oct 14, 2009 at 2:25 PM, terminator_007 ankita_so...@intuit.comwrote: my application would have different property file for different environments. For example camel-staging.properties,camel-dev.properties,camel-integration.properties. All these files would have endpoints defined in them for the respective environment. This is a sample properties file serviceOne=http://YY:8080/serviceone/subscriber serviceTwo=http://ZZ:8080/servicetwo/subscriberhttp://YY:8080/serviceone/subscriber%0AserviceTwo=http://ZZ:8080/servicetwo/subscriber How can I refer to these properties in my camel configuration file. here is my camel configuration file. I plan to get the uri for serviceone,servicetwo from the properties file. bean id=soapMessageCreator class=com.SOAPMessageCreator/ bean id=myErrorProcessor class=com.ErrorProcessor / bean id=myDeadLetterErrorHandler class=org.apache.camel.builder.DeadLetterChannelBuilder property name=onRedelivery ref=myErrorProcessor/ property name=deadLetterUri value=activemq:topic:topic.DeadLetter/ property name=redeliveryPolicy ref=myRedeliveryPolicyConfig/ property name=handled value=false/ /bean bean id=myRedeliveryPolicyConfig class=org.apache.camel.processor.RedeliveryPolicy property name=maximumRedeliveries value=3 / property name=redeliverDelay value=1800/ /bean bean id=jbossresolver class=codeandtell.camel.jboss.VFSPackageScanClassResolver/ camelContext id=camel xmlns=http://camel.apache.org/schema/spring; !-- packageorg.apache.camel.example.jmstofile/package-- endpoint id=serviceOneuri= http://YY:8080/serviceone/subscriberhttp://yy:8080/serviceone/subscriber / uri=http://YY:8080/serviceone/subscriber/ endpoint id=serviceTwo uri=http://ZZ:8080/servicetwo/subscriber/ route errorHandlerRef=myDeadLetterErrorHandler from uri=activemq:topic:topic.Patient?clientId=camelClientamp;durableSubscriptionName=patientTopicSubscriber/ to uri=bean:soapMessageCreator/ multicast stopOnException=false pipeline setHeader headerName=endpointURL constantserviceOne/constant /setHeader to ref=serviceOne/ /pipeline pipeline setHeader headerName=endpointURL constantserviceTwo/constant /setHeader to ref=serviceTwo/ /pipeline /multicast /route /camelContext bean id=http class=org.apache.camel.component.http.HttpComponent property name=camelContext ref=camel/ property name=httpConnectionManager ref=myHttpConnectionManager/ /bean bean id=myHttpConnectionManager class=org.apache.commons.httpclient.MultiThreadedHttpConnectionManager property name=params ref=myHttpConnectionManagerParams/ /bean bean id=myHttpConnectionManagerParams class=org.apache.commons.httpclient.params.HttpConnectionManagerParams property name=defaultMaxConnectionsPerHost value=5/ /bean -- View this message in context: http://www.nabble.com/reading-endpoints-from-a-properties-file-tp25894947p25894947.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon http://janstey.blogspot.com/
Re: reading endpoints from a properties file
Oh yeah, forgot about that issue! FYI there is a workaround before we upgrade to Spring 3 http://cmoulliard.blogspot.com/2009/05/trick-to-pass-uri-declared-in-property.html On Wed, Oct 14, 2009 at 2:47 PM, tide08 sachin2...@yahoo.com wrote: Unfortunately spring property place holder cannot replace vars in camel context tag, there is open issue for this: https://issues.apache.org/activemq/browse/CAMEL-1066 Not sure if there is easy solution for this, but you can add custom processor which will encapsulate your endpoint and than expose the property on processor to be replaced by spring's PropertyPlaceHolderConfigurer. janstey wrote: You should be able to use a PropertyPlaceholderConfigurer [1] to load up the properties file and then use a URI like uri=${serviceOne} [1] http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.html On Wed, Oct 14, 2009 at 2:25 PM, terminator_007 ankita_so...@intuit.comwrote: my application would have different property file for different environments. For example camel-staging.properties,camel-dev.properties,camel-integration.properties. All these files would have endpoints defined in them for the respective environment. This is a sample properties file serviceOne=http://YY:8080/serviceone/subscriber serviceTwo=http://ZZ:8080/servicetwo/subscriber http://YY:8080/serviceone/subscriber%0AserviceTwo=http://ZZ:8080/servicetwo/subscriber How can I refer to these properties in my camel configuration file. here is my camel configuration file. I plan to get the uri for serviceone,servicetwo from the properties file. bean id=soapMessageCreator class=com.SOAPMessageCreator/ bean id=myErrorProcessor class=com.ErrorProcessor / bean id=myDeadLetterErrorHandler class=org.apache.camel.builder.DeadLetterChannelBuilder property name=onRedelivery ref=myErrorProcessor/ property name=deadLetterUri value=activemq:topic:topic.DeadLetter/ property name=redeliveryPolicy ref=myRedeliveryPolicyConfig/ property name=handled value=false/ /bean bean id=myRedeliveryPolicyConfig class=org.apache.camel.processor.RedeliveryPolicy property name=maximumRedeliveries value=3 / property name=redeliverDelay value=1800/ /bean bean id=jbossresolver class=codeandtell.camel.jboss.VFSPackageScanClassResolver/ camelContext id=camel xmlns=http://camel.apache.org/schema/spring !-- packageorg.apache.camel.example.jmstofile/package-- endpoint id=serviceOneuri= http://YY:8080/serviceone/subscriber http://yy:8080/serviceone/subscriber / uri=http://YY:8080/serviceone/subscriber/ endpoint id=serviceTwo uri=http://ZZ:8080/servicetwo/subscriber/ route errorHandlerRef=myDeadLetterErrorHandler from uri=activemq:topic:topic.Patient?clientId=camelClientdurableSubscriptionName=patientTopicSubscriber/ to uri=bean:soapMessageCreator/ multicast stopOnException=false pipeline setHeader headerName=endpointURL constantserviceOne/constant /setHeader to ref=serviceOne/ /pipeline pipeline setHeader headerName=endpointURL constantserviceTwo/constant /setHeader to ref=serviceTwo/ /pipeline /multicast /route /camelContext bean id=http class=org.apache.camel.component.http.HttpComponent property name=camelContext ref=camel/ property name=httpConnectionManager ref=myHttpConnectionManager/ /bean bean id=myHttpConnectionManager class=org.apache.commons.httpclient.MultiThreadedHttpConnectionManager property name=params ref=myHttpConnectionManagerParams/ /bean bean id=myHttpConnectionManagerParams class=org.apache.commons.httpclient.params.HttpConnectionManagerParams property name=defaultMaxConnectionsPerHost value=5/ /bean -- View this message in context: http://www.nabble.com/reading-endpoints-from-a-properties-file-tp25894947p25894947.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon http://janstey.blogspot.com/ -- View this message in context: http://www.nabble.com/reading-endpoints-from-a-properties-file-tp25894947p25895352.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon http://janstey.blogspot.com/
Re: human friendliness of camel
I know lately I've been designing most of my Camel apps using a combination of Spring configuration and Java RouteBuilder classes... something like bean id=myrouter1 class=com.mycompany.MyRouteBuilder1/ bean id=myrouter2 class=com.mycompany.MyRouteBuilder1/ ... camelContext id=camel xmlns=http://camel.apache.org/schema/spring; routeBuilder ref=myrouter1/ routeBuilder ref=myrouter2/ /camelContext Which keeps things nice and separated. Also, if visualization is something you are looking for, the FUSE Integration Designer lets you create routes visually http://fusesource.com/products/fuse-integration-designer/ On Tue, Oct 6, 2009 at 11:28 AM, Bruno Borges bruno.bor...@gmail.comwrote: I don't know how to do this exactly, but what the maven goal does is to start Spring Context, that starts Camel Context, and then process the routes built by the XML configuration file. If you do something through Spring, to load the routes written in Java, you can achieve the same thing. For your organization, I believe it depends on your design. Specific RouteBuilders for specific routes. Global RouteBuilders for macro routes that interconnect those specific routes. Anyway, the good thing of DSL in Java/Scala is that you can design the way you think is more appropriate, though in XML the same can be done. Cheers, Bruno Borges blog.brunoborges.com.br +55 21 76727099 The glory of great men should always be measured by the means they have used to acquire it. - Francois de La Rochefoucauld On Tue, Oct 6, 2009 at 9:51 AM, uprooter uproo...@gmail.com wrote: Hello. I have some thoughts on how to design my camel based application. Basically it has to do JMS mediation most of the time, I want to stick to java code rather than XML configuration so I have a bunch of routes written in java DSL. Right now I have one or two RouteBuilders, each holding a bunch of routes. but it's not comfortable to work with as the IDE(netbeans in that case) cannot distinguish between routes. Is there another way to split the routes into classes or have some other way to make things more organized for the human reader ? PS I tried to create a graph using camel-dot however it doesn't seems to work with java DSL. -- View this message in context: http://www.nabble.com/human-friendliness-of-camel-tp25768104p25768104.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon http://janstey.blogspot.com/
Re: errorHandlerRef - camel route vs camel context
Yeah, the scope of the error handler is different in those two cases. When added to the camelContext, it applies to all routes in the context. When applied to a single route, it only applies to that route. On Tue, Aug 11, 2009 at 10:10 AM, Charles Moulliard cmoulli...@gmail.comwrote: Hi, I would like to know if camel behavior is different when attribute errorHandlerRef is defined at the level of camelContext instead of camelRoute ? Regards, Charles Moulliard Senior Enterprise Architect Apache Camel Committer * blog : http://cmoulliard.blogspot.com -- Cheers, Jon http://janstey.blogspot.com/
Re: errorHandlerRef - camel route vs camel context
I think I jumped the gun here... that was a bit obvious :) Charles, are you noticing other differences in behavior? On Tue, Aug 11, 2009 at 10:19 AM, Jon Anstey jans...@gmail.com wrote: Yeah, the scope of the error handler is different in those two cases. When added to the camelContext, it applies to all routes in the context. When applied to a single route, it only applies to that route. On Tue, Aug 11, 2009 at 10:10 AM, Charles Moulliard cmoulli...@gmail.comwrote: Hi, I would like to know if camel behavior is different when attribute errorHandlerRef is defined at the level of camelContext instead of camelRoute ? Regards, Charles Moulliard Senior Enterprise Architect Apache Camel Committer * blog : http://cmoulliard.blogspot.com -- Cheers, Jon http://janstey.blogspot.com/ -- Cheers, Jon http://janstey.blogspot.com/
Re: errorHandlerRef - camel route vs camel context
On Tue, Aug 11, 2009 at 10:42 AM, Charles Moulliard cmoulli...@gmail.comwrote: Jon, During my holidays my colleague has made tests on transacted routes of our project. He noticed what he called some unstabilities in transaction behavior. In consequence, he changed the route definition (removing direct between routes and use queues, change propagation property for Spring Transaction from required to required_new between routes) in order to solve the problem. From my understanding of camel, what he reports to me cannot be related to the use of direct between routes but probably to potentially issues existing between Hibernate/Spring. Nevertheless, I asked this question to check if another parameters (used in transacted routes) could impact transaction handling. Yeah, from my understanding in order to avail of transactions you need to use transaction enabled endpoints like JPA/JMS. Question : If errorHandledRef reference used between the routes is the same, it can be defined at the level of the context instead of each route ? I haven't looked at the code but I would say yes. If this is not the case, we probably need to fix it :) Regards, Charles Moulliard Senior Enterprise Architect Apache Camel Committer * blog : http://cmoulliard.blogspot.com On Tue, Aug 11, 2009 at 2:51 PM, Jon Anstey jans...@gmail.com wrote: I think I jumped the gun here... that was a bit obvious :) Charles, are you noticing other differences in behavior? On Tue, Aug 11, 2009 at 10:19 AM, Jon Anstey jans...@gmail.com wrote: Yeah, the scope of the error handler is different in those two cases. When added to the camelContext, it applies to all routes in the context. When applied to a single route, it only applies to that route. On Tue, Aug 11, 2009 at 10:10 AM, Charles Moulliard cmoulli...@gmail.comwrote: Hi, I would like to know if camel behavior is different when attribute errorHandlerRef is defined at the level of camelContext instead of camelRoute ? Regards, Charles Moulliard Senior Enterprise Architect Apache Camel Committer * blog : http://cmoulliard.blogspot.com -- Cheers, Jon http://janstey.blogspot.com/ -- Cheers, Jon http://janstey.blogspot.com/ -- Cheers, Jon http://janstey.blogspot.com/
Re: Velocity component use of org.apache.camel.velocity.resourceUri header
Yeah, you kinda have to read it a few times to catch that :) I've updated the docs to be a bit more explicit. If you want to extend VelocityEndpoint to reload templates most of the work is already done in the onExchange method (it already creates a new velocity context every time). Though, if you have the contentCache option enabled you would need to ensure that the buffer in ResourceBasedEndpoint gets cleared/reloaded with your new template. Also I've put up a unit test of spinning up new velocity endpoints dynamically (via a custom bean as I mentioned before) if you'd like to use that instead http://svn.apache.org/repos/asf/camel/trunk/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityDynamicTemplateTest.java Let us know how you fare. Cheers, Jon On Tue, Jul 21, 2009 at 6:47 PM, tide08 sachin2...@yahoo.com wrote: Aaah..I totally misunderstood, but it was not explicit in documentation. Would it be good idea to extend velocityEndpoint? If yes, what needs to be done on templateName change? Velocity context refresh? Is there any helpful example I can look at? Thanks again! tide08 wrote: Can someone provide information on how to make use of org.apache.camel.velocity.resourceUri header for velocity component? As per document this should be templateName as String. I don't want to provide templateName in route but use the header mentioned above. But looks like templateName is required for route to be correct. from(direct:start) .to(velocity:testTemplate.vm) I tried providing dummy templateName in route and than set the org.apache.camel.velocity.resourceUri header with actual template I want to use but it still uses the dummy template provided in route. Am I misunderstanding use for that header? Please help. Thanks -- View this message in context: http://www.nabble.com/Velocity-component-use-of-org.apache.camel.velocity.resourceUri-header-tp24592228p24596026.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon http://janstey.blogspot.com/
Re: File Component (2.0-M2) not polling
I think your main method is terminating before Camel has a chance to do anything. org.apache.camel.spring.Main actually starts up a new main thread and waits for completion so it doesn't exit right away. If it fits your usecase, I would recommend just using org.apache.camel.spring.Main. Cheers, Jon On Wed, Jul 22, 2009 at 9:09 AM, arhan ant.arhi...@gmail.com wrote: Hi! I have a following code for processing files (see the code below). And there's a difference in the file component behavior depending on how do I start the app. 1) When using the org.apache.camel.spring.Main the application initializes and starts to poll the directory with desired periods/delays 2) When starting the application via spring context (the main() method in the code snippet), the application initializes and stops without polling the directory at all. Here's the full code snippet: ?xml version=1.0 encoding=UTF-8? beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd; camelContext id=importing xmlns=http://camel.apache.org/schema/spring packagesome.project/package /camelContext /beans package some.project; public class Route extends SpringRouteBuilder { public void configure() { String uri = file:files + ?initialDelay=15000 + delay=1 + useFixedDelay=true + move=backup/${file:name.noext}-${date:now:MMddHHmmssSSS}.xml;//backup expression from(uri). //some processign done here .to(log:abrakadabra?level=DEBUG); } public static void main(String[] args) { new ClassPathXmlApplicationContext(tmp-context.xml); } } ..and here's the log when the app is started via the main() method: 22-07-2009 14:29:59,837 DEBUG DefaultCamelContext - Adding routes from: Routes: [Route[[From[file:files?initialDelay=15000delay=1useFixedDelay=truemove=backup/${file:name.noext}-${date:now:MMddHHmmssSSS}.xml]] - To[log:abrakadabra?level=DEBUG]] routes: [] ... 22-07-2009 14:29:59,837 DEBUG SpringCamelContext - Starting the CamelContext now that the ApplicationContext has started 22-07-2009 14:29:59,837 INFO DefaultCamelContext - Apache Camel 2.0-M2 (CamelContext:importing) is starting 22-07-2009 14:29:59,837 DEBUG DefaultProducerServicePool - Starting service pool: org.apache.camel.impl.defaultproducerservicep...@1df2964 22-07-2009 14:30:00,430 DEBUG DefaultProducerServicePool - Stopping service pool: org.apache.camel.impl.defaultproducerservicep...@1df2964 22-07-2009 14:30:00,430 INFO DefaultCamelContext - Apache Camel 2.0-M2 (CamelContext:importing) started Process finished with exit code 0 And actually the same happens to the timer component, i.e if i just change the uri value to something like timer:cancellationTimer?delay=1000period=1000 The question is, is this a desired behavior, or it is actually a bug, and the only way to fix this is to use org.apache.camel.spring.Main launcher ? Thx, Anton -- View this message in context: http://www.nabble.com/File-Component-%282.0-M2%29-not-polling-tp24604720p24604720.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon http://janstey.blogspot.com/
Re: Velocity component use of org.apache.camel.velocity.resourceUri header
That header is actually what the camel-velocity component *sets* on the message. You can't use it to dynamically configure the template. To do that you'll probably need to create a custom bean that creates a velocity endpoint and sends to it based on what template you need. Something like public class MyBean { ProducerTemplate template; public void sendToNewTemplate(Exchange exchange) { if (template == null) { template = exchange.getContext().createProducerTemplate(); } template.send(velocity: + getNewTemplate(), exchange); } private String getNewTemplate() { return bla...; } } should do it. On Tue, Jul 21, 2009 at 3:24 PM, tide08 sachin2...@yahoo.com wrote: Can someone provide information on how to make use of org.apache.camel.velocity.resourceUri header for velocity component? As per document this should be templateName as String. I don't want to provide templateName in route but use the header mentioned above. But looks like templateName is required for route to be correct. from(direct:start) .to(velocity:testTemplate.vm) I tried providing dummy templateName in route and than set the org.apache.camel.velocity.resourceUri header with actual template I want to use but it still uses the dummy template provided in route. Am I misunderstanding use for that header? Please help. Thanks -- View this message in context: http://www.nabble.com/Velocity-component-use-of-org.apache.camel.velocity.resourceUri-header-tp24592228p24592228.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon http://janstey.blogspot.com/
Re: Enterprise Integration Patters Icons for OpenOffice Draw
Nice work Marco! Mind if I attach this to the Camel wiki? I think this will be useful to a lot of people. On Mon, Jun 15, 2009 at 11:28 AM, Marco Garbelini garbel...@gmail.comwrote: Hi, I went through the trouble of converting some of the icons from the Visio stencil available at the Camel documentation page to the OpenOffice 3.x Draw format. Since we don't have Visio here at the office they will come in quite handy now. This is not a stencil per se so copy-paste is your friend. Hope it helps. /Marco -- Cheers, Jon http://janstey.blogspot.com/
Re: Enterprise Integration Patters Icons for OpenOffice Draw
FYI I've added it to this page http://cwiki.apache.org/confluence/display/CAMEL/Enterprise+Integration+Patterns On Mon, Jun 15, 2009 at 1:25 PM, Marco Garbelini ma...@garbelini.netwrote: Hi, Not at all, go ahead. That's the idea. /Marco On Mon, Jun 15, 2009 at 5:14 PM, Jon Anstey jans...@gmail.com wrote: Nice work Marco! Mind if I attach this to the Camel wiki? I think this will be useful to a lot of people. On Mon, Jun 15, 2009 at 11:28 AM, Marco Garbelini garbel...@gmail.comwrote: Hi, I went through the trouble of converting some of the icons from the Visio stencil available at the Camel documentation page to the OpenOffice 3.x Draw format. Since we don't have Visio here at the office they will come in quite handy now. This is not a stencil per se so copy-paste is your friend. Hope it helps. /Marco -- Cheers, Jon http://janstey.blogspot.com/ -- Cheers, Jon http://janstey.blogspot.com/
Re: Camel Printing
As far as interest goes, I think a lot of people would find this very useful. From my own experience I know message queuing + label printing is very popular in the manufacturing sector. Looking forward to more on this project! :) On Fri, May 15, 2009 at 7:32 AM, Martin Gilday martin.li...@imap.cc wrote: Hi, This last week where I work we have made a Camel component for javax.print. Our use case is that we have a JMS queue where a customer ID is placed. The consumer of this generates a personalised PDF document by merging in their name, address etc. Then the filename is placed on another JMS queue. The consumer of that queue is our Camel printing component which has attributes for paper size, duplex etc which creates the print job and sends to the printers queue. So my question is has there ever been a request or attempt to add such a component to Camel, or does another exist? If we were able to make it sufficiently generic (and I got permission to release it from my employers) would there be interest in this contribution to the project? Thanks, Martin. -- Cheers, Jon http://janstey.blogspot.com/
Re: Visio stencil of the EIP patterns relooked for Apache Camel
Very nice! Liking the ServiceMix logo you have there too. Is that a stock image or did you create that one yourself? On Fri, Apr 17, 2009 at 11:25 AM, Charles Moulliard cmoulli...@gmail.comwrote: Jon, Many thanks for your support and also the inspiration of your beautiful icons. Here is a picture of what I have done for the second part of my tutorial ( http://cwiki.apache.org/confluence/download/attachments/113428/routing.jpg ). So you see the icons in action Regards, Charles On Fri, Apr 17, 2009 at 3:06 PM, Jon Anstey jans...@gmail.com wrote: Charles, Very nice icons! The gear one looks cool. This will certainly ease the creation of pretty EIP diagrams. Incidentally I toyed with the idea of creating a stencil for my icons here http://architects.dzone.com/sites/all/files/riderAutoEips1_0.jpg ... but never got started on it. I find graphical editing very painful :) Keep up the amazing work! On Fri, Apr 17, 2009 at 9:38 AM, Charles Moulliard cmoulli...@gmail.com wrote: Hi, I have added a visio stencil file relooked of the EIP patterns to respect the color of Camel : Sand. http://cwiki.apache.org/CAMEL/enterprise-integration-patterns.html(resourceshttp://cwiki.apache.org/CAMEL/enterprise-integration-patterns.html%28resources http://cwiki.apache.org/CAMEL/enterprise-integration-patterns.html%28resources http://cwiki.apache.org/CAMEL/enterprise-integration-patterns.html%28resources section) Note that only a few icons have been retouched. I plan to finalize them next week. I have also add a new Icon representing a working service (icon with the gear) Remark : many thanks for Jonathan Anstey icons because they inspire me ! Regards, Charles SOA Architect -- Cheers, Jon http://janstey.blogspot.com/ -- Cheers, Jon http://janstey.blogspot.com/
Re: SCA Integration
On Wed, Apr 1, 2009 at 4:38 AM, Willem Jiang willem.ji...@gmail.com wrote: Are you kidding ? I think we'll be getting a lot of this today. Just take a peek at James' latest blog post ;) lol! The SCA that I am talking about is Service Component Architecture, and Apache tuscany[1] provides an implementation for it. [1] http://tuscany.apache.org/ Willem Ryan Gardner wrote: On Apr 1, 2009, at 12:10 AM, Willem Jiang wrote: Hi, Sorry, we don't have any SCA relates component in Camel. And We love contributions[1], please feel free to add SCA component[2] if you want to use it in Camel. [1]http://cwiki.apache.org/CAMEL/contributing.html [2]http://camel.apache.org/writing-components.html Willem Zhang,Dafang wrote: Hi, SCA is listed from the front page of Apache Camel, but unlike other technologies, SCA doesn't have an link. Is there any work done in this area, say, integration with Tuscany? Thanks. -- CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024. Is this the SCA you are talking about, or am I missing something? http://www.sca-recovery.org/ ? It looks like a good candidate for camel - it has 12 steps which could probably be implemented using pipes and filters. Ryan -- Cheers, Jon http://janstey.blogspot.com/
Re: content router question
Hmmm looks like my response to this question didn't make it to the old mail list. I sent to users@camel.apache.org but it looks like nabble is only showing stuff from camel-u...@activemq.apache.org On Mon, Feb 9, 2009 at 1:15 PM, Jon Anstey jans...@gmail.com wrote: Try using a bean expression in a choice route from(direct:start).choice() .when().method(myBean, bodyContainsOne).to(mock:x) .otherwise().to(mock:y); where the bean looks like static class MyBean { public static boolean bodyContainsOne(@Body String messageBody) { return messageBody.indexOf(1) = 0; } } On Mon, Feb 9, 2009 at 1:06 PM, pevgen pev...@km.ru wrote: Hello. How can I create a content router, if I want to analize a string message body. i try to explain my wish by java-like example : String messageBody = test 1; if (messageBody.indexOf(1)=0) then ... messageBody will be sent to an Endpoint1 else ...messageBody will be sent to an Endpoint2. thanks. Evgeny -- View this message in context: http://www.nabble.com/content-router-question-tp21916527s22882p21916527.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon http://janstey.blogspot.com/ -- Cheers, Jon http://janstey.blogspot.com/
Re: content router question
Ah cool. I thought Hadrian said it MAY be a problem yesterday. I just wanted to share my observations :) On Wed, Feb 11, 2009 at 10:15 AM, Claus Ibsen claus.ib...@gmail.com wrote: Hi Yeah I think Hadrian is on top of this, he need to email the Nabble guys about the Camel move. On Wed, Feb 11, 2009 at 2:26 PM, Jon Anstey jans...@gmail.com wrote: Hmmm looks like my response to this question didn't make it to the old mail list. I sent to users@camel.apache.org but it looks like nabble is only showing stuff from camel-u...@activemq.apache.org On Mon, Feb 9, 2009 at 1:15 PM, Jon Anstey jans...@gmail.com wrote: Try using a bean expression in a choice route from(direct:start).choice() .when().method(myBean, bodyContainsOne).to(mock:x) .otherwise().to(mock:y); where the bean looks like static class MyBean { public static boolean bodyContainsOne(@Body String messageBody) { return messageBody.indexOf(1) = 0; } } On Mon, Feb 9, 2009 at 1:06 PM, pevgen pev...@km.ru wrote: Hello. How can I create a content router, if I want to analize a string message body. i try to explain my wish by java-like example : String messageBody = test 1; if (messageBody.indexOf(1)=0) then ... messageBody will be sent to an Endpoint1 else ...messageBody will be sent to an Endpoint2. thanks. Evgeny -- View this message in context: http://www.nabble.com/content-router-question-tp21916527s22882p21916527.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon http://janstey.blogspot.com/ -- Cheers, Jon http://janstey.blogspot.com/ -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ -- Cheers, Jon http://janstey.blogspot.com/