activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Davies (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (AMQ-1964) StreamMessage.writeObject() doesn't behave according to the JMS 1.1 specification
Date Wed, 22 Oct 2008 13:04:52 GMT

     [ https://issues.apache.org/activemq/browse/AMQ-1964?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rob Davies resolved AMQ-1964.
-----------------------------

    Fix Version/s: 5.3.0
       Resolution: Fixed

Fixed by svn revision 707064

> StreamMessage.writeObject() doesn't behave according to the JMS 1.1 specification
> ---------------------------------------------------------------------------------
>
>                 Key: AMQ-1964
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1964
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 4.1.1
>            Reporter: Andrew Perepelytsya
>            Assignee: Rob Davies
>             Fix For: 5.3.0
>
>
> The subj method has restrictions on the types of objects it can accept, but those restrictions
aren't implemented. Testcase below.
> {code:java}
> // get a live session
>         ConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false&broker.useJmx=false");
>         Session session = cf.createConnection().createSession(false, Session.AUTO_ACKNOWLEDGE);
>         StreamMessage sm = session.createStreamMessage();
>         // only primitives (with wrappers), String and byte[] are allowed:
>         // http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/jms/StreamMessage.html#writeObject(java.lang.Object)
>         try
>         {
>             sm.writeObject(new Object());
>             fail("Should've failed with MessageFormatException");
>         }
>         catch (MessageFormatException e)
>         {
>             // JMS 1.1 spec, Section 7.3 Standard Exceptions, page 89, 1st paragraph
>             // expected
>         }
> {code}

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


Mime
View raw message