Re: Why can not get the data

2013-08-15 Thread Chris Wolf
Do you just need an Http server for unit testing? Maybe take a look at the class HttpTestServer.java in this directory in Git: https://fisheye6.atlassian.com/browse/camel-git/tests/camel-itest/src/test/java/org/apache/camel/itest/http On Wed, Aug 14, 2013 at 11:01 PM, yiwang imawan...@gmail.com

How to use hawtio with Camel web app?

2013-07-18 Thread Chris Wolf
I would like to use hawtio's Camel route diagram view for inspecting and displaying routes. http://hawt.io/getstarted/index.html Since the app will be deployed in a private Intranet, I tried their offline WAR:

Re: How to use hawtio with Camel web app?

2013-07-18 Thread Chris Wolf
Thanks for getting back to me. This didn't work - the first problem was an incompletely declared WEB-INF/web.xml root element, which I fixed, What change did you make? Any chance of a pull request or at least a gist of the latest version? :) It was very minor. I think it it fails because

Re: conditional uri

2013-07-16 Thread Chris Wolf
It depends on what you mean by conditional - if you mean conditional at route-definition time, you can use property placeholders and/or Language Expressions. If you mean conditional at runtime, then I'm pretty sure you can only do that with producer endpoints (i.e. to endpoints) see:

Problem: file language expression being interpreted as Spring property-placeholder.

2013-07-10 Thread Chris Wolf
Hello, I have an endpoint defined as: to id=file.to.data-decrypted

Re: Problem: file language expression being interpreted as Spring property-placeholder.

2013-07-10 Thread Chris Wolf
Thank you! that worked, I used: fileName=$simple{file:onlyname.noext}.$simple{id} On Wed, Jul 10, 2013 at 2:57 PM, Claus Ibsen claus.ib...@gmail.com wrote: You can use $simple{ xxx } as well as the syntax On Wed, Jul 10, 2013 at 7:10 PM, Chris Wolf cwolf.a...@gmail.com wrote: Hello, I have

Re: Why is the file component parameter, consumer.regexPattern not recognized?

2013-07-02 Thread Chris Wolf
in the documentation, for Camel 2.x, the doc page of file component is http://camel.apache.org/file2.html Bilgin On 26 June 2013 22:24, Chris Wolf cwolf.a...@gmail.com wrote: ResolveEndpointFailedException: Failed to resolve endpoint: file://src/test/data?consumer.regexPattern=.*uu%24noop=true due

Re: Problem with DefaultCamelContext EndpointRegistry

2013-07-02 Thread Chris Wolf
endpoints should be in the registry. Non singleton is prototype based and therefore a new instance is created when you call getEndpoint. On Wed, Jun 12, 2013 at 7:41 PM, Chris Wolf cwolf.a...@gmail.com wrote: Ok, have a partial answer - since my Endpoint is not a singleton, I see

Re: Cannot get filter() to work with mandatoryBodyAs

2013-07-02 Thread Chris Wolf
://www.apache.org/foundation/ Apache Member: https://www.apache.org/foundation/members.html https://www.linkedin.com/pub/christian-mueller/11/551/642 On Tue, Jun 11, 2013 at 4:12 PM, Chris Wolf cwolf.a...@gmail.com wrote: I want to impose a filter such that only messages whose body is of type

Re: SFTP: disconnect on route-suspend

2013-06-25 Thread Chris Wolf
Our project has similar requirements - in addition to parameterizing the SFTP connection at runtime, not just at route declaration-time. I was led to believe that, generally, consumers can't be parameterized at runtime, so I made a few attempts at creating my own custom component to do SFTP with

camel-jms sometimes not closing connections/sessions

2013-06-21 Thread Chris Wolf
I have a camel app deployed on JBoss-6, which is using HornetQ as the JMS implementation. There is a route which listens to JMS topic traffic between some 3rd party MDBs, which, I believe use durable, transacted topics, but since the camel route is just listening (consuming) I have the most basic

Problem with DefaultCamelContext EndpointRegistry

2013-06-12 Thread Chris Wolf
I am trying to develop a new component, but it needs to be able to have it's endpoint be registered in the CamelContext endpoint registry. Whenever the runtime tries to call DefaultCamelContext.getEndpoint(String uri) it returns null, even though, in the debugger, I can expand

Re: Problem with DefaultCamelContext EndpointRegistry

2013-06-12 Thread Chris Wolf
*without* that instance qualifier, so it won;t be found in the endpoint registry. Is there an example of a Component whose Endpoint is not a singleton, that I can look at? Or are non-singleton Endpoints some new, untested feature? Thanks, Chris On Wed, Jun 12, 2013 at 3:28 PM, Chris Wolf cwolf.a

