Search in sources :

Example 1 with ActiveMQObjectMessage

use of org.apache.activemq.artemis.jms.client.ActiveMQObjectMessage in project activemq-artemis by apache.

the class MessageHeaderTest method testCopyOnForeignObjectMessage.

@Test
public void testCopyOnForeignObjectMessage() throws JMSException {
    ClientMessage clientMessage = new ClientMessageImpl(ActiveMQTextMessage.TYPE, true, 0, System.currentTimeMillis(), (byte) 4, 1000);
    ClientSession session = new FakeSession(clientMessage);
    ObjectMessage foreignObjectMessage = new SimpleJMSObjectMessage();
    ActiveMQObjectMessage copy = new ActiveMQObjectMessage(foreignObjectMessage, session, null);
    MessageHeaderTestBase.ensureEquivalent(foreignObjectMessage, copy);
}
Also used : ObjectMessage(javax.jms.ObjectMessage) ActiveMQObjectMessage(org.apache.activemq.artemis.jms.client.ActiveMQObjectMessage) ClientSession(org.apache.activemq.artemis.api.core.client.ClientSession) ActiveMQObjectMessage(org.apache.activemq.artemis.jms.client.ActiveMQObjectMessage) ClientMessage(org.apache.activemq.artemis.api.core.client.ClientMessage) ClientMessageImpl(org.apache.activemq.artemis.core.client.impl.ClientMessageImpl) Test(org.junit.Test)

Aggregations

ObjectMessage (javax.jms.ObjectMessage)1 ClientMessage (org.apache.activemq.artemis.api.core.client.ClientMessage)1 ClientSession (org.apache.activemq.artemis.api.core.client.ClientSession)1 ClientMessageImpl (org.apache.activemq.artemis.core.client.impl.ClientMessageImpl)1 ActiveMQObjectMessage (org.apache.activemq.artemis.jms.client.ActiveMQObjectMessage)1 Test (org.junit.Test)1