<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 :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

    spring的JdbcTemplate用法

    Posted on 2009-11-30 04:46 leekiang 閱讀(1506) 評論(0)  編輯  收藏 所屬分類: springjdbc、事務(wù)、并發(fā)
    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,
    主站蜘蛛池模板: 免费观看美女用震蛋喷水的视频| 亚洲中文无码线在线观看| 亚洲精品国产精品乱码不99| 国产产在线精品亚洲AAVV| 成年人在线免费看视频| 国产精品亚洲专区在线观看| 青草草色A免费观看在线| 亚洲人色大成年网站在线观看| 免费看的成人yellow视频| 亚洲精品无码专区在线| 白白国产永久免费视频| 三根一起会坏掉的好痛免费三级全黄的视频在线观看 | 国产免费一区二区三区VR| 亚洲第一第二第三第四第五第六| 成年在线观看网站免费| 亚洲成年网站在线观看| 永久黄网站色视频免费直播| 97国免费在线视频| 久久精品国产亚洲AV高清热 | 免费看大黄高清网站视频在线| 最近更新免费中文字幕大全| 最新亚洲春色Av无码专区| 亚洲国产精品无码一线岛国| 无码专区AAAAAA免费视频| 亚洲乱码在线播放| 亚洲午夜久久久影院伊人| 91精品国产免费网站| 亚洲AV无码久久久久网站蜜桃 | 女人18一级毛片免费观看| 亚洲av永久中文无码精品| 亚洲AV无码一区二区三区DV | 亚洲AV综合色区无码一区| 麻豆国产精品入口免费观看| 久久久免费的精品| 国产精品免费久久久久久久久| 亚洲va在线va天堂va不卡下载| AV无码免费永久在线观看| 国产成人亚洲精品电影| 亚洲videosbestsex日本| 亚洲自偷自拍另类12p| 亚洲热线99精品视频|