Cannot get filter() to work with mandatoryBodyAs

2013-06-11 Thread Chris Wolf
I want to impose a filter such that only messages whose body is of type RemoteFile get through, So per the documentation: http://camel.apache.org/message-filter.html http://camel.apache.org/predicate.html http://camel.apache.org/simple.html I have:

Re: Cannot get filter() to work with mandatoryBodyAs ***DISREGARD***

2013-06-11 Thread Chris Wolf
, Jun 11, 2013 at 10:12 AM, Chris Wolf cwolf.a...@gmail.com wrote: I want to impose a filter such that only messages whose body is of type RemoteFile get through, So per the documentation: http://camel.apache.org/message-filter.html http://camel.apache.org/predicate.html http

Re: Cannot get SFTP component to stop polling

2013-06-10 Thread Chris Wolf
Thanks for the suggestions. So far, I have not done anything programmatically - just tried suspending the route via JMX (jconsole) and when that didn't work, tried stopping the route - that didn't work either. I can't remove the route since it is declarative from Spring-DSL, however, I guess I

How to get JMX-wrapped Component, Endpoint and Consumer?

2013-06-10 Thread Chris Wolf
I notice the standard, out-of-the-box components automatically get the Component, Endpoint and Consumer/Producer wrapped in JMX-managed wrappers - all without the JMX annotations. Poking around in the code, I see: DefaultManagementLifecycleStrategy.onRoutesAdd(...) ..but I don't know how this

Re: Camel Mustache Handlebars components

2013-06-10 Thread Chris Wolf
I'm just curious - how is this any better/different that camel-freemarker? What are the advantages? I ask because am using camel-freemarker and am having the following issue with Freemarker: POJOs correspond to records in a document, normally you pass a collection of POJOs into Freemarker to

Re: Communication between Camel and JBoss AS7

2013-06-10 Thread Chris Wolf
We use JBoss-6 and HornetQ MDBs. (i.e. JMS) On Mon, Jun 10, 2013 at 11:55 AM, ak-dak ku...@dakosy.de wrote: Hi all, I want to develop a camel route which processes a xml message. Below a simple route to demonstrate my use case. route id=processMessage from

Re: Camel Mustache Handlebars components

2013-06-10 Thread Chris Wolf
Oh, I see, ok. Actually, upon further thinking, instead of wrapping the in-memory object graph in SimpleHash - there's an interface called TemplateModelIterator, where, I think I could implement it such that the iterator returned would be an iterator whose next() could return a TemplateModel

Cannot get SFTP component to stop polling

2013-06-07 Thread Chris Wolf
I am using Camel 2.10.4 and need to use SFTP to fetch files. Since the sftp consumer does not support dynamic properties (connecting to different host/directory/user/pass, etc.) I implemented a custom processor which sets up the SftpComponent, SftpEndpoint and SftpConsumer, in what I believe to

Re: idempotentConsumer is not idempotent?

2013-06-06 Thread Chris Wolf
Although you may be wishing for a strict interpretation of idempotent, there are also practical interpretations, e.g. the idempotent option for the file:// component - the whole purpose of this option is to read the file only once, even if it remains in the directory. On Thu, Jun 6, 2013 at 10:07

Re: Camel Quartz and JobStore

2013-05-22 Thread Chris Wolf
Don't forget that JBoss runs it's own instance of Quartz as a service. I'm not sure how you're configuring the JobStore implementation, but if it's via the quartz.properties and the JBoss instance of quartz reads the same properties, then maybe there's a conflict? On Mon, May 20, 2013 at 5:41 PM,

Re: I want to call CamelContext.addRouteDefinition, but it's deprecated - how do I get ModelCamelContext?

2013-05-18 Thread Chris Wolf
with the @deprecated on the CamelContext. But the point was to use ModelCamelContext as this interface is from the model package. Where as CamelContext is from the root. So with the ModelCamelContext you dont have root - model in the dependency triage. On Fri, May 17, 2013 at 10:08 PM, Chris Wolf cwolf.a

Re: How can I dynamically add or modify endpoints in a route?

2013-05-18 Thread Chris Wolf
extends RouteBuilder. Then you can create a new instance of that, and then use the setter to set your options. And in the configure method you can use the getter to get your options, which you can use in the DSL to set the options you want. On Fri, May 17, 2013 at 6:53 PM, Chris Wolf cwolf.a

How can I dynamically add or modify endpoints in a route?

2013-05-17 Thread Chris Wolf
I need to schedule multiple cron jobs in a route. The number and schedules are not known at compile-time, so I need to programatically configure the route at run-time. An abbreviated version of my non-working attempt is shown below. I created an anonymous RouteBuilder, in which I created a

