[jboss-jira] [JBoss JIRA] Commented: (JBMESSAGING-1138) Setting Vector in an ObjectMessage returns a different Object

Clebert Suconic (JIRA) jira-events at lists.jboss.org
Fri Nov 2 16:14:48 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBMESSAGING-1138?page=comments#action_12385855 ] 
            
Clebert Suconic commented on JBMESSAGING-1138:
----------------------------------------------

Testcase for this:

Add this on ObjectMessageTest:


   public void testVecorOnObjectMessage() throws Exception
   {
      java.util.Vector vectorOnMessage = new java.util.Vector();
      vectorOnMessage.add("world!");
      ((ObjectMessage)message).setObject(vectorOnMessage);

      queueProd.send(message);

      ObjectMessage r = (ObjectMessage) queueCons.receive(5000);
      assertNotNull(r);

      java.util.Vector v2 = (java.util.Vector) r.getObject();

      assertEquals(vectorOnMessage.get(0), v2.get(0));
   }


A Fix would be to not use containerTypes on ObjectMessages. Object*Stream will be more optimized to handle these lists and maps anyway.

> Setting Vector in an ObjectMessage returns a different Object
> -------------------------------------------------------------
>
>                 Key: JBMESSAGING-1138
>                 URL: http://jira.jboss.com/jira/browse/JBMESSAGING-1138
>             Project: JBoss Messaging
>          Issue Type: Bug
>    Affects Versions: 1.4.0.SP1
>            Reporter: Clebert Suconic
>         Assigned To: Clebert Suconic
>            Priority: Blocker
>             Fix For: Stable branch
>
>
> Phillip Thurmond reported me this bug:
> If you create an ObjectMessage and set a Vector as the Object, when you receive the message you will aways get an ArrayList.
> Besides this, each element on the ArrayList corresponds to a new writeObject. Case there are references between those messages the graph references are lost.
> I'm setting this as blocker as 4.3 can't be released with this bug, as JBAS performance tests are failing.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list