public NmqiEnvironment(NmqiPropertyHandler nmqiPropertyHandler)
 {
     base.TrConstructor("%Z% %W%  %I% %E% %U%", new object[] { nmqiPropertyHandler });
     this.properties = nmqiPropertyHandler;
     bitmode         = Convert.ToString(Marshal.SizeOf(typeof(IntPtr)));
     this.cfg        = new MQClientCfg(this);
     this.cfg.FindAndParse();
     if (Thread.GetNamedDataSlot("MQ_CLIENT_THREAD_TYPE") == null)
     {
         Thread.AllocateNamedDataSlot("MQ_CLIENT_THREAD_TYPE");
     }
 }
Example #2
0
        public static NmqiEnvironment GetInstance(NmqiPropertyHandler properties)
        {
            NmqiEnvironment environment = null;

            lock (synchronizer)
            {
                environment = (NmqiEnvironment)mqiCache[Type.GetType("IBM.WMQ.Nmqi.NmqiEnvironment").ToString()];
                if (environment == null)
                {
                    environment = new NmqiEnvironment(properties);
                    string key = Type.GetType("IBM.WMQ.Nmqi.NmqiEnvironment").ToString();
                    mqiCache.Add(key, environment);
                }
            }
            return(environment);
        }