I want to call CamelContext.addRouteDefinition, but it's deprecated - how do I get ModelCamelContext?

2013-05-17 Thread Chris Wolf
In a custom Processor, I am calling CamelContext.addRouteDefinition - but the javadoc says it's deprecated and to use org.apache.camel.model.ModelCamelContex.addRouteDefinition(..) instead. I see that DefaultCamelContext implements ModelCamelContext, so I just cast it like: ModelCamelContext

Re: what's wrong with oracle configuration

2013-05-16 Thread Chris Wolf
First, I see that you're using Oracle-XE. If you're on Windows, be advised that Oracle-XE is only supported on 32bit versions of Windows. I learned the hard way - strange erratic behavior, etc. I advise that if you have 64bit Windows, that you uninstall Oracle-XE and install the standard

Can I deploy multiple instances of the same RoutePolicy on the same route?

2013-05-16 Thread Chris Wolf
I implemented a custom route policy that is similar to the CronScheduledRoutePolicy, except instead of start/resume suspend crontabs, it only has a start/resume crontab and a duration. Well, now I need to support multiple customers,each having different schedules. I was thinking of just adding

Re: What is the best approach to do an asynchronous rendezvous?

2013-05-15 Thread Chris Wolf
| http://www.linkedin.com/in/raulkripalani http://blog.raulkr.net | twitter: @raulvk On Wed, May 15, 2013 at 6:56 PM, Chris Wolf cwolf.a...@gmail.com wrote: In my process, I have two events that must be completed before the third can proceed. One event is the arrival of a certain JMS message

Re: What is the best approach to do an asynchronous rendezvous?

2013-05-15 Thread Chris Wolf
at 9:30 PM, Chris Wolf cwolf.a...@gmail.com wrote: Raúl, Thanks for your ideas. Now it's 3 events without guaranteed order to arrive before triggering the fourth event. As for correlation key, I guess it would be customer-id plus a timestamp that shows the event happened in the last

Why is Camel silently dropping exceptions?

2013-05-14 Thread Chris Wolf
I implemented a custom route policy, which never appeared to be starting. I finally traced with a debugger and found that it's throwing an exception, which appears to be discarded. In the DefaultCamelContext.addRoutes(...) is this code: if (routePolicyList != null !routePolicyList.isEmpty()) {

Re: Why is Camel silently dropping exceptions? *** DISREGARD ***

2013-05-14 Thread Chris Wolf
After RTFM, I see what's happening - sorry for the noise... On Tue, May 14, 2013 at 11:49 AM, Chris Wolf cwolf.a...@gmail.com wrote: I implemented a custom route policy, which never appeared to be starting. I finally traced with a debugger and found that it's throwing an exception, which

How do we have the log: component log to a file?

2013-05-07 Thread Chris Wolf
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

Re: Will camel-websocket work in producer mode from a web app?

2013-05-04 Thread Chris Wolf
Thanks, ok. On Sat, May 4, 2013 at 4:28 AM, Claus Ibsen claus.ib...@gmail.com wrote: Hi No the current camel-websocket is Jetty based. There is a ticket to create a new component using the Atmosphere framework which is container agnostic. On Sat, May 4, 2013 at 4:27 AM, Chris Wolf cwolf.a

Re: CamelHttpUri and Enricher

2013-05-03 Thread Chris Wolf
You didn't paste any of your code In any case, here's what I'm doing and it works: from(direct:readSFTPConfig).routeId(sftp.config) .setHeader(Exchange.HTTP_URI, simple(http:// {{ds.host}}:{{ds.port}}/web/rest/client)) .setHeader(Exchange.HTTP_QUERY, simple(clientId=${in.header.clientId}))

Re: Issue in JSON marshalling

2013-05-03 Thread Chris Wolf
I an answer the first part: xmlJsonFormat.setForceTopLevelObject(true); See: http://camel.apache.org/xmljson.html You might need to instantiate the XmlJsonDataFormat using Spring bean rather then Camel dataFormatsjson/ Currently I'm using Java-DSL, but I think it would look like: bean

Re: Issue in JSON marshalling

2013-05-03 Thread Chris Wolf
/ /dataFormats On Fri, May 3, 2013 at 2:55 PM, Chris Wolf cwolf.a...@gmail.com wrote: I an answer the first part: xmlJsonFormat.setForceTopLevelObject(true); See: http://camel.apache.org/xmljson.html You might need to instantiate the XmlJsonDataFormat using Spring bean rather then Camel

Class Cast error upon deploying Camel web app

