You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Charles Moulliard <cm...@gmail.com> on 2009/06/30 16:17:34 UTC

Strange issue with Camel 2.0/JMS/POJO

Hi,

Here is the problem that I have : the method transformNotificationMessage of
my POJO is never called :

          ....

            <!-- Update Notification status -->
            <camel:bean ref="serviceHelper"
method="updateNotificationStatus" />

            <!-- Put result in queue -->
            <camel:to ref="queueNotificationMessageEndpoint" />

        </camel:route>

        <camel:route>
            <camel:from ref="queueNotificationMessageEndpoint" />
            <!--
                <camel:convertBodyTo
                type="com.xpectis.x3s.platform.model.NotificationMessage" />
            -->
       *     <camel:bean ref="serviceHelper"
method="transformNotificationMessage" />*

            <!-- Check if the notification has been transformed -->
            <camel:choice>
                <camel:when>
                    <camel:ognl>request.headers.ProcessingStatus =
true</camel:ognl>
                    <camel:to
ref="directTransformedNotificationMessageEndpoint" />
                </camel:when>
                <camel:when>
                    <camel:ognl>request.headers.ProcessingStatus =
false</camel:ognl>
                    <camel:to ref="queueReportingEndpoint" />
                </camel:when>
                <camel:otherwise>
                    <camel:to ref="queueReportingEndpoint" />
                </camel:otherwise>
            </camel:choice>

        </camel:route>

Remark : I have disabled temporary the convertBody after reading message
from the queue but the problem is the same if I use it

Can the error be related to InOut or InOnly process of the queue called
before to go to the bean transformNotificationMessage ?

Regards,


Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com

Re: Strange issue with Camel 2.0/JMS/POJO

Posted by Charles Moulliard <cm...@gmail.com>.
like this :

        <camel:route>
            <camel:from ref="queueNotificationMessageEndpoint" />
            <camel:to uri="log:myLog" />


Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com


On Tue, Jun 30, 2009 at 4:55 PM, Willem Jiang <wi...@gmail.com>wrote:

> Hi Charles,
>
> I guess the error may relate to your queueNotificationMessageEndpoint.
> Can you add the log after the <camel:from
> ref="queueNotificationMessageEndpoint" />
> to see if the consumer is working ?
>
> Willem
>
>
> Charles Moulliard wrote:
>
>> Hi,
>>
>> Here is the problem that I have : the method transformNotificationMessage
>> of
>> my POJO is never called :
>>
>>          ....
>>
>>            <!-- Update Notification status -->
>>            <camel:bean ref="serviceHelper"
>> method="updateNotificationStatus" />
>>
>>            <!-- Put result in queue -->
>>            <camel:to ref="queueNotificationMessageEndpoint" />
>>
>>        </camel:route>
>>
>>        <camel:route>
>>            <camel:from ref="queueNotificationMessageEndpoint" />
>>            <!--
>>                <camel:convertBodyTo
>>                type="com.xpectis.x3s.platform.model.NotificationMessage"
>> />
>>            -->
>>       *     <camel:bean ref="serviceHelper"
>> method="transformNotificationMessage" />*
>>
>>            <!-- Check if the notification has been transformed -->
>>            <camel:choice>
>>                <camel:when>
>>                    <camel:ognl>request.headers.ProcessingStatus =
>> true</camel:ognl>
>>                    <camel:to
>> ref="directTransformedNotificationMessageEndpoint" />
>>                </camel:when>
>>                <camel:when>
>>                    <camel:ognl>request.headers.ProcessingStatus =
>> false</camel:ognl>
>>                    <camel:to ref="queueReportingEndpoint" />
>>                </camel:when>
>>                <camel:otherwise>
>>                    <camel:to ref="queueReportingEndpoint" />
>>                </camel:otherwise>
>>            </camel:choice>
>>
>>        </camel:route>
>>
>> Remark : I have disabled temporary the convertBody after reading message
>> from the queue but the problem is the same if I use it
>>
>> Can the error be related to InOut or InOnly process of the queue called
>> before to go to the bean transformNotificationMessage ?
>>
>> Regards,
>>
>>
>> Charles Moulliard
>> Senior Enterprise Architect
>> Apache Camel Committer
>>
>> *****************************
>> blog : http://cmoulliard.blogspot.com
>>
>>
>

Re: Strange issue with Camel 2.0/JMS/POJO

Posted by Willem Jiang <wi...@gmail.com>.
Hi Charles,

I guess the error may relate to your queueNotificationMessageEndpoint.
Can you add the log after the <camel:from 
ref="queueNotificationMessageEndpoint" />
to see if the consumer is working ?

Willem

Charles Moulliard wrote:
> Hi,
> 
> Here is the problem that I have : the method transformNotificationMessage of
> my POJO is never called :
> 
>           ....
> 
>             <!-- Update Notification status -->
>             <camel:bean ref="serviceHelper"
> method="updateNotificationStatus" />
> 
>             <!-- Put result in queue -->
>             <camel:to ref="queueNotificationMessageEndpoint" />
> 
>         </camel:route>
> 
>         <camel:route>
>             <camel:from ref="queueNotificationMessageEndpoint" />
>             <!--
>                 <camel:convertBodyTo
>                 type="com.xpectis.x3s.platform.model.NotificationMessage" />
>             -->
>        *     <camel:bean ref="serviceHelper"
> method="transformNotificationMessage" />*
> 
>             <!-- Check if the notification has been transformed -->
>             <camel:choice>
>                 <camel:when>
>                     <camel:ognl>request.headers.ProcessingStatus =
> true</camel:ognl>
>                     <camel:to
> ref="directTransformedNotificationMessageEndpoint" />
>                 </camel:when>
>                 <camel:when>
>                     <camel:ognl>request.headers.ProcessingStatus =
> false</camel:ognl>
>                     <camel:to ref="queueReportingEndpoint" />
>                 </camel:when>
>                 <camel:otherwise>
>                     <camel:to ref="queueReportingEndpoint" />
>                 </camel:otherwise>
>             </camel:choice>
> 
>         </camel:route>
> 
> Remark : I have disabled temporary the convertBody after reading message
> from the queue but the problem is the same if I use it
> 
> Can the error be related to InOut or InOnly process of the queue called
> before to go to the bean transformNotificationMessage ?
> 
> Regards,
> 
> 
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
> 
> *****************************
> blog : http://cmoulliard.blogspot.com
>