Esempio n. 1
0
        private void OpenForSet()
        {
            uint method = 0xf3;

            this.TrEntry(method);
            int pCompCode = 0;
            int pReason   = 0;
            MQObjectDescriptor pObjDesc = new MQObjectDescriptor();

            pObjDesc.ObjectType = this.objectType;
            pObjDesc.ObjectName = this.objectName;
            try
            {
                this.qMgr.nmqiConnector.MQOPEN(this.qMgr.hConn, ref pObjDesc, 0x2040, this.handleSet, out pCompCode, out pReason);
                if (pCompCode != 0)
                {
                    this.qMgr.CheckHConnHealth(pReason);
                    base.throwNewMQException(pCompCode, pReason);
                }
            }
            finally
            {
                base.TrExit(method);
            }
        }
Esempio n. 2
0
        public MQQueue(MQQueueManager qMgr, string queueName, int openOptions, string queueManagerName, string dynamicQueueName, string alternateUserId) : base(1, qMgr, queueName, openOptions, alternateUserId)
        {
            base.TrConstructor("@(#) lib/dotnet/pc/winnt/baseclasses/MQQueue.cs, dotnet, p000  1.8 11/04/07 10:34:41", new object[] { qMgr, queueName, openOptions, queueManagerName, dynamicQueueName, alternateUserId });
            if (queueManagerName == null)
            {
                this.queueManagerName = "";
            }
            else
            {
                this.queueManagerName = queueManagerName;
            }
            if ((dynamicQueueName == null) || (dynamicQueueName == string.Empty))
            {
                this.dynamicQueueName = "AMQ.*";
            }
            else
            {
                this.dynamicQueueName = dynamicQueueName;
            }
            MQObjectDescriptor od = base.CreateMQObjectDescriptor();

            od.ObjectQMgrName = this.queueManagerName;
            od.DynamicQName   = this.dynamicQueueName;
            base.Open(ref od);
            base.name = od.ObjectName.PadRight(0x30);
        }
Esempio n. 3
0
 public MQSPIOpenIn(NmqiEnvironment nmqiEnv, int version) : base(nmqiEnv)
 {
     base.TrConstructor("%Z% %W%  %I% %E% %U%", new object[] { nmqiEnv, version });
     this.spiOpenInHdr    = new SPIOPENINHDR();
     this.spiOpenInHdr.ID = rfpVB_ID_OPEN_IN;
     this.Version         = version;
     this.openOptions     = new SpiOpenOptions();
     this.mqod            = new MQObjectDescriptor();
 }
Esempio n. 4
0
        protected void Open(ref MQObjectDescriptor od)
        {
            uint method = 0x75;

            this.TrEntry(method, new object[] { od });
            int pCompCode = 0;
            int pReason   = 0;

            try
            {
                od.CopyCHARVIntoOD();
                if (base.qMgr.CommandLevel < 700)
                {
                    int openOptions = base.OpenOptions;
                    if (base.objectHandle == null)
                    {
                        base.objectHandle = MQQueueManager.nmqiEnv.NewPhobj();
                    }
                    base.qMgr.nmqiConnector.MQOPEN(base.qMgr.hConn, ref od, openOptions, base.objectHandle, out pCompCode, out pReason);
                    base.hObj = base.objectHandle.HOBJ;
                }
                else
                {
                    SpiOpenOptions options = new SpiOpenOptions();
                    options.Options = base.OpenOptions;
                    NmqiSP nmqiConnector = (NmqiSP)base.qMgr.nmqiConnector;
                    if (base.objectHandle == null)
                    {
                        base.objectHandle = MQQueueManager.nmqiEnv.NewPhobj();
                    }
                    nmqiConnector.SpiOpen(base.qMgr.hConn, ref od, ref options, base.objectHandle, out pCompCode, out pReason);
                    base.hObj = base.objectHandle.HOBJ;
                    if (pCompCode != 2)
                    {
                        this.propControl = options.PropertyControl;
                    }
                }
                if (pCompCode != 0)
                {
                    base.qMgr.CheckHConnHealth(pReason);
                    base.throwNewMQException(pCompCode, pReason);
                }
                base.isClosed = false;
            }
            catch (MQException exception)
            {
                pCompCode = exception.CompCode;
                pReason   = exception.Reason;
                throw exception;
            }
            finally
            {
                base.unsafe_compCode = pCompCode;
                base.unsafe_reason   = pReason;
                base.TrExit(method);
            }
        }
Esempio n. 5
0
        private void OpenProcessForInquire(int openOptions)
        {
            uint method = 0x1fd;

            this.TrEntry(method, new object[] { openOptions });
            int pCompCode = 0;
            int pReason   = 0;
            MQObjectDescriptor pObjDesc = new MQObjectDescriptor();

            pObjDesc.ObjectType = 3;
            pObjDesc.ObjectName = base.objectName;
            if ((this.qMgrName != null) && (this.qMgrName.Length > 0))
            {
                pObjDesc.ObjectQMgrName = this.qMgrName;
            }
            else
            {
                pObjDesc.ObjectQMgrName = base.qMgr.Name;
            }
            if ((base.AlternateUserId != null) && (base.AlternateUserId.Length > 0))
            {
                pObjDesc.AlternateUserId = base.AlternateUserId;
            }
            try
            {
                if (base.objectHandle == null)
                {
                    base.objectHandle = MQQueueManager.nmqiEnv.NewPhobj();
                }
                base.qMgr.nmqiConnector.MQOPEN(base.qMgr.hConn, ref pObjDesc, base.OpenOptions, base.objectHandle, out pCompCode, out pReason);
                if (pCompCode == 0)
                {
                    base.hObj = base.objectHandle.HOBJ;
                }
                if (pCompCode != 0)
                {
                    base.qMgr.CheckHConnHealth(pReason);
                    base.throwNewMQException(pCompCode, pReason);
                }
                base.isClosed = false;
            }
            catch (MQException exception)
            {
                pCompCode = exception.CompCode;
                pReason   = exception.Reason;
                throw exception;
            }
            finally
            {
                base.unsafe_compCode = pCompCode;
                base.unsafe_reason   = pReason;
                base.TrExit(method);
            }
        }
Esempio n. 6
0
        private void OpenForPublication(string topicName)
        {
            uint method = 0x2d1;

            this.TrEntry(method, new object[] { topicName });
            try
            {
                this.subscribed = false;
                MQObjectDescriptor od = base.CreateMQObjectDescriptor();
                od.Version = 4;
                if ((topicName != null) && (topicName.Length > 0))
                {
                    od.ObjectString.VSString = topicName;
                    base.TrData(method, 0, "Topic Name : ", Encoding.ASCII.GetBytes(topicName));
                }
                base.Open(ref od);
            }
            finally
            {
                base.TrExit(method);
            }
        }
Esempio n. 7
0
        protected MQObjectDescriptor CreateMQObjectDescriptor()
        {
            uint method = 0x74;

            this.TrEntry(method);
            MQObjectDescriptor descriptor = new MQObjectDescriptor();

            try
            {
                descriptor.ObjectType = this.destinationType;
                descriptor.ObjectName = base.objectName;
                if (base.AlternateUserId != null)
                {
                    descriptor.AlternateUserId = base.AlternateUserId;
                }
            }
            finally
            {
                base.TrExit(method);
            }
            return(descriptor);
        }