I have seperated them and that solves the first item. Thanks.
But I still can't seem to get my errorMock to work.

But when I deploy this to Jetty, the route and errors act as expected.


On Mon, Sep 29, 2008 at 10:22 AM, Claus Ibsen <[EMAIL PROTECTED]> wrote:

> Hi
>
> I don't think you should have both @MessageDriven and Processor in the same
> java class. You should separate these two. This is not commonly used.
>
>
> Med venlig hilsen
>
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
> -----Original Message-----
> From: Mick Knutson [mailto:[EMAIL PROTECTED]
> Sent: 29. september 2008 18:12
> To: Camel; Active MQ
> Subject: Re: issue routing Exchange to custom method in Processor
>
> Can someone help me?
>
> On Fri, Sep 26, 2008 at 3:10 PM, Mick Knutson <[EMAIL PROTECTED]
> >wrote:
>
> > The funny thing is, when I have an error with the message coming from
> this
> > queue, which I do because process(Exchange) does not expect my message
> body,
> > the message gets routed to the proper deadLetter channel.
> >
> >
> >
> >
> > On Fri, Sep 26, 2008 at 12:22 PM, Mick Knutson <[EMAIL PROTECTED]
> >wrote:
> >
> >> I have a Processor with 2 different methods:
> >>
> >> The standard:
> >> *public void process(Exchange exchange) {
> >> *
> >>
> >> and a custom:
> >>
> >>     [EMAIL PROTECTED](uri = Constants.CHANNEL_GG_CS_COMMAND_STATUS)
> >>     public void onMessage(Exchange exchange) *
> >>
> >> Now here is my route:
> >>
> >>        * from(Constants.CHANNEL_GG_CS_CR_ADD)
> >>                 .errorHandler(
> >>
> >> deadLetterChannel(Constants.CHANNEL_GG_CS_CR_ADD_ERROR)
> >> //.maximumRedeliveries(2)
> >>                                 //.initialRedeliveryDelay(1)
> >>                                 .loggingLevel(LoggingLevel.DEBUG)
> >>                 ).processRef("changeRequestController")
> >>                 .to(Constants.CHANNEL_GG_CS_COMMAND_CLUSTER);
> >>
> >>
> >>         // Route for command status updates.
> >>         from(Constants.CHANNEL_GG_CS_COMMAND_STATUS)
> >>                 .errorHandler(
> >>
> >>
> deadLetterChannel(Constants.CHANNEL_GG_CS_COMMAND_STATUS_ERROR).maximumRedeliveries(2)
> >>                                 .initialRedeliveryDelay(1)
> >>                                 .loggingLevel(LoggingLevel.INFO)
> >>
> ).to("bean:changeRequestController?methodName=onMessage");
> >> *
> >>
> >> So when I get a message on *Constants.CHANNEL_GG_CS_CR_ADD my
> >> process(Exchange) method is called, and that rout is fine.
> >>
> >> However, I get a response message back on
> **Constants.CHANNEL_GG_CS_COMMAND_STATUS
> >> but it is also processed by *the *process(Exchange) instead of my
> >> onMessage**(Exchange)*
> >>
> >> I have tried @MessageDriven annotation as well as the route builder but
> >> neither works.
> >>
> >> Am I forced to have each process in a single class?
> >>
> >>
> >>
> >> --
> >> ---
> >> Thank You...
> >>
> >> Mick Knutson
> >> BASE Logic, inc.
> >> (415) 354-4215
> >>
> >> Website: http://baselogic.com
> >> Blog: http://baselogic.com/blog
> >> BLiNC Magazine: http://blincmagazine.com
> >> Linked IN: http://linkedin.com/in/mickknutson
> >> DJ Mick: http://djmick.com
> >> MySpace: http://myspace.com/mickknutson
> >> Vacation Rental: http://tahoe.baselogic.com
> >>
> >>
> >
> >
> > --
> > ---
> > Thank You...
> >
> > Mick Knutson
> > BASE Logic, inc.
> > (415) 354-4215
> >
> > Website: http://baselogic.com
> > Blog: http://baselogic.com/blog
> > BLiNC Magazine: http://blincmagazine.com
> > Linked IN: http://linkedin.com/in/mickknutson
> > DJ Mick: http://djmick.com
> > MySpace: http://myspace.com/mickknutson
> > Vacation Rental: http://tahoe.baselogic.com
> >
> >
>
>
> --
> ---
> Thank You...
>
> Mick Knutson
> BASE Logic, inc.
> (415) 354-4215
>
> Website: http://baselogic.com
> Blog: http://baselogic.com/blog
> BLiNC Magazine: http://blincmagazine.com
> Linked IN: http://linkedin.com/in/mickknutson
> DJ Mick: http://djmick.com
> MySpace: http://myspace.com/mickknutson
> Vacation Rental: http://tahoe.baselogic.com
>



-- 
---
Thank You…

Mick Knutson
BASE Logic, inc.
(415) 354-4215

Website: http://baselogic.com
Blog: http://baselogic.com/blog
BLiNC Magazine: http://blincmagazine.com
Linked IN: http://linkedin.com/in/mickknutson
DJ Mick: http://djmick.com
MySpace: http://myspace.com/mickknutson
Vacation Rental: http://tahoe.baselogic.com

Reply via email to