Re: timers processors and parallel processing

2011-07-05 Thread vssundar
Thank you Willem. From your reply I can surmise that this should work as I was not sure if I missed a section indicating lack of such support. I'll try and replicate the problem with a simple test case and will post it here if I am successful. Regards, Sundar -- View this message in context: h

Re: multipart/alternative mail not recognized

2011-07-05 Thread Donald Whytock
I haven't tried ServiceMix, no. I don't believe this is a class loading issue as much as a resource issue. DataHandler looks for a text file called mailcap, which cross-references email content types and classes that handle them. DataHandler looks in a few standard places for it. In the case of

Re: multipart/alternative mail not recognized

2011-07-05 Thread Willem Jiang
As you know there are big differences between the normal standalone JVM class loading and OSGi class loading. We did lots of work in ServiceMix bundles module to hunter down this kind of issues. I'm not sure what kind of error that you meet.Did you have a chance to run the test case within Ser

Re: Having trouble with an InOut route

2011-07-05 Thread Ashwin Karpe
Hi, For starters, I would change the template code to do what is shown in my code stub below Second, You might want to add a trace interceptor to see what is happening along the route http://camel.apache.org/tracer.html http://camel.apache.org/tracer.html Third, the code you have appended is i

Having trouble with an InOut route

2011-07-05 Thread Brendan Long
I've been working on this for a couple days and can't seem to get it working. What I want is to send a message using a ProducerTemplate, have it go to JMS, then another Camel route, then return a response (through the ProducerTemplate). This page seems to indicate that the last message send in the

Re: Is there a way to change a bean config when testing?

2011-07-05 Thread Christian Müller
Why not using the PropertyPlaceholder mechanism and providing a config file for test? That's the way we handle properties which changes from one environment to another. Am 04.07.2011 15:56 schrieb "Alistair Young" : > Camel seems to load its own instances of beans in camel-config.xml > > testProces

Re: CronScheduledRoutePolicy

2011-07-05 Thread Ashwin Karpe
Hi, I understand your requirement, however the CronScheduledRoutePolicy is designed to fire in the following way. - It fires at 10 am. It can then start a route if it has not been started or else do nothing - It then fires again at 4 pm. It can then stop a route if it has not already been

Re: multipart/alternative mail not recognized

2011-07-05 Thread Donald Whytock
Further research suggests it's a bug in JavaMail and/or DataHandler that's related to OSGi. I can code an app that uses JavaMail to check an email, and structure it so it'll work as a bundle. Running it standalone I see the message content as MimeMultipart, which is correct. Running it in Felix

Re: ServiceMix 4.3.1 and Camel 2.8-SNAPSHOT

