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

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

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

    MDA/MDD/TDD/DDD/DDDDDDD
    posts - 536, comments - 111, trackbacks - 0, articles - 0
      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

    spring的JdbcTemplate用法

    Posted on 2009-11-30 04:46 leekiang 閱讀(1500) 評論(0)  編輯  收藏 所屬分類: springjdbc、事務、并發
    1,基本用法
    http://blog.163.com/fxf_java/blog/static/59268637200822833715185/
    2,JdbcTemplate的連接
    http://www.javaeye.com/topic/89845
    http://forum.springsource.org/showthread.php?t=63444
    3,ConnectionCallback
    http://blog.csdn.net/lin49940/archive/2009/10/22/4712883.aspx

    public interface ConnectionCallback

    Generic callback interface for code that operates on a JDBC Connection. Allows to execute any number of operations on a single Connection, using any type and number of Statements.

    This is particularly useful for delegating to existing data access code that expects a Connection to work on and throws SQLException. For newly written code, it is strongly recommended to use JdbcTemplate's more specific operations, for example a query or updat variant.

    doInConnection

    ObjectdoInConnection(Connection?con)
    throws SQLException,
    DataAccessException
    Gets called by JdbcTemplate.execute with an active JDBC Connection. Does not need to care about activating or closing the Connection, or handling transactions.

    If called without a thread-bound JDBC transaction (initiated by DataSourceTransactionManager), the code will simply get executed on the JDBC connection with its transactional semantics. If JdbcTemplate is configured to use a JTA-aware DataSource, the JDBC Connection and thus the callback code will be transactional if a JTA transaction is active.

    Allows for returning a result object created within the callback, i.e. a domain object or a collection of domain objects. Note that there's special support for single step actions: see JdbcTemplate.queryForObject etc. A thrown RuntimeException is treated as application exception: it gets propagated to the caller of the template.

    Parameters:
    con - active JDBC Connection
    Returns:
    a result object, or null if none
    Throws:
    SQLException - if thrown by a JDBC method, to be auto-converted to a DataAccessException by a SQLExceptionTranslator
    DataAccessException - in case of custom exceptions
    See Also:
    JdbcTemplate.queryForObject(String, Class), JdbcTemplate.queryForRowSet(String)


    2,
    主站蜘蛛池模板: 国产精品高清视亚洲精品| 国产精品入口麻豆免费观看| 91丁香亚洲综合社区| 亚洲AV综合色一区二区三区| 亚洲成a人在线看天堂无码| 久久久久免费看黄A片APP| 久久精品免费电影| 中文字幕不卡免费视频| 精品免费AV一区二区三区| 国产亚洲精品bv在线观看| 亚洲黄色在线观看| 亚洲a在线视频视频| 亚洲人精品午夜射精日韩| 亚洲日韩VA无码中文字幕| 四虎永久免费地址在线网站| 免费看的一级毛片| 女性无套免费网站在线看| 美女视频黄a视频全免费| 222www在线观看免费| 精品无码国产污污污免费网站 | 曰批全过程免费视频播放网站| 一个人免费视频观看在线www| 尤物视频在线免费观看| 日本特黄特色AAA大片免费| 精品女同一区二区三区免费播放 | 久久精品无码一区二区三区免费 | 2020久久精品亚洲热综合一本| 亚洲三级电影网址| 337p日本欧洲亚洲大胆精品555588 | 亚洲天堂一区二区| 亚洲精品成人网站在线播放| 久久亚洲国产精品成人AV秋霞| 日韩亚洲Av人人夜夜澡人人爽| 亚洲一区二区三区四区在线观看| 亚洲小视频在线观看| 亚洲美女色在线欧洲美女| 亚洲一卡二卡三卡| 亚洲人成电影网站色www| 国产天堂亚洲精品| 美女被免费网站91色| 免费h视频在线观看|