Package org.jboss.as.test.integration.ejb.mdb.objectmessage

Examples of org.jboss.as.test.integration.ejb.mdb.objectmessage.SimpleMessageInEarLibJar


    public void testObjectMessageWithObjectArray() throws Exception {
        final String goodMorning = "Good morning";
        final String goodEvening = "Good evening";
        // create the message
        final SimpleMessageInEarLibJar[] multipleGreetings = new SimpleMessageInEarLibJar[2];
        final SimpleMessageInEarLibJar messageOne = new SimpleMessageInEarLibJar(goodMorning);
        final SimpleMessageInEarLibJar messageTwo = new SimpleMessageInEarLibJar(goodEvening);
        multipleGreetings[0] = messageOne;
        multipleGreetings[1] = messageTwo;

        // send as ObjectMessage
        this.jmsUtil.sendObjectMessage(multipleGreetings, this.objectMessageOfArrayTypeQueue, this.objectMessageOfArrayTypeReplyQueue);
View Full Code Here


     */
    @Test
    public void testObjectMessage() throws Exception {
        final String goodAfternoon = "Good afternoon!";
        // create the message
        final SimpleMessageInEarLibJar message = new SimpleMessageInEarLibJar(goodAfternoon);

        // send as ObjectMessage
        this.jmsUtil.sendObjectMessage(message, this.objectMessageQueue, this.objectMessageReplyQueue);
        // wait for an reply
        final Message reply = this.jmsUtil.receiveMessage(objectMessageReplyQueue, 5000);
        // test the reply
        Assert.assertNotNull("Reply message was null on reply queue: " + this.objectMessageReplyQueue, reply);
        final SimpleMessageInEarLibJar replyMessage = (SimpleMessageInEarLibJar) ((ObjectMessage) reply).getObject();
        Assert.assertEquals("Unexpected reply message on reply queue: " + this.objectMessageReplyQueue, message, replyMessage);

    }
View Full Code Here

     */
    @Test
    public void testObjectMessage() throws Exception {
        final String goodAfternoon = "Good afternoon!";
        // create the message
        final SimpleMessageInEarLibJar message = new SimpleMessageInEarLibJar(goodAfternoon);

        // send as ObjectMessage
        this.jmsUtil.sendObjectMessage(message, this.objectMessageQueue, this.objectMessageReplyQueue);
        // wait for an reply
        final Message reply = this.jmsUtil.receiveMessage(objectMessageReplyQueue, 5000);
        // test the reply
        Assert.assertNotNull("Reply message was null on reply queue: " + this.objectMessageReplyQueue, reply);
        final SimpleMessageInEarLibJar replyMessage = (SimpleMessageInEarLibJar) ((ObjectMessage) reply).getObject();
        Assert.assertEquals("Unexpected reply message on reply queue: " + this.objectMessageReplyQueue, message, replyMessage);

    }
View Full Code Here

    public void testObjectMessageWithObjectArray() throws Exception {
        final String goodMorning = "Good morning";
        final String goodEvening = "Good evening";
        // create the message
        final SimpleMessageInEarLibJar[] multipleGreetings = new SimpleMessageInEarLibJar[2];
        final SimpleMessageInEarLibJar messageOne = new SimpleMessageInEarLibJar(goodMorning);
        final SimpleMessageInEarLibJar messageTwo = new SimpleMessageInEarLibJar(goodEvening);
        multipleGreetings[0] = messageOne;
        multipleGreetings[1] = messageTwo;

        // send as ObjectMessage
        this.jmsUtil.sendObjectMessage(multipleGreetings, this.objectMessageOfArrayTypeQueue, this.objectMessageOfArrayTypeReplyQueue);
View Full Code Here

TOP

Related Classes of org.jboss.as.test.integration.ejb.mdb.objectmessage.SimpleMessageInEarLibJar

Copyright © 2018 www.massapicom. 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.