Re: How can I handle exception message?

2011-12-05 Thread focaldi
Thanks Willem I used "seda:error" for deadletterurl and it works. Thanks for your help Willem and Claus... -- View this message in context: http://camel.465427.n5.nabble.com/How-can-I-handle-exception-message-tp5051151p5051307.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How can I handle exception message?

2011-12-05 Thread Willem Jiang
You are using the jms endpoint to receive the message, you need to enable the transferExchange option and make sure your exceptions are serializable. On Tue Dec 6 15:25:42 2011, focaldi wrote: Thanks my friends, but it didnt work :( In my main classs : ... camelContext.setHandleFault(true);

Re: How can I handle exception message?

2011-12-05 Thread Claus Ibsen
If you use a JMS destination as dead letter channel, then it only stores the message. Not the stacktrace. If you want to include the stacktrace, you will have to put that into the message as a header yourself, and ensure the value of the header is valid according to the JMS spec, such as a java.la

Re: How can I handle exception message?

2011-12-05 Thread focaldi
Thanks my friends, but it didnt work :( In my main classs : ... camelContext.setHandleFault(true); ... My Dead Letter Queue URL : jms:queue:deadletterqueue Dead Letter Queueu Processor : from("jms:queue:deadletterqueue").process(new ProcessorForSendingEmail ()); Processor class for deadlett

Re: How can I handle exception message?

2011-12-05 Thread Willem Jiang
Hi, The exception is stored in the properties of exchange. You can get it by using below code Throwable exception = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Throwable.class); On Tue Dec 6 14:34:10 2011, focaldi wrote: Hi, I want to do some special thing according to Exception Type.

Re: How can I handle exception message?

2011-12-05 Thread Claus Ibsen
Use exchange.getIn() to access the message. On Tue, Dec 6, 2011 at 7:34 AM, focaldi wrote: > Hi, > > I want to do some special thing according to Exception Type. But there are a > lot of route and when an exeption occured I send the message to deadletter > queue. > >        errorHandler( >    

Re: Camel message -How long custom headers and properties live

2011-12-05 Thread rspeter
Hi Claus, As I said earlier, I am using only header now. But I have issues tracking the header again. I used xpath to store value in a headerName='"test". I can see this header is visible only when I explicitly set its result type to string, otherwise the headername is not visible. Visible heade

How can I handle exception message?

2011-12-05 Thread focaldi
Hi, I want to do some special thing according to Exception Type. But there are a lot of route and when an exeption occured I send the message to deadletter queue. errorHandler( deadLetterChannel("jms:queue:deadletterqueue") ); I wrote a class for deadlette

Re: Camel message -How long custom headers and properties live

2011-12-05 Thread rspeter
Hi Claus, Thanks for the reply. I needed to keep track of the variable/values across queues, so I am using headers now and not property. but I did try what Christian was saying, but it ended up in stack trace. Regards Peter -- View this message in context: http://camel.465427.n5.nabble.com/Cam

Re: Camel message -How long custom headers and properties live

2011-12-05 Thread rspeter
Hi Christian, The transferExchange options requires that the objects are serializable. I tried with the options below, but there were errors. inheritErrorHandler="true"/> java.lang.RuntimeException: org.restlet.data.Parameter at org.apache.activemq.command.ActiveMQObjectMessage.storeC

Re: Odd info logs about startup w/ autoStartup=false

2011-12-05 Thread Jason Dillon
On Dec 1, 2011, at 1:33 AM, Claus Ibsen wrote: > Yeah the wording could be improved. Any recommendation? Is it important to log this information as INFO level? I don't see any of the other attributes of a route logged in this fashion. Is it common that folks set autoStartup(false) and then for

RE: Performance issue with Camel JMS publish/subscribe

2011-12-05 Thread Sven Zethelius
I suspect you aren't caching the connection/sessions. Try wrapping the connectionfactory with a org.springframework.jms.connection.SingleConnectionFactory or org.springframework.jms.connection.CachingConnectionFactory. In your direct case, you have a persisted connections, and most likely a s

Re: Loading two camel context files at start

2011-12-05 Thread bvahdat
As you see in [1] if you don't specify your spring configuration resource explicity (through Main.setApplicationContextUri()), per default Camel sets the *single* configuration to private String applicationContextUri = "META-INF/spring/*.xml"; So that Spring *hits* and *loads* "src/main/resources

Performance issue with Camel JMS publish/subscribe

2011-12-05 Thread RadoslavStoyanov
Hi, I experience the next problem: Created two Endpoints pointing to same JMS topic. The JMS provider is WmBroker. Used Spring xml descriptor to define the Camel context. The first endpoint is used for publishing, the second for subscribing. I instantiated two of our pub/sub API classes to test the

Re: Loading two camel context files at start

2011-12-05 Thread MichaelAtSAG
Thanks Babak, the launch code is below. /** * */ package com.xyz.eda; import org.apache.camel.spring.Main; /** * Launch NERV * */ public class NERV { /** * * @param args * @throws Exception */ public static void main(String[] args) thr

Re: Loading two camel context files at start

2011-12-05 Thread bvahdat
Pasting your java code where you boot up your Spring-IOC-Container would make it easier to answer your question. How do you run/deploy your Camel context? Standalone, inside a JEE-Container or inside Karaf? It seems to me as if something is wired there. But basically you don't have to assign ids t

Re: Loading two camel context files at start

2011-12-05 Thread MichaelAtSAG
I believe I have solved this by making the Camel-Context ID unique: src/main/resources/META-INF/spring/camel-context-1.xml http://camel.apache.org/schema/spring"; id="camel1" src/main/resources/META-INF/spring/camel-context-2.xml http://camel.apache.org/schema/spring"; id="camel

Loading two camel context files at start

2011-12-05 Thread MichaelAtSAG
How do I load two Camel Spring XML context files at start? Env: Two Camel Spring XML files in: src/main/resources/META-INF/spring/camel-context-1.xml src/main/resources/META-INF/spring/camel-context-2.xml When I start, only camel-context-1.xml is loading. If I remove camel-context-1.xml, then

Re: Same thing?

2011-12-05 Thread MichaelAtSAG
Excellent, thanks Claus. -- View this message in context: http://camel.465427.n5.nabble.com/Same-thing-tp5049364p5049406.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Same thing?

2011-12-05 Thread Claus Ibsen
Hi Yes the should be the same. On Mon, Dec 5, 2011 at 5:22 PM, MichaelAtSAG wrote: > Are these two Spring XML expressions functionality equivalent? > > (1) > >         >                 >                        $evtType = 'PartInventoryLow' >                 > > (2) > >         >            

Same thing?

2011-12-05 Thread MichaelAtSAG
Are these two Spring XML expressions functionality equivalent? (1) $evtType = 'PartInventoryLow' (2) $evtType = 'PartInventoryLow' Thanks! Michael -- View this

Re: IncompatibleClassChangeError: Class org.apache.xerces.dom.DeferredElementNSImpl does not implement the requested interface org.w3c.dom.Node / BeanDefinitionParsingException

2011-12-05 Thread bvahdat
Hi, Maybe you want to give it a try to rebuild your application under JDK1.6 and generate your integracja.war from the scratch, as apparently the class org.apache.xerces.dom.DeferredElementNSImpl has been changed in a non-backward compatible way. >From my experience with JBoss, it's also very imp

Re: Riding on org.apache.camel.language.TokenPairPredicateTest

2011-12-05 Thread bvahdat
Hi The fix you provided indeed did mitigated the issue I had on Windows (TokenPairPredicateTest now passes as well), however my viewpoint as I shared in [1] is still pending. Effectively what I would expect to have in LoggingExceptionHandler is the code below, which *per default* rethrows the exce

Re: Way to find out if a message has reached all the destinationtions?

2011-12-05 Thread Hadrian Zbarcea
When a Producer fails to send the message to the destination and exception will be raised. That's the easiest thing to look for. Hadrian On 12/05/2011 09:00 AM, Raul Kripalani wrote: Yes, you can configure an AggregationStrategy to process replies as they come in and determine whether the enti

Re: Way to find out if a message has reached all the destinationtions?

2011-12-05 Thread Raul Kripalani
Yes, you can configure an AggregationStrategy to process replies as they come in and determine whether the entire multicast has succeeded or not. Check out the strategyRef property on [1]. [1] http://camel.apache.org/multicast.html. Regards, Raúl. On 5 December 2011 08:38, Narita Bagchi wrote:

Re: Odd info logs about startup w/ autoStartup=false

2011-12-05 Thread Claus Ibsen
Hi I created a ticket to track this https://issues.apache.org/jira/browse/CAMEL-4744 On Thu, Dec 1, 2011 at 10:33 AM, Claus Ibsen wrote: > Hi > > Yeah the wording could be improved. Any recommendation? > > > On Thu, Dec 1, 2011 at 12:28 AM, Jason Dillon wrote: >> Any reason why these are at INF

Re: It does not support starting Camel as a standalone application?

2011-12-05 Thread Willem Jiang
Did you need camel-scala component ? If not, you can just remove camel-scala from your class path. On Mon Dec 5 14:38:33 2011, 玉峰 wrote: To start Camel as a standalone application, Why is there the following error? It does not support starting Camel as a standalone application? Exception in th

Re: Riding on org.apache.camel.language.TokenPairPredicateTest

2011-12-05 Thread Claus Ibsen
I created a ticket https://issues.apache.org/jira/browse/CAMEL-4742 And have a fix for this in testing. On Mon, Dec 5, 2011 at 10:01 AM, bvahdat wrote: >> Yeah could be OS specific. Do you use Windows? > > the issue is indeed OS specific which is Windows, just saw the retries logic > in org.ap

Re: Problem with detour

2011-12-05 Thread Claus Ibsen
On Thu, Dec 1, 2011 at 9:47 PM, pvenini wrote: > Hi, I'm using a detour so that if a message has a "suscription" flag it then > connects to a database and creates an entry (in addition to the normal > processing of the message). > > from("quickfix:marketdata.cfg"). > filter(header(QuickfixjEndpoin

Re: Riding on org.apache.camel.language.TokenPairPredicateTest

2011-12-05 Thread bvahdat
> Yeah could be OS specific. Do you use Windows? the issue is indeed OS specific which is Windows, just saw the retries logic in org.apache.camel.util.FileUtil.renameFile() as well as a lot of hits on Google... But as I've already mentioned in this thread that's not my concern at all but the way

Re: Camel message -How long custom headers and properties live

2011-12-05 Thread Claus Ibsen
Hi When you send messages with Camel, then only details from the org.apache.camel.Message is being send over the protocols. So for JMS that means, the Camel message body + headers. The properties on the Exchange is *not* part of the message, and will not be send. The properties is stored for the

Re: Riding on org.apache.camel.language.TokenPairPredicateTest

2011-12-05 Thread Claus Ibsen
Yeah could be OS specific. Do you use Windows? On Fri, Dec 2, 2011 at 3:52 PM, bvahdat wrote: > BTW, on the CI-Servers the test passed by the last build [1], so that maybe > it could be an OS issue as well. > > [1] > https://builds.apache.org/job/Camel.trunk.fulltest/org.apache.camel$camel-core/

Re: Velocity without java

2011-12-05 Thread Claus Ibsen
Hi You can use xpath to grab the values you want to use in the velocity template, and set them as headers. /foo/text() Then you can access the ${header.foo} from the velocity template. Mind that when you use xpath and the XML has namespaces, then the xpath expression must use those namespaces a

Way to find out if a message has reached all the destinationtions?

2011-12-05 Thread Narita Bagchi
Is there a way to find out if a message, after multicasting, has reached all destinations or not? ~ Narita ***The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material.