Package org.hornetq.core.client.impl

Examples of org.hornetq.core.client.impl.ClientSessionInternal.createProducer()


         server.getConfiguration().setConnectionTTLOverride(ttl);
         server.start();
         ClientSessionFactory cf = createInVMFactory();
         ClientSessionInternal clientSession = (ClientSessionInternal)cf.createSession(false, true, true);
         clientSession.createQueue(queueName, queueName, false);
         ClientProducer producer = clientSession.createProducer();
         ClientConsumer consumer = clientSession.createConsumer(queueName);

         Assert.assertEquals(1, server.getRemotingService().getConnections().size());

         RemotingConnection rc = clientSession.getConnection();
View Full Code Here


         ClientSessionFactory cf = createInVMFactory();
         cf.setProducerMaxRate(99);
         cf.setBlockOnNonDurableSend(true);
         cf.setBlockOnNonDurableSend(true);
         ClientSessionInternal clientSession = (ClientSessionInternal)cf.createSession(false, true, true);
         ClientProducer producer = clientSession.createProducer();
         Assert.assertNull(producer.getAddress());
         Assert.assertEquals(cf.getProducerMaxRate(), producer.getMaxRate());
         Assert.assertEquals(cf.isBlockOnNonDurableSend(), producer.isBlockOnNonDurableSend());
         Assert.assertEquals(cf.isBlockOnDurableSend(), producer.isBlockOnDurableSend());
         Assert.assertFalse(producer.isClosed());
View Full Code Here

         ClientSessionFactory cf = createInVMFactory();
         cf.setProducerMaxRate(99);
         cf.setBlockOnNonDurableSend(true);
         cf.setBlockOnNonDurableSend(true);
         ClientSessionInternal clientSession = (ClientSessionInternal)cf.createSession(false, true, true);
         ClientProducer producer = clientSession.createProducer("testAddress");
         Assert.assertNotNull(producer.getAddress());
         Assert.assertEquals(cf.getProducerMaxRate(), producer.getMaxRate());
         Assert.assertEquals(cf.isBlockOnNonDurableSend(), producer.isBlockOnNonDurableSend());
         Assert.assertEquals(cf.isBlockOnDurableSend(), producer.isBlockOnDurableSend());
         Assert.assertFalse(producer.isClosed());
View Full Code Here

         cf.setBlockOnNonDurableSend(true);
         ClientSessionInternal clientSession = (ClientSessionInternal)cf.createSession(false, true, true);
         clientSession.close();
         try
         {
            clientSession.createProducer();
            Assert.fail("should throw exception");
         }
         catch (HornetQException e)
         {
            Assert.assertEquals(e.getCode(), HornetQException.OBJECT_CLOSED);
View Full Code Here

         server.getConfiguration().setConnectionTTLOverride(ttl);
         server.start();
         ClientSessionFactory cf = locator.createSessionFactory();
         ClientSessionInternal clientSession = (ClientSessionInternal)cf.createSession(false, true, true);
         clientSession.createQueue(queueName, queueName, false);
         ClientProducer producer = clientSession.createProducer();
         ClientConsumer consumer = clientSession.createConsumer(queueName);

         Assert.assertEquals(1, server.getRemotingService().getConnections().size());

         RemotingConnection rc = clientSession.getConnection();
View Full Code Here

         locator.setProducerMaxRate(99);
         locator.setBlockOnNonDurableSend(true);
         locator.setBlockOnNonDurableSend(true);
         ClientSessionFactory cf = locator.createSessionFactory();
         ClientSessionInternal clientSession = (ClientSessionInternal)cf.createSession(false, true, true);
         ClientProducer producer = clientSession.createProducer();
         Assert.assertNull(producer.getAddress());
         Assert.assertEquals(cf.getServerLocator().getProducerMaxRate(), producer.getMaxRate());
         Assert.assertEquals(cf.getServerLocator().isBlockOnNonDurableSend(), producer.isBlockOnNonDurableSend());
         Assert.assertEquals(cf.getServerLocator().isBlockOnDurableSend(), producer.isBlockOnDurableSend());
         Assert.assertFalse(producer.isClosed());
View Full Code Here

         locator.setProducerMaxRate(99);
         locator.setBlockOnNonDurableSend(true);
         locator.setBlockOnNonDurableSend(true);
         ClientSessionFactory cf = locator.createSessionFactory();
         ClientSessionInternal clientSession = (ClientSessionInternal)cf.createSession(false, true, true);
         ClientProducer producer = clientSession.createProducer("testAddress");
         Assert.assertNotNull(producer.getAddress());
         Assert.assertEquals(cf.getServerLocator().getProducerMaxRate(), producer.getMaxRate());
         Assert.assertEquals(cf.getServerLocator().isBlockOnNonDurableSend(), producer.isBlockOnNonDurableSend());
         Assert.assertEquals(cf.getServerLocator().isBlockOnDurableSend(), producer.isBlockOnDurableSend());
         Assert.assertFalse(producer.isClosed());
View Full Code Here

         ClientSessionFactory cf = locator.createSessionFactory();
         ClientSessionInternal clientSession = (ClientSessionInternal)cf.createSession(false, true, true);
         clientSession.close();
         try
         {
            clientSession.createProducer();
            Assert.fail("should throw exception");
         }
         catch (HornetQException e)
         {
            Assert.assertEquals(e.getCode(), HornetQException.OBJECT_CLOSED);
View Full Code Here

         server.getConfiguration().setConnectionTTLOverride(ttl);
         server.start();
         ClientSessionFactory cf = locator.createSessionFactory();
         ClientSessionInternal clientSession = (ClientSessionInternal)cf.createSession(false, true, true);
         clientSession.createQueue(queueName, queueName, false);
         ClientProducer producer = clientSession.createProducer();
         ClientConsumer consumer = clientSession.createConsumer(queueName);

         Assert.assertEquals(1, server.getRemotingService().getConnections().size());

         RemotingConnection rc = clientSession.getConnection();
View Full Code Here

         locator.setProducerMaxRate(99);
         locator.setBlockOnNonDurableSend(true);
         locator.setBlockOnNonDurableSend(true);
         ClientSessionFactory cf = locator.createSessionFactory();
         ClientSessionInternal clientSession = (ClientSessionInternal)cf.createSession(false, true, true);
         ClientProducer producer = clientSession.createProducer();
         Assert.assertNull(producer.getAddress());
         Assert.assertEquals(cf.getServerLocator().getProducerMaxRate(), producer.getMaxRate());
         Assert.assertEquals(cf.getServerLocator().isBlockOnNonDurableSend(), producer.isBlockOnNonDurableSend());
         Assert.assertEquals(cf.getServerLocator().isBlockOnDurableSend(), producer.isBlockOnDurableSend());
         Assert.assertFalse(producer.isClosed());
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.