zoukankan      html  css  js  c++  java
  • MSMQ Basics Transactional Messages Processing

    1.Transactional message can be classified into internal transactional message and external transactional message
        i.internal message
            An internal transactional message si the simplest type of transaction. however, internal transactional message can not perform transactions with non-message queuing resources such as databases. if we wanna interact with a databas in a DB, we must use external transactional messages.  sending an internal transactional message is just like this:
                MessageQueueTransaction transaction=new MessageQueueTransction.
                MessageQueue mq=new MessageQueue(@".\transactonMQ",true);
                try    
                {
                        transaction.Begin();
                        mq.send("messae body1","label1",transaction);
                        mq.send("message body2","label2",transaction);
                        transaction.Commit();
                        //transaction principle: All or Nothing!
                }
                catch(Exception ex)
                {
                    transaction.Abort();
                 }
  • 相关阅读:
    1.8 Hello World添加menu
    1.7 HelloWorld 添加视图
    1.6 Hello World
    1.5 组件开发基础
    awk
    sed
    grep / egrep
    Shell基础知识
    和管道符有关的命令
    Shell变量
  • 原文地址:https://www.cnblogs.com/Winston/p/1145220.html
Copyright © 2011-2022 走看看