<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 閱讀(1506) 評論(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,
    主站蜘蛛池模板: 成人免费夜片在线观看| 亚洲无人区码一二三码区别图片 | 成年美女黄网站色大免费视频| 亚洲精品无码久久久久去q| 一区二区免费在线观看| 亚洲第一页日韩专区| 九九久久精品国产免费看小说| 亚洲精品一级无码鲁丝片| 日韩一级片免费观看| 国产亚洲自拍一区| 国产综合免费精品久久久| 亚洲成AV人在线播放无码| 少妇太爽了在线观看免费视频 | 亚洲成a∨人片在无码2023| 国产成人精品高清免费| 日本激情猛烈在线看免费观看 | 亚洲 自拍 另类小说综合图区| 无码 免费 国产在线观看91| ZZIJZZIJ亚洲日本少妇JIZJIZ| 热久久这里是精品6免费观看| 亚洲国产成人高清在线观看| 免费无码VA一区二区三区| 亚洲伊人久久大香线蕉| 国产精品无码一区二区三区免费 | 一个人在线观看视频免费| 亚洲成a人无码亚洲成av无码| mm1313亚洲精品无码又大又粗| 中国一级全黄的免费观看| 亚洲最大福利视频网站| 大学生一级特黄的免费大片视频| 日韩大片在线永久免费观看网站 | 精品在线免费视频| 亚洲精品成人片在线观看精品字幕| 999久久久免费精品播放| 亚洲香蕉久久一区二区| 亚洲视频人成在线播放| 免费A级毛片av无码| 337P日本欧洲亚洲大胆精品 | 亚洲视频人成在线播放| 最近免费中文字幕大全免费| 亚洲中文字幕无码av永久|