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();
                 }
  • 相关阅读:
    java操作生成jar包 和写入jar包
    jboss配置jndi连接池
    windows 域的LDAP查询相关举例
    LDAP error Code 及解决方法
    HDU 6417
    CF1299D Around the World
    codechef Chef and The Colored Grid
    Educational Codeforces Round 82 (Rated for Div. 2)
    CF1237F Balanced Domino Placements
    CF1254E Send Tree to Charlie
  • 原文地址:https://www.cnblogs.com/Winston/p/1145220.html
Copyright © 2011-2022 走看看