activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <>
Subject [jira] Created: (AMQCPP-241) Support the standard JMS property type conversion rules.
Date Thu, 30 Apr 2009 18:57:39 GMT
Support the standard JMS property type conversion rules.

                 Key: AMQCPP-241
             Project: ActiveMQ C++ Client
          Issue Type: New Feature
          Components: CMS Impl, Openwire, Stomp
    Affects Versions: 3.0
            Reporter: Timothy Bish
            Assignee: Timothy Bish
             Fix For: 3.0

Currently the CMS Message interface restricts the user from calling a get method on a property
that is not of the type that matches the call, for instance call getIntProperty when the value
contained internally is a long would throw an exception.  To make this interface more flexible
and to allow for stomp support to work properly in the new architecture it is necessary to
support conversion of all the elements in the properties to a string type.  Since this happens
automatically as a result of implementing the standard JMS conversion table it makes sense
to do this in a way that's allows the CMS interface implementation to benefit from it as well.

The implementation follows the same rules as defined in the JMS API docs for the Message Interface.

Message properties support the following conversion table. The marked cases must be supported.
The unmarked cases must throw a JMSException. The String-to-primitive conversions may throw
a runtime exception if the primitive's valueOf method does not accept the String as a valid
representation of the primitive.

A value written as the row type can be read as the column type.

 |        | boolean byte short int long float double String 
 |boolean |    X                                       X
 |byte    |          X     X    X   X                  X 
 |short   |                X    X   X                  X 
 |int     |                     X   X                  X 
 |long    |                         X                  X 
 |float   |                               X     X      X 
 |double  |                                     X      X 
 |String  |    X     X     X    X   X     X     X      X 


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

View raw message