2011-07-05 Thread Ashwin Karpe
Hi, Can you provide more details such as a> Stack Trace b> How you went about installing the camel-core...? Thanks and Regards, Ashwin... - - Ashwin Karpe Apache Camel Committer & Sr Principal Consultant FUSESource (a Prog

Re: Problem with type converters in unit tests

2011-07-05 Thread Ashwin Karpe
Hi Brendan, Since you are using Eclipse, I would encourage you to use m2Eclipse & Maven. It will add a Maven Dependencies section to your project and you not need to worry about classpath issues. It is much nicer and Maven will automatically include src/main/resources and src/main/java to the cla

Re: Problem with type converters in unit tests

2011-07-05 Thread Brendan Long
I figured this out right after posting. I needed to add src/main/resources as a source folder in Eclipse (so it would pick up META-INF/services/org/apache/camel/TypeConverter). On 2011-07-05 1:43 PM, Brendan Long wrote: > I'm trying to do some unit tests on my type converters in what seems > like

Re: Customizable message layout design?

2011-07-05 Thread boday
a few comments... for #1 - if you need to reuse groups of DSL commands, just define them as routes (using http://camel.apache.org/direct.html direct , etc) and you can call them like methods using a http://camel.apache.org/producertemplate.html producer template , etc... for #2 - not sure what

Problem with type converters in unit tests

2011-07-05 Thread Brendan Long
I'm trying to do some unit tests on my type converters in what seems like an obvious way: public class MyObjectTest extends CamelTestSupport { public void testCamelSerialize() { Exchange exchange = new DefaultExchange(this.context); MyObject object = new MyObject(); exc

ServiceMix 4.3.1 and Camel 2.8-SNAPSHOT

2011-07-05 Thread Laurentiu Trica
Hi I tried to use Camel 2.8-SNAPSHOT in ServiceMix 4.3.1 and I get this error when starting the bundle: Error executing command: The activator org.apache.camel.impl.osgi.Activator for bundle org.apache.camel.camel-core is invalid I saw the Activator class was modified a few times, is there a poss

Re: multipart/alternative mail not recognized

2011-07-05 Thread Donald Whytock
And the answer is, it's a bug. MailBinding in camel-mail is looking for content of type Multipart, whereas what's coming through is javax.mail.util.SharedByteArrayInputStream. But that was reasonable, since the JavaMail javadoc says, "The object returned for a 'multipart' content is always a Mult

Re: Using Restlet inside a servlet container

2011-07-05 Thread Willem Jiang
Hi Stu, Thanks for the patch. I just applied it into the trunk. On 7/5/11 8:53 PM, Stu.C wrote: Thanks Maximilien - that's an excellent help and worked exactly as I'd hoped. I've created a JIRA with a patch https://issues.apache.org/jira/browse/CAMEL-4175 https://issues.apache.org/jira/browse/

Re: The camel's ProducerTemplate is missing...

2011-07-05 Thread Willem Jiang
Hi Babak, It's holiday season. Claus should be on vocation this week. Since Claus is out of town, we are beginning to miss his mails :) On 7/5/11 9:51 PM, bvahdat wrote: Hi all, since couple of days one can easily realize that the Camel's main "Kick-Ass" is missing, you surely know who I'm tak

Re: CronScheduledRoutePolicy

2011-07-05 Thread tnk
property placeholders doesn't help in this case ( The problem is, that route must be running during the working hours (from 10am till 4pm). On other hours it must be stopped. So the routeStartTime and routeStopTime properties are used in CronScheduledRoutePolicy. But deployments are done sometimes

Re: The camel's ProducerTemplate is missing...

2011-07-05 Thread Ashwin Karpe
Hi, Hmm, If so that would be news to me... Though I doubt it very much ;) But I completely agree with your sentiments. Claus is indeed awesome !!! Cheers, Ashwin... - - Ashwin Karpe Apache Camel Committer & Sr Principal Consulta

Re: CronScheduledRoutePolicy

2011-07-05 Thread Ashwin Karpe
Hi, Yes it is possible. Why not use a property placeholder that can be set using a config file and set during deployment. The value should take effect at route startup http://camel.apache.org/properties.html http://camel.apache.org/properties.html http://camel.apache.org/how-do-i-use-spring-pro

The camel's ProducerTemplate is missing...

