[ 
https://issues.apache.org/jira/browse/CAMEL-4492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13115829#comment-13115829
 ] 

Dan Jakubiec commented on CAMEL-4492:
-------------------------------------

For those seeking an interim workaround, I added a getType() function to the 
base class shared by all my JMS messages: 

        public String getType() { 
                return this.getClass().getSimpleName(); 
        } 

Which now makes this work: 

            <route>
                <from uri="activemq:topic:mytopic"/>
                <log logName="bus.messages" message="mytopic = ${body?.type} 
[${body}]"/>
            </route>

                
> Be able to check classtype through simple language
> --------------------------------------------------
>
>                 Key: CAMEL-4492
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4492
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.8.1
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>              Labels: class, expression, patch, simple
>
> See 
> http://camel.465427.n5.nabble.com/How-do-I-access-the-message-class-name-from-Simple-td4842269.html
>  for the full context.
> In short be able to access Object.getClass() for usage in Camel's simple 
> language.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to