Package com.ibm.mq.jms

Examples of com.ibm.mq.jms.MQConnectionFactory


     */
    public HermesAdmin createSession(Hermes hermes, ConnectionFactory connectionFactory) throws JMSException, NamingException
    {
        if (connectionFactory instanceof MQConnectionFactory)
        {
            MQConnectionFactory mqCF = (MQConnectionFactory) connectionFactory;
            return new MQSeriesAdmin(hermes, mqCF);
        }
        else if (connectionFactory instanceof JNDIConnectionFactory)
        {
            //
View Full Code Here


        }
        super.doConnect();
    }

    protected ConnectionFactory createConnectionFactory() throws InitialisationException, NamingException {
        MQConnectionFactory factory = (MQConnectionFactory)getConnectionFactory();
        if(factory==null) {
            factory = new MQQueueConnectionFactory();
        }
        try {
            if(queueManager!=null) {
                factory.setQueueManager(queueManager);
            }
            if(hostname!=null) {
                factory.setHostName(hostname);
            }
            if(port > -1) {
                factory.setPort(port);
            }
            if(cCSId != -1) {
                factory.setCCSID(cCSId);
            }
            if(channel!=null) {
                factory.setChannel(channel);
            }

            if(temporaryModel!=null && factory instanceof MQQueueConnectionFactory) {
                ((MQQueueConnectionFactory)factory).setTemporaryModel(temporaryModel);
            }
            factory.setTransportType(transportType);
        } catch (JMSException e) {
            throw new InitialisationException(e, this);
        }

        if(getClientId()!=null) {
            factory.setClientId(getClientId());
        }

        if(receiveExitHandler!=null) {
            factory.setReceiveExit(receiveExitHandler);
        }
        if(receiveExitHandlerInit!=null) {
            factory.setReceiveExitInit(receiveExitHandlerInit);
        }

        if(sendExitHandler!=null) {
            factory.setSendExit(sendExitHandler);
        }

        if(sendExitHandlerInit!=null) {
            factory.setSendExitInit(sendExitHandlerInit);
        }

        if(securityExitHandler!=null) {
            factory.setSecurityExit(securityExitHandler);
        }
        if(receiveExitHandlerInit!=null) {
            factory.setSecurityExitInit(securityExitHandlerInit);
        }
        setConnectionFactory(factory);
        return factory;
    }
View Full Code Here

TOP

Related Classes of com.ibm.mq.jms.MQConnectionFactory

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.