camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "M.Ismail" <mohammed.h...@gmail.com>
Subject Re: writing a choice() predicate
Date Tue, 24 Aug 2010 16:49:03 GMT

Hi,

Well, I have another customer with the same camel version (2.3) so it's
better to have a single version for both sites unless, there is a good
reason not to. For example, if this issue is solved in a later version I can
consider using camel 2.4 for example.

Thanks,

On Tue, Aug 24, 2010 at 5:00 PM, Yiannis Mavroukakis [via Camel] <
ml-node+2651409-1066751277-45138@n5.nabble.com<ml-node%2B2651409-1066751277-45138@n5.nabble.com>
> wrote:

> Any particular reason why you are using 2.3 ?
>
> On 24 August 2010 13:37, M.Ismail <[hidden email]<http://user/SendEmail.jtp?type=node&node=2651409&i=0>>
> wrote:
>
> >
> > Hi,
> >
> > I'm using Camel 2.3 using java DSL to with a route like that:
> >
> > from("direct:EmRequests")
> >        .log("request's Body is ${in.body}")
> >
> >        .choice()
> >
>  .when(bean("EmLoginBean","isLoggedIn").isNotEqualTo(constant(true)))
> >
> >                .doTry()
> >                        .process(new EmLoginProcessor())
> >                        .to(cxfSessionFactory)
> >                        .process(new EmProcessor())
> >                        .log("Response back to the caller ${body}")
> >
> > .choice().when(property("MarshalAndUnmarshal").isEqualTo(constant(true)))
>
> > //
> > gives me a compilation error
> >                        .convertBodyTo(String.class)
> >                        .end()
> >                .doCatch(ECIEPermissionDenied.class,ECIESystemDown.class)
> >                .process(new ExceptionProcessorHandler())
> >                .end()
> >
> >        .end();
> >
> > I get the following compilation error if I put a choice() inside the
> doTry.
> > Here it is "The method doCatch(Class<ECIEPermissionDenied>,
> > Class<ECIESystemDown>) is undefined for the type ProcessorDefinition"
> >
> > So I tried to put it as a separate Predicate like that:
> >
> >
> > Predicate pred =
> > choice().when(property("MarshalAndUnmarshal").isEqualTo(constant(true)))
> >                .convertBodyTo(String.class)
> >                .end();
> >
> > However, I get this compilation error : "The method choice() is undefined
>
> > for the type MyRouteBuilder"
> >
> > Is there a way to successfully write this Predicate?
> >
> > thanks,
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/writing-a-choice-predicate-tp2651153p2651153.html<http://camel.465427.n5.nabble.com/writing-a-choice-predicate-tp2651153p2651153.html?by-user=t>
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>
>
> ------------------------------
>  View message @
> http://camel.465427.n5.nabble.com/writing-a-choice-predicate-tp2651153p2651409.html
> To start a new topic under Camel - Users, email
> ml-node+465428-424999138-45138@n5.nabble.com<ml-node%2B465428-424999138-45138@n5.nabble.com>
> To unsubscribe from Camel - Users, click here<http://camel.465427.n5.nabble.com/template/NodeServlet.jtp?tpl=unsubscribe_by_code&node=465428&code=bW9oYW1tZWQuaGFueUBnbWFpbC5jb218NDY1NDI4fDIwNzI5Nzg2NDM=>.
>
>
>

-- 
View this message in context: http://camel.465427.n5.nabble.com/writing-a-choice-predicate-tp2651153p2651491.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message