You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Bruce Elmore (JIRA)" <ji...@apache.org> on 2008/06/30 14:58:00 UTC

[jira] Created: (CAMEL-653) Bean method lost when sending a message from one JMS queue to another

Bean method lost when sending a message from one JMS queue to another
---------------------------------------------------------------------

                 Key: CAMEL-653
                 URL: https://issues.apache.org/activemq/browse/CAMEL-653
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-jms
    Affects Versions: 1.3.0
         Environment: Windows XP, ActiveMQ
            Reporter: Bruce Elmore


I noticed a problem in JmsBinding.java. 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 code: 

    protected boolean shouldOutputHeader(org.apache.camel.Message camelMessage, String headerName, 
                                         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.


[jira] Updated: (CAMEL-653) Bean method lost when sending a message from one JMS queue to another

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-653:
------------------------------

        Fix Version/s: 1.5.0
    Affects Version/s: 1.4.0

Also affected by 1.4.

Target for 1.5 to address this. We could for being backwards compatible add two headers
- the original long name with package name with dots
- without packagename

And let the bean component look for the header in the two keys?

Later we could use the ExchangeProperty feature where we have a mean to address more generally the dot problem with JMS destinations.

Bruce are you in a desperate need for a fix? Or can you wait for 1.5?

> Bean method lost when sending a message from one JMS queue to another
> ---------------------------------------------------------------------
>
>                 Key: CAMEL-653
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-653
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-jms
>    Affects Versions: 1.3.0, 1.4.0
>         Environment: Windows XP, ActiveMQ
>            Reporter: Bruce Elmore
>             Fix For: 1.5.0
>
>
> I noticed a problem in JmsBinding.java. 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 code: 
>     protected boolean shouldOutputHeader(org.apache.camel.Message camelMessage, String headerName, 
>                                          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.


[jira] Resolved: (CAMEL-653) Bean method lost when sending a message from one JMS queue to another

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-653.
-------------------------------

    Resolution: Fixed

Okay got it into the trunk now.

See JmsBeanMethodHeaderTest added to jms component unit tests
And there is also one for the file example as well.

Notice only dot to underscore is supported and the header key must still be a java identifier to be accepted, so no other funny chars in the name is allowed.


> Bean method lost when sending a message from one JMS queue to another
> ---------------------------------------------------------------------
>
>                 Key: CAMEL-653
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-653
>             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 JmsBinding.java. 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 code: 
>     protected boolean shouldOutputHeader(org.apache.camel.Message camelMessage, String headerName, 
>                                          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.


[jira] Commented: (CAMEL-653) Bean method lost when sending a message from one JMS queue to another

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43801#action_43801 ] 

Claus Ibsen commented on CAMEL-653:
-----------------------------------

Yes the JMS spec doesn't allow dots in header names for JMS properties.

So either there should be some convention to substitute dots to underscore and reverse when receive the message (not nice).
Or to use simpler header names without dots.

> Bean method lost when sending a message from one JMS queue to another
> ---------------------------------------------------------------------
>
>                 Key: CAMEL-653
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-653
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-jms
>    Affects Versions: 1.3.0
>         Environment: Windows XP, ActiveMQ
>            Reporter: Bruce Elmore
>
> I noticed a problem in JmsBinding.java. 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 code: 
>     protected boolean shouldOutputHeader(org.apache.camel.Message camelMessage, String headerName, 
>                                          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.


[jira] Commented: (CAMEL-653) Bean method lost when sending a message from one JMS queue to another

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43868#action_43868 ] 

Claus Ibsen commented on CAMEL-653:
-----------------------------------

Bruce that was also my first shot on the solution = hacking BeanProcessor to accept headers with underscore as well.
But then again I wanted to try a generic solution that also works for the FileProducer and other areas in Camel where headers use package name.

So a solution to handle {{org.apache.camel}} specially would be ideal for a first shot solution. Or maybe even better replacing all dots with underscore and if the headerkey is a valid java identifier then its accepted.

> Bean method lost when sending a message from one JMS queue to another
> ---------------------------------------------------------------------
>
>                 Key: CAMEL-653
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-653
>             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 JmsBinding.java. 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 code: 
>     protected boolean shouldOutputHeader(org.apache.camel.Message camelMessage, String headerName, 
>                                          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.


[jira] Work started: (CAMEL-653) Bean method lost when sending a message from one JMS queue to another

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on CAMEL-653 started by Claus Ibsen.

> Bean method lost when sending a message from one JMS queue to another
> ---------------------------------------------------------------------
>
>                 Key: CAMEL-653
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-653
>             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 JmsBinding.java. 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 code: 
>     protected boolean shouldOutputHeader(org.apache.camel.Message camelMessage, String headerName, 
>                                          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.


[jira] Commented: (CAMEL-653) Bean method lost when sending a message from one JMS queue to another

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43855#action_43855 ] 

Claus Ibsen commented on CAMEL-653:
-----------------------------------

The workaround works but I am not satisfied. Asking for thoughts on this in the dev forum.
We have the same problem for the FileComponent.

My best shot is to fix Camel headers only by
- the key must start with "org.apache.camel" 
- will use underscore and restore the key when Camel consumes the message again

> Bean method lost when sending a message from one JMS queue to another
> ---------------------------------------------------------------------
>
>                 Key: CAMEL-653
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-653
>             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 JmsBinding.java. 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 code: 
>     protected boolean shouldOutputHeader(org.apache.camel.Message camelMessage, String headerName, 
>                                          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.


[jira] Assigned: (CAMEL-653) Bean method lost when sending a message from one JMS queue to another

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-653:
---------------------------------

    Assignee: Claus Ibsen

> Bean method lost when sending a message from one JMS queue to another
> ---------------------------------------------------------------------
>
>                 Key: CAMEL-653
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-653
>             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.5.0
>
>
> I noticed a problem in JmsBinding.java. 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 code: 
>     protected boolean shouldOutputHeader(org.apache.camel.Message camelMessage, String headerName, 
>                                          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.


[jira] Updated: (CAMEL-653) Bean method lost when sending a message from one JMS queue to another

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-653:
------------------------------

    Fix Version/s: 1.4.0
                       (was: 1.5.0)

I am adding a workaround special for BeanProcessor so we can send {{org.apache.camel.MethodName}} over the wire, and being backwards compatible so end-users doesn't need to change their code.

The workaround is to send {{org.apache.camel.MethodName}} as {{org_apache_camel_MethodName}} and have BeanProcessor fallback to the underscore if the regular key wasn't found.

> Bean method lost when sending a message from one JMS queue to another
> ---------------------------------------------------------------------
>
>                 Key: CAMEL-653
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-653
>             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 JmsBinding.java. 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 code: 
>     protected boolean shouldOutputHeader(org.apache.camel.Message camelMessage, String headerName, 
>                                          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.


[jira] Commented: (CAMEL-653) Bean method lost when sending a message from one JMS queue to another

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43837#action_43837 ] 

Claus Ibsen commented on CAMEL-653:
-----------------------------------

If you have a unit test or route example that demonstrates the bug then we will be faster to implement a fix for it.

> Bean method lost when sending a message from one JMS queue to another
> ---------------------------------------------------------------------
>
>                 Key: CAMEL-653
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-653
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-jms
>    Affects Versions: 1.3.0, 1.4.0
>         Environment: Windows XP, ActiveMQ
>            Reporter: Bruce Elmore
>             Fix For: 1.5.0
>
>
> I noticed a problem in JmsBinding.java. 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 code: 
>     protected boolean shouldOutputHeader(org.apache.camel.Message camelMessage, String headerName, 
>                                          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.


[jira] Commented: (CAMEL-653) Bean method lost when sending a message from one JMS queue to another

Posted by "Bruce Elmore (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43822#action_43822 ] 

Bruce Elmore commented on CAMEL-653:
------------------------------------

Claus,

I'd rather not resort to changing the Camel source myself. On the hand, I know a simple change that I could make (changing the method header name constant in the BeanInfo) that would fix the problem.
Thanks!

Bruce



> Bean method lost when sending a message from one JMS queue to another
> ---------------------------------------------------------------------
>
>                 Key: CAMEL-653
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-653
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-jms
>    Affects Versions: 1.3.0, 1.4.0
>         Environment: Windows XP, ActiveMQ
>            Reporter: Bruce Elmore
>             Fix For: 1.5.0
>
>
> I noticed a problem in JmsBinding.java. 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 code: 
>     protected boolean shouldOutputHeader(org.apache.camel.Message camelMessage, String headerName, 
>                                          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.


[jira] Commented: (CAMEL-653) Bean method lost when sending a message from one JMS queue to another

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43802#action_43802 ] 

Claus Ibsen commented on CAMEL-653:
-----------------------------------

We should agree how to handle properties on exchanges. Maybe all the dot should be removed, even though we favor to use keys that has a package name of some sort.

> Bean method lost when sending a message from one JMS queue to another
> ---------------------------------------------------------------------
>
>                 Key: CAMEL-653
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-653
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-jms
>    Affects Versions: 1.3.0
>         Environment: Windows XP, ActiveMQ
>            Reporter: Bruce Elmore
>
> I noticed a problem in JmsBinding.java. 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 code: 
>     protected boolean shouldOutputHeader(org.apache.camel.Message camelMessage, String headerName, 
>                                          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.


[jira] Commented: (CAMEL-653) Bean method lost when sending a message from one JMS queue to another

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43803#action_43803 ] 

Claus Ibsen commented on CAMEL-653:
-----------------------------------

Marat has a patch to the transactional client not working properly that uses an helper (ExchangeProperties) to access properties on exchanges. Using this indirection we can ensure that dots and other non wanted names is not used.

However we could break old application that still uses dots in the headers. Okay we should discuss this on the dev forum.

> Bean method lost when sending a message from one JMS queue to another
> ---------------------------------------------------------------------
>
>                 Key: CAMEL-653
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-653
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-jms
>    Affects Versions: 1.3.0
>         Environment: Windows XP, ActiveMQ
>            Reporter: Bruce Elmore
>
> I noticed a problem in JmsBinding.java. 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 code: 
>     protected boolean shouldOutputHeader(org.apache.camel.Message camelMessage, String headerName, 
>                                          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.


[jira] Commented: (CAMEL-653) Bean method lost when sending a message from one JMS queue to another

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43853#action_43853 ] 

Claus Ibsen commented on CAMEL-653:
-----------------------------------

There are some tickets for the JMS header exclusion stuff as using illegal characters in MQ / WebLogic is prohibited and what we should do to avoid this problem.

> Bean method lost when sending a message from one JMS queue to another
> ---------------------------------------------------------------------
>
>                 Key: CAMEL-653
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-653
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-jms
>    Affects Versions: 1.3.0, 1.4.0
>         Environment: Windows XP, ActiveMQ
>            Reporter: Bruce Elmore
>             Fix For: 1.5.0
>
>
> I noticed a problem in JmsBinding.java. 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 code: 
>     protected boolean shouldOutputHeader(org.apache.camel.Message camelMessage, String headerName, 
>                                          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.


[jira] Commented: (CAMEL-653) Bean method lost when sending a message from one JMS queue to another

Posted by "Bruce Elmore (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43865#action_43865 ] 

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: https://issues.apache.org/activemq/browse/CAMEL-653
>             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 JmsBinding.java. 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 code: 
>     protected boolean shouldOutputHeader(org.apache.camel.Message camelMessage, String headerName, 
>                                          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.