camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Camel 2.5 JPA Difference From 2.4
Date Thu, 04 Nov 2010 05:07:08 GMT
You need to learn the EIP patterns

What you want is to send the same message to multiple recipients. (same
message to jpa and xslt)
For example the Multicast or Recipient List EIP pattern.



On Thu, Nov 4, 2010 at 2:32 AM, Mark Borner <mark.borner@zurich.com.au>wrote:

>
> Hello:
>
> I'm migrating my Camel 2.4 application to Camel 2.5 and I'm experiencing a
> route in 2.4 that doesn't work under 2.5.
>
> Here's an extract of the route:
>
>         from("{{export.queue}}")
>                 .transacted()
>                 .setHeader(MessageStatusConverter.STATUS,
> constant(MessageStatuses.PROCESSING))
>
> .to("jpa:au.com.zurich.phoenix.gateway.domain.MessageStatus")
>                 .to("xslt:stylesheets/Main.xsl")
>
> Property {{export.queue}} is a JMS queue containing a String message.
>
> Under 2.4:
>
>         the JPA endpoint would call a Type Converter to convert the String
> into a MessageStatus and persist it
>         the XSLT endpoint would receive the *original String message* and
> use it in the transformation
>
> However Under 2.5:
>
>         the JPA endpoint calls a Type Converter to convert the String into
> a MessageStatus and persist it (same as Camel 2.4)
>         BUT the JPA endpoint is now putting the MessageStatus entity into
> the Body
>         So the XSLT endpoint throws an exception:
> CaughtExceptionType:org.apache.camel.ExpectedBodyTypeException,
> CaughtExceptionMessage:Could not extract IN message body as type: interface
> javax.xml.transform.Source body is:
> au.com.zurich.phoenix.gateway.domain.MessageStatus@811151c6,
> StackTrace:org.apache.camel.ExpectedBodyTypeException: Could not extract IN
> message body as type: interface javax.xml.transform.Source body is:
> au.com.zurich.phoenix.gateway.domain.MessageStatus@811151c6
>
> Could someone confirm that this is a behaviour change between 2.4 and 2.5?
>  And provide me with a work around/change to achieve what I previously could
> achieve?
>
> Thanks,
> Mark
>
> Mark Borner
> Java Developer - ZStream Xpress
>
>
>
>
> ----
> This email is intended for the named recipient only. It may contain
> information which is confidential, commercially sensitive, or
> copyright. If you are not the intended recipient you must not
> reproduce or distribute any part of the email, disclose its contents,
> or take any action in reliance. If you have received this email in
> error, please contact the sender and delete the message. It is your
> responsibility to scan this email and any attachments for viruses and
> other defects. To the extent permitted by law, Zurich and its
> associates will not be liable for any loss or damage arising in any
> way from this communication including any file attachments. We may
> monitor email you send to us, either as a reply to this email or any
> email you send to us, to confirm our systems are protected and for
> compliance with company policies. Although we take reasonable
> precautions to protect the confidentiality of our email systems, we
> do not warrant the confidentiality or security of email or
> attachments we receive.
>
>


-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

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