Package org.codehaus.activemq.itest.ejb

Examples of org.codehaus.activemq.itest.ejb.MessengerHome.create()


    private static final int REPS = 5;

    public void xtestSendReceive() throws CreateException, RemoteException, NamingException, JMSException {
        InitialContext ctx = createInitialContext();
        MessengerHome home = (MessengerHome) ctx.lookup(MESSENGERBEAN_JNDI);
        MessengerObject messenger = home.create();

        String msg1 = "Hello World";
        messenger.sendMessage(msg1, REPS);
        int received = messenger.receiveMessage(10000, REPS);
        assertEquals(REPS, received);
View Full Code Here


    }

    public void testMessageAreConsumed() throws CreateException, RemoteException, NamingException, JMSException {
        InitialContext ctx = createInitialContext();
        MessengerHome home = (MessengerHome) ctx.lookup(MESSENGERBEAN_JNDI);
        MessengerObject messenger = home.create();
        ActiveMQQueue queue = new ActiveMQQueue("testMessageAreConsumed");
       
        messenger.sendMessage(queue, "Test:1");
        String msg = messenger.receiveMessage(queue, 10000);
        assertEquals("Test:1", msg);
View Full Code Here

    private static final int REPS = 5;

    public void testSendReceive() throws CreateException, RemoteException, NamingException, JMSException {
        InitialContext ctx = createInitialContext();
        MessengerHome home = (MessengerHome) ctx.lookup(MESSENGERBEAN_JNDI);
        MessengerObject messenger = home.create();

        String msg1 = "Hello World";
        messenger.sendMessage(msg1, REPS);
        int received = messenger.receiveMessage(10000, REPS);
        assertEquals(REPS, received);
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.