2013-05-03 Thread Chris Wolf
Has anyone seen this error? I'm trying to deploy on JBoss6. I was able to deploy before without issues. I guess it's some kind of classloader-Hell issue due to JEE weirdness. Caused by: java.lang.ClassCastException: org.apache.xerces.dom.DeferredElementNSImpl cannot be cast to

Re: Class Cast error upon deploying Camel web app

2013-05-03 Thread Chris Wolf
that jaxb-impl-2.1.13.jar gets included into your WEB-INF/lib folder of your WAR getting precedence to the one from JBoss AS. dependency groupIdcom.sun.xml.bind/groupId artifactIdjaxb-impl/artifactId version2.1.13/version /dependency Babak Chris Wolf wrote Has anyone seen this error

Re: Class Cast error upon deploying Camel web app

2013-05-03 Thread Chris Wolf
Thanks, Chris On Fri, May 3, 2013 at 8:28 PM, Chris Wolf cwolf.a...@gmail.com wrote: Thanks, I tried that and now the error as shown below. Note that jboss6 was built with jdk-1.5, so it comes with it's own xerces/xalan, so I'm thinking there's a class with the JRE baked-in xerces/xalan

Re: Problems with sftp in Camel 2.11.0

2013-04-23 Thread Chris Wolf
What happens if you specify the username as query parameter? sftp://myServer/subdir?username=myUserpassword=myPasswordstepwise=false (I didn't upgrade, so I can't try it) On Tue, Apr 23, 2013 at 8:33 AM, Bengt Rodehav be...@rodehav.com wrote: I just upgraded from Camel 2.10.3 to 2.11.0 and I

Getting a JMS RA-managed ConnectionFactory on JBoss-6.1.0

2013-04-23 Thread Chris Wolf
I am using the jms:// component in a Spring DSL route in JBoss6. I want to publish and subscribe to a topic. If I package my Camel in a web app, it cannot do a JNDI lookup on java:JmsXA, which is the JMS connection factory managed by a resource adapter. If I package the same code as just a

Re: JPA Component Behavior

2013-04-23 Thread Chris Wolf
If you look back at the entire thread: http://camel.465427.n5.nabble.com/JPA-Component-Behavior-td5725781.html#a5731377 You can see that I solved this requirement by implementing a custom PollingConsumerPollStrategy called you use that plus configure the JPA consumer with startScheduler=false

Re: Is the result of this builder reusable? XQueryBuilder.xquery(//foo);

2013-04-19 Thread Chris Wolf
/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Tuesday, April 2, 2013 at 11:01 PM, Chris Wolf wrote: I want to perform an XQuery outside of DSL (in a Processor). Something like: XQueryBuilder hostXQ = XQueryBuilder .xquery

Why doesn't SFTP move option work??

2013-04-17 Thread Chris Wolf
Trying to use Sftp component. I am using localWorkDirectory because I don't want the whole files loaded into memory. Seems like the files *are* being downloaded but they are NOT being moved, on the remote side to the directory indicated by the move option. Here, on a poll, it gets a file,

Re: Why doesn't SFTP move option work??

2013-04-17 Thread Chris Wolf
I notice there's a unit test, FromFtpMoveFileTest, for plain FTP, but not for SFTP - should I file a bug, or am I doing something wrong? On Wed, Apr 17, 2013 at 11:39 AM, Chris Wolf cwolf.a...@gmail.com wrote: Trying to use Sftp component. I am using localWorkDirectory because I don't want

Re: Why doesn't SFTP move option work??

2013-04-17 Thread Chris Wolf
, all programatically. Obviously, I'm missing something. Unfortunately, it's pretty much a show-stopper for us to not be able to SFTP *from* (consume) dynamically (runtime-calculated) URIs. On Wed, Apr 17, 2013 at 4:54 PM, Chris Wolf cwolf.a...@gmail.com wrote: I notice there's a unit test

Re: Is there a way to programmatically get the the downstream endpoint from a custom Processor?

2013-04-12 Thread Chris Wolf
://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Friday, April 12, 2013 at 8:08 AM, Chris Wolf wrote: Hello, I'm implementing a custom Processor - it will have

Re: Is there a standard, DSL way to put message body in registry?

2013-04-12 Thread Chris Wolf
On Thursday, April 11, 2013 at 10:41 PM, Chris Wolf wrote: I know I could implement a custom Processor, but I was wondering if there was a Java and Spring DSL way to put objects in the registry and lookup them up later. Thanks, Chris

I'm confused about FTP option localWorkDirectory

2013-04-12 Thread Chris Wolf
I read the documentation: http://camel.apache.org/ftp.html and want to FTP large files, as such, I don't want the entire file loaded into memory - I thought the localWorkDirectory option would allow this. That web page says, It will download the remote file directly to a local file stream. The

Re: Is there a way to programmatically get the the downstream endpoint from a custom Processor?

2013-04-12 Thread Chris Wolf
that helps, *Raúl Kripalani* Enterprise Architect, Open Source Integration specialist, Program Manager | Apache Camel Committer http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani http://blog.raulkr.net | twitter: @raulvk On Fri, Apr 12, 2013 at 4:36 PM, Chris Wolf cwolf.a

Re: I'm confused about FTP option localWorkDirectory

2013-04-12 Thread Chris Wolf
by calling .convertBodyTo(File.class); Ok, I'm good to go... Thanks, Chris On Fri, Apr 12, 2013 at 12:25 PM, Chris Wolf cwolf.a...@gmail.com wrote: I read the documentation: http://camel.apache.org/ftp.html and want to FTP large files, as such, I don't want the entire file loaded into memory - I

Is there a standard, DSL way to put message body in registry?

2013-04-11 Thread Chris Wolf
I know I could implement a custom Processor, but I was wondering if there was a Java and Spring DSL way to put objects in the registry and lookup them up later. Thanks, Chris

Is there a way to programmatically get the the downstream endpoint from a custom Processor?

2013-04-11 Thread Chris Wolf
Hello, I'm implementing a custom Processor - it will have a ProducerTemplate, which will always send to the next Endpoint, downstream - why do I have to set the defaultEndpoint or defaultEndpointURI? That guarantees hardcoding. Isn't there someway to indicate, upon

Re: Camel routing issue

2013-04-10 Thread Chris Wolf
PM, Chris Wolf cwolf.a...@gmail.com wrote: 1.) You're NOT using my code - it's still the same as you had before 2.) You're still calling setHeader(java.lang.String, java.lang.String) even though I tried to tell you that it has to be setHeader(java.lang.String

