Examples of MQQueueConnectionFactory


Examples of com.ibm.mq.jms.MQQueueConnectionFactory

*/
public class MQSeriesRemoteQMFunctionalTestCase extends TestCase {

    public void testFunctional() throws Exception {

        MQQueueConnectionFactory f = null;
        String TEST_MSG = "tresting";
        MuleClient client = new MuleClient();
        MQSeriesConnector c = new MQSeriesConnector();
        try {
            f = new MQQueueConnectionFactory();
            f.setHostName("vmmachine"); //Change this to the name of the server running MQ
            f.setPort(6969)//Change this accordingly too. Default is 1414
            f.setQueueManager("QM_vmmachine");             // Queue Manager with this name needs to be pre-configured!

            f.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
            f.createQueueConnection().start();
        } catch (JMSException e) {
            e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
            e.getLinkedException().printStackTrace();
        }

View Full Code Here

Examples of com.ibm.mq.jms.MQQueueConnectionFactory

        assertNotNull(result);
        assertEquals(TEST_MSG, result.getPayloadAsString());    }

    public void testFunctionalRemoteQueue() throws Exception {

        MQQueueConnectionFactory dmz = null;
        MQQueueConnectionFactory corp = null;

        dmz = new MQQueueConnectionFactory();
        dmz.setHostName("VMMachine"); //AB
        dmz.setPort(6969);
        dmz.setQueueManager("QM_vmmachine");
        dmz.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
        //dmz.createQueueConnection().start();

        corp = new MQQueueConnectionFactory();
        corp.setHostName("VMMachine"); // AB
        corp.setPort(6969);
        corp.setQueueManager("QM_vmmachine");
        corp.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
        //corp.createQueueConnection().start();

        String TEST_MSG = "tresting";
        MuleClient client = new MuleClient();
        MQSeriesConnector dmzCnn = new MQSeriesConnector();
View Full Code Here

Examples of com.ibm.mq.jms.MQQueueConnectionFactory

*/
public class MQSeriesFunctionalTestCase extends TestCase {

    public void testFunctional() throws Exception {

        MQQueueConnectionFactory f = null;
        try
        {
            f = new MQQueueConnectionFactory();
            f.setHostName("VMMachine");
            f.setQueueManager("QM_vmmachine");
            f.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
            f.setChannel("S_vmmachine");
        } catch (JMSException e)
        {
           e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
            e.getLinkedException().printStackTrace();
        }
View Full Code Here

Examples of com.ibm.mq.jms.MQQueueConnectionFactory

    }

    protected ConnectionFactory createConnectionFactory() throws InitialisationException, NamingException {
        MQConnectionFactory factory = (MQConnectionFactory)getConnectionFactory();
        if(factory==null) {
            factory = new MQQueueConnectionFactory();
        }
        try {
            if(queueManager!=null) {
                factory.setQueueManager(queueManager);
            }
View Full Code Here

Examples of com.ibm.mq.jms.MQQueueConnectionFactory

        //The MQSeries Java interface does not support XA
        if(getConnectionFactory()==null) {
            if (endpointUri.getResourceInfo()!=null && endpointUri.getResourceInfo().indexOf("topic") > -1) {
                setConnectionFactory(new MQTopicConnectionFactory());
            } else {
                setConnectionFactory(new MQQueueConnectionFactory());
            }
        }
    }
View Full Code Here

Examples of com.ibm.mq.jms.MQQueueConnectionFactory

            @Override
            public Object lookup(String name) throws NamingException {
                try {
                    if(name.equals(CONNECTION_FACTORY_NAME)) {
                        if(queueConnectionFactory == null) {
                            MQQueueConnectionFactory mqQueueConnectionFactory = new com.ibm.mq.jms.MQQueueConnectionFactory();
                            mqQueueConnectionFactory.setChannel(environment.get(CHANNEL_PARAMETER).toString());
                            mqQueueConnectionFactory.setHostName(environment.get(HOST_NAME_PARAMETER).toString());
                            mqQueueConnectionFactory.setPort(Integer.parseInt(environment.get(PORT_PARAMETER).toString()));
                            mqQueueConnectionFactory.setQueueManager(environment.get(QUEUE_MANAGER_PARAMETER).toString());
                            mqQueueConnectionFactory.setTransportType(Integer.parseInt(environment.get(TRANSPORT_TYPE_PARAMETER).toString()));

                            queueConnectionFactory = new CachingConnectionFactory(mqQueueConnectionFactory);

                            queueConnection = queueConnectionFactory.createQueueConnection();
                        }
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.