camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruce Elmore (JIRA)" <>
Subject [jira] Commented: (CAMEL-653) Bean method lost when sending a message from one JMS queue to another
Date Wed, 02 Jul 2008 13:00:06 GMT


Bruce Elmore commented on CAMEL-653:

Keep in mind that if the user is using WebLogic's JMS (at least WL 9.2), a message with the
header named "org.apache.camel.Method" will be rejected when you initially try to add it to
a queue.

The problem that I was initially describing (the header getting stripped off when writing
to second queue) would be true regardless of the implementation of the JMS queue (even ActiveMQ).

Off the top of my head, I'd think a solution would be to change the constant to use the underscores
and change the logic in the BeanProcessor and BeanInfo to handle the method being specified
by either "org.apache.camel.Method" or "org_apache_camel_Method".

> Bean method lost when sending a message from one JMS queue to another
> ---------------------------------------------------------------------
>                 Key: CAMEL-653
>                 URL:
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-jms
>    Affects Versions: 1.3.0, 1.4.0
>         Environment: Windows XP, ActiveMQ
>            Reporter: Bruce Elmore
>            Assignee: Claus Ibsen
>             Fix For: 1.4.0
> I noticed a problem in If Camel has read a JMS message from a queue
and that message has a bean method specified in the header ("org.apache.camel.MethodName"),
the method header will removed if that message is written to another queue. Here's the offending
>     protected boolean shouldOutputHeader(org.apache.camel.Message camelMessage, String
>                                          Object headerValue) { 
>         return headerValue != null && !getIgnoreJmsHeaders().contains(headerName)

>                && ObjectHelper.isJavaIdentifier(headerName); 
>     } 
> "org.apache.camel.MethodName" fails the check isJavaIdentifier and is excluded from the
headers written to the new message. I'm not sure the purpose of this check, but this might
be an unintended side effect. 
> The call chain is something like this: 
> JmsProducer.process 
> JmsBinding.makeJmsMessage 
> JmsBinding.appendJmsProperties 
> JmsBinding.shouldOutputHeader 
> Update: Experimenting later with WebLogic's JMS, I noticed that WebLogic (9.2) does not
allow this header name. Maybe this was the original motivation for this check. In order to
be compatible with WebLogic, perhaps the method header name should changed to something like
"CamelMethod". I believe this would correct both problems.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message