2011-07-05 Thread bvahdat
Hi all, since couple of days one can easily realize that the Camel's main "Kick-Ass" is missing, you surely know who I'm taking about but to just make it clear I mean Claus Ibsen! Does anybody know if he probably has left the Camel community (of course, that would be really horrible for the Apach

Re: File reading and writing issue

2011-07-05 Thread Taariq Levack
Hi Try file://inputdir/?noop=true noop Default : false If true, the file is not moved or deleted in any way. This option is good for readonly data, or for ETL type requirements. If noop=true, Camel will set idempotent=true as well, to avoid consuming the same files over and over aga

File reading and writing issue

2011-07-05 Thread Gnanaguru S
Hi This code was successful. But here , when i place a xml file in inputdirectory, it is moving out of that folder !. I want it just to copied or the to be just read and move to the queue. Also from the output queue, i want the contents to be written in a peculiar file namely: output.xml.

Re: Using Restlet inside a servlet container

2011-07-05 Thread Stu.C
Thanks Maximilien - that's an excellent help and worked exactly as I'd hoped. I've created a JIRA with a patch https://issues.apache.org/jira/browse/CAMEL-4175 https://issues.apache.org/jira/browse/CAMEL-4175 . Not being able to use the RestletServlet outside of Camel is not a problem for me eit

Re: Camel Blueprint Issue

2011-07-05 Thread Gnanaguru S
Hi Now i got it work with the following code, Thanks a lot. CODE: http://www.osgi.org/xmlns/blueprint/v1.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation=" http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.

Re: ProducerTemplate

2011-07-05 Thread Charles Moulliard
Here is an example from Camel project https://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/produce/ProduceTemplateTest.java https://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/produce

Re: ProducerTemplate

2011-07-05 Thread Kovacs Zsolt
Hi, is there some complete example? because my *producer *variable null (I reproduced exactly what You wrote here, with camelContext defined in beans.xml Thanks, Zsolt On Tue, Jul 5, 2011 at 12:15 PM, Charles Moulliard wrote: > Hi, > > It depends if you camel Spring DSL or Java DSL > > With S

Re: camel-cache: NPE for operations not requiring key

2011-07-05 Thread alberto.zigoni
@Willem: version 2.7.2 solves the problem. @Ashwin: this is the stacktrace I get using 2.6.0: [efaultQuartzScheduler_Worker-1] DefaultErrorHandlerERROR Failed delivery for exchangeId: ID-localhost-64937-1309854451521-0-2. Exhausted after delivery attempt: 1 caught: org.apache.camel.N

Re: Camel Blueprint Issue

2011-07-05 Thread Andrè
the exception says Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'setHeader'. One of '{"http://camel.apache.org/schema/blueprint":description, "http://camel.apache.org/schema/blueprint":body}' is expected. so the setHeader declar

Re: XML TO Queue

2011-07-05 Thread Andrè
http://camel.apache.org/file2.html says that that the pattern for the file component is like that file:directoryName[?options] where directoryName is a directory and not a explicit file path (if you take the fuse ide plugin and create a new project, there will be an example where the file compo

Re: ProducerTemplate

2011-07-05 Thread Charles Moulliard
Hi, It depends if you camel Spring DSL or Java DSL With Spring DSL you can use the following syntax : http://camel.apache.org/schema/spring";> and @Autowired in your PoJo @Autowired private ProducerTemplate producer; Regards, Charles Moulliard Apache Committer Blog : http

ProducerTemplate

2011-07-05 Thread Kovacs Zsolt
Hi, I tried to send some message to Camel endpoint from a bundle containing only a POJO as described in http://camel.apache.org/pojo-producing.html but the producer template is null, how I can initialize? Regards, Zsolt

XML TO Queue

2011-07-05 Thread Gnanaguru S
Hi I want to send a xml file into a queue... http://www.osgi.org/xmlns/blueprint/v1.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation=" http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd";>

Re: Camel elements Usage

2011-07-05 Thread Taariq Levack
Hi This is what the sample code is using for namespace, so take a look at the link and you'll find the XSD http://camel.apache.org/schema/blueprint";> Taariq On 7/5/11, Gnanaguru S wrote: > > Hi > > i was looking and trying out some same code of camel in fuse esb. When i > look into the code,

Re: ProducerTemplate is not started

2011-07-05 Thread ctapobep
Mmh.. In future there might be a lot of places, so I don't think it's a good idea (though Camel context is up and running because server gets the messages, the error happens when it tries to send them). I tried to explicitely invoke ProducerTemplate#start() before sending, and it's the same - it w

Re: Camel Blueprint Issue

2011-07-05 Thread Charles Moulliard
Your first camel route does not contain a 123 --> 123 Regards, Charles On Tue, Jul 5, 2011 at 10:17 AM, Gnanaguru S wrote: > > > Hi > > when i put this code i get the tailed log of this post. Help me

Camel Blueprint Issue

2011-07-05 Thread Gnanaguru S
Hi when i put this code i get the tailed log of this post. Help me out. CODE: http://www.osgi.org/xmlns/blueprint/v1.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation=" http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/bluep

Re: CamelSpringTestSupport::createApplicationContext hangs

2011-07-05 Thread Alistair Young
Hi Willem, here's the camel-config.xml and a snippet from the test case. this is where it hangs if a broker is already running using the same camel config: ctx.refresh(); in other tests, if I start an ActiveMQ broker programmatically it throws an error if a broker is already running but camel

Camel elements Usage

2011-07-05 Thread Gnanaguru S
Hi i was looking and trying out some same code of camel in fuse esb. When i look into the code, i have several things not know.. I see element name like setBody,Sample, route ,... Where it all comes from ... from xml,xslt, some library , or else... where can i get the reference of it.. Sample

Re: Get updated entries from a DataBase

2011-07-05 Thread frblondin
Nevermind, I used this: body -- View this message in context: http://camel.465427.n5.

Re: Get updated entries from a DataBase

2011-07-05 Thread frblondin
Thanks, this works! One last question: how do i split a list in my route? My problem is that the sql component returns a list and I'like to manage each item within the list. In my route below the whole query result (list) is sent to my bean instead of each line individually:

Re: Is there a way to change a bean config when testing?

2011-07-05 Thread Alistair Young
thanks Ashwin Alistair -- mov eax,1 mov ebx,0 int 80 On 4 Jul 2011, at 20:47, Ashwin Karpe wrote: > Hi, > > It is possible to do via the Registry. > > You can store a bean reference in the registry and then refer to it. A > aimple way to do this is to use the "Ref" component. >