public WebSphereMqSettings RetrieveSettings()
        {
            var settings = new WebSphereMqSettings();

            if (ContainsKey("hostname"))
            {
                settings.Hostname = (string)this["hostname"];
            }

            if (ContainsKey("port"))
            {
                settings.Port = int.Parse((string)this["port"]);
            }

            if (ContainsKey("channel"))
            {
                settings.Channel = (string)this["channel"];
            }

            if (ContainsKey("queueManager"))
            {
                settings.QueueManager = (string)this["queueManager"];
            }

            if (ContainsKey("maxQueueDepth"))
            {
                settings.MaxQueueDepth = (int)this["maxQueueDepth"];
            }


            return(settings);
        }
Пример #2
0
        public ConnectionFactory(WebSphereMqSettings settings)
        {
            // Create the connection factories factory
            var factoryFactory = XMSFactoryFactory.GetInstance(XMSC.CT_WMQ);

            // Use the connection factories factory to create a connection factory
            connectionFactory = factoryFactory.CreateConnectionFactory();

            // Set the properties
            connectionFactory.SetStringProperty(XMSC.WMQ_HOST_NAME, settings.Hostname);
            connectionFactory.SetIntProperty(XMSC.WMQ_PORT, settings.Port);
            connectionFactory.SetStringProperty(XMSC.WMQ_CHANNEL, settings.Channel);
            connectionFactory.SetIntProperty(XMSC.WMQ_CONNECTION_MODE, XMSC.WMQ_CM_CLIENT);
            connectionFactory.SetStringProperty(XMSC.WMQ_QUEUE_MANAGER, settings.QueueManager);
        }
Пример #3
0
        public ConnectionFactory(WebSphereMqSettings settings)
        {
            // Create the connection factories factory
            var factoryFactory = XMSFactoryFactory.GetInstance(XMSC.CT_WMQ);

            // Use the connection factories factory to create a connection factory
            connectionFactory = factoryFactory.CreateConnectionFactory();

            // Set the properties
            connectionFactory.SetStringProperty(XMSC.WMQ_HOST_NAME, settings.Hostname);
            connectionFactory.SetIntProperty(XMSC.WMQ_PORT, settings.Port);
            connectionFactory.SetStringProperty(XMSC.WMQ_CHANNEL, settings.Channel);
            connectionFactory.SetIntProperty(XMSC.WMQ_CONNECTION_MODE, XMSC.WMQ_CM_CLIENT_UNMANAGED);
            connectionFactory.SetStringProperty(XMSC.WMQ_QUEUE_MANAGER, settings.QueueManager);
            connectionFactory.SetStringProperty(XMSC.WMQ_SSL_CIPHER_SPEC, settings.SslCipherSpec);
            connectionFactory.SetStringProperty(XMSC.WMQ_SSL_KEY_REPOSITORY, settings.SslKeyRepository);
            connectionFactory.SetStringProperty(XMSC.WMQ_SSL_PEER_NAME, settings.SslPeerName);
        }