コード例 #1
0
ファイル: RabbitMQSource.cs プロジェクト: kzhen/SSISRabbitMQ
        public override void AcquireConnections(object transaction)
        {
            if (ComponentMetaData.RuntimeConnectionCollection[0].ConnectionManager != null)
              {
            ConnectionManager connectionManager = Microsoft.SqlServer.Dts.Runtime.DtsConvert.GetWrapper(
              ComponentMetaData.RuntimeConnectionCollection[0].ConnectionManager);

            this.rabbitMqConnectionManager = connectionManager.InnerObject as RabbitMQConnectionManager.RabbitMQConnectionManager;

            if (this.rabbitMqConnectionManager == null)
              throw new Exception("Couldn't get the RabbitMQ connection manager, ");

            this.queueName = ComponentMetaData.CustomPropertyCollection["QueueName"].Value;

            rabbitConnection = this.rabbitMqConnectionManager.AcquireConnection(transaction) as IConnection;
              }
        }
コード例 #2
0
        public override void AcquireConnections(object transaction)
        {
            if (ComponentMetaData.RuntimeConnectionCollection[0].ConnectionManager != null)
            {
                ConnectionManager connectionManager = DtsConvert.GetWrapper(
                    ComponentMetaData.RuntimeConnectionCollection[0].ConnectionManager);

                this.rabbitMqConnectionManager = connectionManager.InnerObject as RabbitMQConnectionManager.RabbitMQConnectionManager;

                if (this.rabbitMqConnectionManager == null)
                {
                    throw new Exception("Couldn't get the RabbitMQ connection manager, ");
                }

                this.queueName = ComponentMetaData.CustomPropertyCollection["QueueName"].Value;

                rabbitConnection = this.rabbitMqConnectionManager.AcquireConnection(transaction) as IConnection;
            }
        }