Re: Callback after startup from org.apache.camel.main.Main afterStart()

2013-04-10 Thread Chris Wolf
What I did was extend Main, overriding: protected AbstractApplicationContext createDefaultApplicationContext(); The overridden method looks like: @Override public AbstractApplicationContext createDefaultApplicationContext() { AbstractApplicationContext appctx =

Re: How to use quartz to schedule a file transfer ?

2013-04-10 Thread Chris Wolf
You don't directly use the Quartz Component - you use a RoutePolicy, of which two concrete implementations will setup the Quartz Component and register it in the context for you. Here's an example from: http://camel.apache.org/simplescheduledroutepolicy.html ...which I changed a little to match

When is an (S)FTP file no longer in progress?

2013-04-04 Thread Chris Wolf
Hi, I created a custom Processor with producer template to perform SFTP rather then using the sftp component normally, due to the lack of dynamic URI capability for consumer. onent.file.remote.SftpConsumer TRACE Skipping as file is already in progress: CBOE34_MKT_20120319_DAILY.csv The type of

Re: It is possible with Camel to use dynamic consumer? **after context start**

2013-04-03 Thread Chris Wolf
to download all available files you would need to run the code in a while loop as the example on that link. Though you can also add a new route at runtime with the from uri computed. And then stop and remove the route if not longer needed. On Tue, Apr 2, 2013 at 9:36 PM, Chris Wolf cwolf.a

Re: It is possible with Camel to use dynamic consumer? **after context start**

2013-04-03 Thread Chris Wolf
can also add a new route at runtime with the from uri computed. And then stop and remove the route if not longer needed. On Tue, Apr 2, 2013 at 9:36 PM, Chris Wolf cwolf.a...@gmail.com wrote: May I have the ticket #? (so I can watch/follow) When you say, use a java bean - what do you mean

Is the result of this builder reusable? XQueryBuilder.xquery(//foo);

2013-04-02 Thread Chris Wolf
I want to perform an XQuery outside of DSL (in a Processor). Something like: XQueryBuilder hostXQ = XQueryBuilder .xquery(//remote[remoteId/@value='CBOE34']/server/@value); String host = hostXQ.evaluateAsString(exchange); Second question is can I parameterize the XQuery like so:

Re: It is possible with Camel to use dynamic consumer? **after context start**

2013-04-02 Thread Chris Wolf
the connection running for a longer period. On Sun, Mar 31, 2013 at 10:08 PM, Chris Wolf cwolf.a...@gmail.com wrote: Claus, You addressed the issue of dynamic URIs for Consumers back in July-2009: http://camel.465427.n5.nabble.com/Dynamic-consumers-with-Camel-td476433.html However, all

Re: Camel routing issue

2013-04-01 Thread Chris Wolf
31, 2013 at 7:51 PM, Chris Wolf [hidden email]http://user/SendEmail.jtp?type=nodenode=5730152i=0 wrote: Ok, I'm starting to get it - a little bit. As for my concrete example, so far, I have: from(direct:start) .beanRef(config

Content-based routing with Expressions and Predicates

2013-04-01 Thread Chris Wolf
(I took the liberty to change the Subject since the message history has both my FTP issue and Prabu's routing issue - my fault, sorry) Prabu, I strongly recommend getting and reading Claus's book Camel In Action, like Thomas Walzer suggested upon your first post. You also should be familiar

Re: Camel routing issue

2013-03-31 Thread Chris Wolf
Hi Claus, I hate to ask this - but I still don't get it. I thought recipientList was for sending to multiple, runtime-defined recipients. I don't see how this answers the question of sending to one, single recipient, whose URI is dynamically constructed - and in my use-case the dynamic settings

Re: Camel routing issue

2013-03-31 Thread Chris Wolf
, Mar 31, 2013 at 10:27 AM, Chris Wolf cwolf.a...@gmail.com wrote: Hi Claus, I hate to ask this - but I still don't get it. I thought recipientList was for sending to multiple, runtime-defined recipients. I don't see how this answers the question of sending to one, single recipient, whose URI

Re: Camel routing issue

2013-03-31 Thread Chris Wolf
.to(activemq.Inbound.+ header( Type) Please kindly provide with example. Thanks Prabu.n On Mar 31, 2013 11:22 PM, Chris Wolf [via Camel] ml-node+s465427n5730134...@n5.nabble.com wrote: Ok, I'm starting to get it - a little bit. As for my concrete example, so far, I have: from

It is possible with Camel to use dynamic consumer? **after context start**

2013-03-31 Thread Chris Wolf
Claus, You addressed the issue of dynamic URIs for Consumers back in July-2009: http://camel.465427.n5.nabble.com/Dynamic-consumers-with-Camel-td476433.html However, all those use-cases, except for maybe #4, web console, which I can't run all are about calculating the URI *before* the context

Re: Is there a DataFormat to convert XML string to XML Document?

2013-03-30 Thread Chris Wolf
Type Conversion. Raúl. Sent while on the move On 29 Mar 2013 22:40, Chris Wolf cwolf.a...@gmail.com wrote: I don't see any listed here: http://camel.apache.org/data-format.html ...but I find it hard to believe there isn't a way to convert a string to XML without creating a custom

Re: Need help with cxfrs component, actually RESTful service consumption, in general

2013-03-29 Thread Chris Wolf
, March 29, 2013 at 6:35 AM, Chris Wolf wrote: So I have the book, Camel In Action, which is a very good and thorough treatment of camel-core. However, now my development efforts are starting to hit severe turbulence upon making the jump from camel-core to camel-cxf, in particular, how

Re: Need help with cxfrs component, actually RESTful service consumption, in general

2013-03-29 Thread Chris Wolf
://www.ofbizian.com/2012/02/apache-camel-rest-example.html But there is others as well. On Thu, Mar 28, 2013 at 11:35 PM, Chris Wolf cwolf.a...@gmail.com wrote: So I have the book, Camel In Action, which is a very good and thorough treatment of camel-core. However, now my development efforts

Re: Need help with cxfrs component, actually RESTful service consumption, in general

2013-03-29 Thread Chris Wolf
on the restlet documentation web page, but it's not working. So my question is can restlet be use to perform an HTTP GET on a RESTful service that returns a string (actually an xml document)? If so, how? Thanks, Chris On Fri, Mar 29, 2013 at 11:09 AM, Chris Wolf cwolf.a...@gmail.com wrote: Ok

Re: Need help with cxfrs component, actually RESTful service consumption, in general

2013-03-29 Thread Chris Wolf
On Fri, Mar 29, 2013 at 9:23 AM, Sergey Beryozkin sberyoz...@gmail.com wrote: On 29/03/13 11:05, Claus Ibsen wrote: Hi There is also camel-restlet http://camel.apache.org/restlet It may be easier to get hold of and use. But CXF may have more configuration options, but is also IMHO harder

Re: Need help with cxfrs component, actually RESTful service consumption, in general

2013-03-29 Thread Chris Wolf
Hello - I just used camel-http to do my RESTful service invocation and it's good enough for my basic purposes. -Chris On Fri, Mar 29, 2013 at 11:30 AM, Chris Wolf cwolf.a...@gmail.com wrote: On Fri, Mar 29, 2013 at 9:23 AM, Sergey Beryozkin sberyoz...@gmail.com wrote: On 29/03/13 11:05

Is there a DataFormat to convert XML string to XML Document?

2013-03-29 Thread Chris Wolf
I don't see any listed here: http://camel.apache.org/data-format.html ...but I find it hard to believe there isn't a way to convert a string to XML without creating a custom processor to parse string data from a web service. Thanks, Chris

Re: How can I perform immediate shutdown of a context and all it's routes and services, etc.?

2013-03-28 Thread Chris Wolf
On Thu, Mar 28, 2013 at 3:36 AM, Claus Ibsen claus.ib...@gmail.com wrote: [...] have expected. Is there a way to restart the route from the top upon resuming? Or do you recommend any other busy work kind of route to use for RoutePolicy testing? The route only runs if there is messages

Need help with cxfrs component, actually RESTful service consumption, in general

2013-03-28 Thread Chris Wolf
So I have the book, Camel In Action, which is a very good and thorough treatment of camel-core. However, now my development efforts are starting to hit severe turbulence upon making the jump from camel-core to camel-cxf, in particular, how to consume a RESTful service? I read these:

Re: Clearing ThreadLocal when exchange completes

2013-03-26 Thread Chris Wolf
If you're willing to implement a custom policy, you could implement onEchangeDone() http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/RoutePolicy.html#onExchangeDone%28org.apache.camel.Route,%20org.apache.camel.Exchange%29 You could subclass RoutePolicySupport and

Re: How to schedule FTP with quartz?

2013-03-26 Thread Chris Wolf
share some code it would be easier to help you. //Pontus On 22 Mar 2013 22:06, Chris Wolf cwolf.a...@gmail.com wrote: I found the issue with my custom CronScheduledRoutePolicy - initially the startTime/resumeTime are only scheduled in onInit() - so to re-resume (re-start), you need to call

Re: How to schedule FTP with quartz?

2013-03-26 Thread Chris Wolf
at 00:00:00 and then a suspend at 00:05:00, then a new start/resume at 00:10:00 and a new suspends at 00:15:00 and so on. // Pontus On Tue, Mar 26, 2013 at 7:39 PM, Chris Wolf cwolf.a...@gmail.com wrote: Pontus, I actually gave up on CronScheduledRoutePolicy because I don't want to have

Re: Question about the implementation of routepolicy.quartz.ScheduledRoutePolicy

2013-03-26 Thread Chris Wolf
specialist, Program Manager | Apache Camel Committer http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani http://blog.raulkr.net | twitter: @raulvk On Mon, Mar 25, 2013 at 8:08 PM, Chris Wolf cwolf.a...@gmail.com wrote: I am looking at code

Re: How to schedule FTP with quartz?

2013-03-26 Thread Chris Wolf
On Tue, Mar 26, 2013 at 7:39 PM, Chris Wolf cwolf.a...@gmail.com wrote: Pontus, I actually gave up on CronScheduledRoutePolicy because I don't want to have to calculate an absolute suspend time based on the start/resume time. What I need is a cron-based policy that specifies the initial start

Re: Question about the implementation of routepolicy.quartz.ScheduledRoutePolicy

2013-03-26 Thread Chris Wolf
As for the issue with the consumer appearing to continue to poll - I think my cron resume/suspend expressions were overlapping. Thanks, Chris On Tue, Mar 26, 2013 at 10:06 PM, Chris Wolf cwolf.a...@gmail.com wrote: Thanks for the clarification on that. The only problem is that, when using

Re: How can I perform immediate shutdown of a context and all it's routes and services, etc.?

2013-03-25 Thread Chris Wolf
(or 1 sec) etc. And just call stop on CamelContext. And if you extend the CamelTestSupport classes for your unit tests. There may be a method you can override and return 1 to indiciate 1 sec timeout. On Fri, Mar 22, 2013 at 5:23 PM, Chris Wolf cwolf.a...@gmail.com wrote: I am implementing some

Re: SMPP stop route problem

2013-03-25 Thread Chris Wolf
I don't know what your overall route looks like, but I think you will need to tell an upstream messaging component to stop accepting new messages, first, before calling context.stopRoute(rid) and also configure the shutdown strategy to allow sufficient time to process what was already in the

Question about the implementation of routepolicy.quartz.ScheduledRoutePolicy

2013-03-25 Thread Chris Wolf
I am looking at code in org.apache.camel.routepolicy.quartz.ScheduledRoutePolicy - the code that starts/stops/resumes/suspends the route it is a policy for. The question is why is it separately acting on the Consumer? I thought if you call CamelContext.suspendRoute(route) and/or

How can I perform immediate shutdown of a context and all it's routes and services, etc.?

2013-03-22 Thread Chris Wolf
I am implementing some unit tests and if things go wrong I just want to shutdown ASAP without regard for inconsistent states, etc. There's no easy hook in DefaultShutDownStrategy to do that because you need to know the route startup order, so I ended up with this convoluted code (that I kick off

Re: How to schedule FTP with quartz?

2013-03-22 Thread Chris Wolf
don't see it being resumed - I wonder if the RoutePolicy itself is being suspend too? Well, I try it your way also. Thanks, Chris On Wed, Mar 20, 2013 at 4:34 AM, Pontus Ullgren ullg...@gmail.com wrote: Hello, On Tue, Mar 19, 2013 at 11:22 PM, Chris Wolf cwolf.a...@gmail.com wrote: On Mon

Re: How to schedule FTP with quartz?

2013-03-22 Thread Chris Wolf
. Thanks, Chris On Fri, Mar 22, 2013 at 4:04 PM, Chris Wolf cwolf.a...@gmail.com wrote: Pontus, Thanks for that. Since I already has started implementing a class derived from CronScheduledRoutePolicy, I just finished it. It works by starting a Timer thread in onStart/onResume at the end

Re: How to schedule FTP with quartz?

2013-03-19 Thread Chris Wolf
On Mon, Mar 18, 2013 at 4:57 PM, Pontus Ullgren ullg...@gmail.com wrote: Hello Chris, On Mon, Mar 18, 2013 at 8:54 PM, Chris Wolf cwolf.a...@gmail.com wrote: Claus, I have a few further questions about CronScheduledRoutePolicy. I noticed that it has setters such as setRouteStartTime

Re: Programatically adding beans to a registry in a RouteBuilder

2013-03-18 Thread Chris Wolf
It may, or may not be wrapped in PropertyPlaceholderDelegateRegistry, in that case, I would try this: Registry registry = context.getRegistry(); if (registry instanceof PropertyPlaceholderDelegateRegistry) registry =

Re: How to schedule FTP with quartz?

2013-03-04 Thread Chris Wolf
And the scheduled route policy http://camel.apache.org/scheduledroutepolicy.html On Sat, Mar 2, 2013 at 12:15 AM, Chris Wolf cwolf.a...@gmail.com wrote: I have a requirement to download files via FTP during a certain time window and according to a schedule. e.g. Only on trading days between 6:30AM

How to schedule FTP with quartz?

2013-03-01 Thread Chris Wolf
I have a requirement to download files via FTP during a certain time window and according to a schedule. e.g. Only on trading days between 6:30AM and 7:00AM. The FTP component, alone, seems to just do indefinite polling according to delay/initialDelay. From the Camel In Action book, chapter 7, I

Re: Has anyone ever successfully deployed the Camel Web Console on JBoss-6?

2013-02-28 Thread Chris Wolf
(RootResourceUriRules.java:99) [:1.12] at com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1308) [:1.12] If anyone has an idea. Thanks, Chris On Thu, Feb 28, 2013 at 11:47 AM, Chris Wolf cwolf.a...@gmail.com wrote: It's looking like JBoss doesn't like Scala

Is there anyway to configure the JPA component to get it's query (or query parameters) from an inbound message?

2013-02-27 Thread Chris Wolf
I ask because I want the query to be parameterized be the results of up-stream component executions. Thanks, Chris

Re: Is there anyway to configure the JPA component to get it's query (or query parameters) from an inbound message?

2013-02-27 Thread Chris Wolf
I figured out how to do it. If anyone is interested, I can supply details. On Wed, Feb 27, 2013 at 10:54 AM, Chris Wolf cwolf.a...@gmail.com wrote: I ask because I want the query to be parameterized by the results of up-stream component executions. Thanks, Chris

Cannot get @Consumed to work for JpaConsumer endpoint

2013-02-25 Thread Chris Wolf
I have a route whose first endpoint is .from(jpa:...) - i.e. a consumer. I have consumeDelete=false and in my entities, I have a method marked with @Consumed - in this method, I invoke another setter to set a nullable persistent field of type DATE. Everything works, but this date field is still

Re: Cannot get @Consumed to work for JpaConsumer endpoint

2013-02-25 Thread Chris Wolf
consumer needs it, is support for the @Consumed mechanism, which I found out by debugging. Now that I put it back, my @Consumed handler works... On Mon, Feb 25, 2013 at 11:56 AM, Chris Wolf cwolf.a...@gmail.com wrote: I have a route whose first endpoint is .from(jpa:...) - i.e. a consumer. I

Re: Does Camel JPA component implement it's own connection pooling?

2013-02-01 Thread Chris Wolf
:49 PM, Chris Wolf cwolf.a...@gmail.com wrote: James, Ok, now using TransactionTemplate, but I'm back to where I was - the same apparent connection leak, only now the code is hideous with all those nested anonymous classes and whatnot... ;) -Chris static void saveToDB(final

  1   2   >