ProxyAssertSupport.assertEquals(vectorOnMessage.get(0), v2.get(0));
}
public void testObjectIsolation() throws Exception
{
ObjectMessage msgTest = session.createObjectMessage();
ArrayList list = new ArrayList();
list.add("hello");
msgTest.setObject(list);
list.clear();
list = (ArrayList)msgTest.getObject();
ProxyAssertSupport.assertEquals(1, list.size());
ProxyAssertSupport.assertEquals("hello", list.get(0));
list.add("hello2");
msgTest.setObject(list);
list.clear();
list = (ArrayList)msgTest.getObject();
ProxyAssertSupport.assertEquals(2, list.size());
ProxyAssertSupport.assertEquals("hello", list.get(0));
ProxyAssertSupport.assertEquals("hello2", list.get(1));
msgTest.setObject(list);
list.add("hello3");
msgTest.setObject(list);
list = (ArrayList)msgTest.getObject();
ProxyAssertSupport.assertEquals(3, list.size());
ProxyAssertSupport.assertEquals("hello", list.get(0));
ProxyAssertSupport.assertEquals("hello2", list.get(1));
ProxyAssertSupport.assertEquals("hello3", list.get(2));
list = (ArrayList)msgTest.getObject();
list.clear();
queueProd.send(msgTest);
msgTest = (ObjectMessage)queueCons.receive(5000);
list = (ArrayList)msgTest.getObject();
ProxyAssertSupport.assertEquals(3, list.size());
ProxyAssertSupport.assertEquals("hello", list.get(0));
ProxyAssertSupport.assertEquals("hello2", list.get(1));
ProxyAssertSupport.assertEquals("hello3", list.get(2));