Package org.apache.activemq.command

Examples of org.apache.activemq.command.ActiveMQMapMessage.clearBody()


    public void testGetBoolean() throws JMSException {
        ActiveMQMapMessage msg = new ActiveMQMapMessage();
        msg.setBoolean(name, true);
        msg.setReadOnlyBody(true);
        assertTrue(msg.getBoolean(name));
        msg.clearBody();
        msg.setString(name, "true");
       
        msg = (ActiveMQMapMessage) msg.copy();
       
        assertTrue(msg.getBoolean(name));
View Full Code Here


        assertEquals(msg.getShort("short"), shortValue.shortValue());
        assertTrue(msg.getObject("string") instanceof String);
        assertEquals(msg.getObject("string"), stringValue);
        assertEquals(msg.getString("string"), stringValue);

        msg.clearBody();
        try {
            msg.setObject("object", new Object());
            fail("should have thrown exception");
        } catch (MessageFormatException e) {
        }
View Full Code Here

    }

    public void testClearBody() throws JMSException {
        ActiveMQMapMessage mapMessage = new ActiveMQMapMessage();
        mapMessage.setString("String", "String");
        mapMessage.clearBody();
        assertFalse(mapMessage.isReadOnlyBody());
       
        mapMessage.onSend();
        mapMessage.setContent(mapMessage.getContent());
       
View Full Code Here

       
        mapMessage.onSend();
        mapMessage.setContent(mapMessage.getContent());
       
        assertNull(mapMessage.getString("String"));
        mapMessage.clearBody();
        mapMessage.setString("String", "String");
       
        mapMessage = (ActiveMQMapMessage) mapMessage.copy();

        mapMessage.getString("String");           
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.