<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    七段

    無論怎樣,請讓我先感謝一下國家。

    BlogJava 首頁 新隨筆 聯系 聚合 管理
      35 Posts :: 2 Stories :: 7 Comments :: 0 Trackbacks

    2010年4月25日 #

    有25匹馬,每匹馬都以一個固定不變的速度奔跑,每匹馬的速度都不一樣,如果讓你找出跑的最快的5匹馬,最少需要組織多少場比賽?注:每場比賽最多只能5匹馬參賽。
    re:悲觀10場,樂觀7場。
    posted @ 2012-03-07 21:17 sevenduan 閱讀(833) | 評論 (1)編輯 收藏

    Eclipse:
    ctrl+o
    ctrl+space
    ctrl+t
    ctrl+k
    ctrl+f8/f9/f10

    alt+shift+x , t/j
    alt+shift+d , t/j

    Command:
    cd -
    tab
    ctrl+a/e
    ctrl+u/k/w

    Vim
    shift+g
    m+'mark'
    `+'mark'
    . (repeat)



    posted @ 2010-08-07 23:14 sevenduan 閱讀(247) | 評論 (0)編輯 收藏

    Framework Supported log levels Standard appenders Popularity Cost / licence
    Log4J FATAL ERROR WARN INFO DEBUG TRACE AsyncAppender, JDBCAppender, JMSAppender, LF5Appender, NTEventLogAppender, NullAppender, SMTPAppender, SocketAppender, SocketHubAppender, SyslogAppender, TelnetAppender, WriterAppender Widely used in many project and platforms Apache License, Version 2.0
    Java Logging API SEVERE WARNING INFO CONFIG FINE FINER FINEST Depends on the underlying framework; Sun's default Java Virtual Machine (JVM) has the following: ConsoleHandler, FileHandler, SocketHandler, MemoryHandler Not widely used[citation needed] Comes with the JRE
    Apache Commons Logging FATAL ERROR WARN INFO DEBUG TRACE Depends on the underlying framework Widely used, in conjunction with log4j Apache License, Version 2.0
    SLF4J ERROR WARN INFO DEBUG TRACE Depends on the underlying framework, which is pluggable Probably small but growing MIT License
    posted @ 2010-07-18 22:15 sevenduan 閱讀(486) | 評論 (0)編輯 收藏

    1 definition:

    “A transaction is a complete unit of work. It may comprise many computational tasks,which may include user interface, data retrieval, and communications. A typicaltransaction modifies shared resources.”

    2 transaction features:
    ACID (atomicity, consistency, isolation, durability)

    3 java spec
    JTA, JTS
     1interface javax.transaction.TransactionManager
     2{
     3public abstract void begin();
     4public abstract void commit();
     5public abstract int getStatus();
     6public abstract Transaction getTransaction();
     7public void resume(Transaction tobj);
     8public abstract void rollback();
     9public abstract void setRollbackOnly();
    10public abstract void setTransactionTimeout(intseconds);
    11public abstract Transaction suspend() ;
    12}

    4 Common XAResource
    JDBC 2.0:
    A JDBC driver that supports distributed transactions implements the javax.transaction.xa.XAResource interface, the javax.sql.XAConnectioninterface, and the  javax.sql.XADataSource interface.

    JMS 1.0:

    a JMS provider javax.transaction.xa.XAResource interface, the implements the javax.jms.XAConnection and the javax.jms.XASession interface.

    5 Common TransactionManager

    5.1 EJB Transaction Options:
    NotSupported
        If the method is called within a transaction, this transaction is suspended during the time of the method execution.
    Required
        If the method is called within a transaction, the method is executed in the scope of this transaction; otherwise, a new transaction is started for the execution of the method and committed before the method result is sent to the caller.
    RequiresNew
        The method will always be executed within the scope of a new transaction. The new transaction is started for the execution of the method, and committed before the method result is sent to the caller. If the method is called within a transaction, this transaction is suspended before the new one is started and resumed when the new transaction has completed.
    Mandatory
        The method should always be called within the scope of a transaction, else the container will throw the TransactionRequired exception.
    Supports
        The method is invoked within the caller transaction scope; if the caller does not have an associated transaction, the method is invoked without a transaction scope.
    Never
        The client is required to call the bean without any transaction context; if it is not the case, a java.rmi.RemoteException is thrown by the container.

    5.2 Spring transaction:
          Transaction isolation: The degree of isolation this transaction has from the work of other transactions. For example, can this transaction see uncommitted writes from other transactions? avaliable options:
    ISOLATION_DEFAULT
    ISOLATION_READ_UNCOMMITTED
    ISOLATION_READ_COMMITTED
    ISOLATION_REPEATABLE_READ
    ISOLATION_SERIALIZABLE

          Transaction propagation: Normally all code executed within a transaction scope will run in that transaction. However, there are several options specifying behavior if a transactional method is executed when a transaction context already exists: For example, simply running in the existing transaction (the most common case); or suspending the existing transaction and creating a new transaction. Spring offers the transaction propagation options familiar from EJB CMT. avaliable options:
    PROPAGATION_MANDATORY
    PROPAGATION_NESTED
    PROPAGATION_NEVER
    PROPAGATION_NOT_SUPPORTED
    PROPAGATION_REQUIRED
    PROPAGATION_REQUIRES_NEW
    PROPAGATION_SUPPORTS

          Transaction timeout: How long this transaction may run before timing out (automatically being rolled back by the underlying transaction infrastructure).
          Read-only status: A read-only transaction does not modify any data. Read-only transactions can be a useful optimization in some cases (such as when using Hibernate).


    6 transaction for web service
    Protocol specifications:
    WS-Transaction
    OASIS Business Transaction Protocol (BTP)
    Java API
    JAXTX (JSR-156)

     

    posted @ 2010-04-25 16:44 sevenduan 閱讀(611) | 評論 (0)編輯 收藏

    主站蜘蛛池模板: 亚洲人成网站18禁止久久影院| 亚洲宅男天堂在线观看无病毒| 亚洲理论片在线中文字幕| 男女作爱在线播放免费网站| 久久99国产亚洲高清观看首页| 日本免费在线中文字幕| 亚洲AV乱码久久精品蜜桃| 最近中文字幕免费2019| 亚洲人成电影网站| 免费无码不卡视频在线观看| 亚洲另类自拍丝袜第五页 | 中文字幕在线视频免费观看| 亚洲视频在线免费| 中文在线免费看视频| 亚洲男人的天堂在线播放| 亚色九九九全国免费视频| 亚洲精品无码人妻无码| 亚洲国产高清在线一区二区三区| 一区二区3区免费视频| 亚洲av女电影网| 在线A级毛片无码免费真人| 男女作爱免费网站| 亚洲爱情岛论坛永久| 久久久久久久免费视频| 免费亚洲视频在线观看| 亚洲国产精品成人久久| 国产高清免费视频| 国产亚洲精品精品精品| 亚洲成人精品久久| 免费涩涩在线视频网| 三级网站免费观看| 亚洲熟女综合色一区二区三区| 免费国产成人高清在线观看麻豆 | 久久久久久国产a免费观看不卡| 久久精品亚洲视频| 成年女人男人免费视频播放| 好猛好深好爽好硬免费视频| 亚洲videos| 亚洲日韩精品A∨片无码| 国产成人无码免费看视频软件| 一级女性全黄久久生活片免费|