|
From: Juergen H. <jho...@us...> - 2007-01-31 23:36:16
|
Update of /cvsroot/springframework/spring/src/org/springframework/jdbc/datasource In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv18865/src/org/springframework/jdbc/datasource Modified Files: DataSourceTransactionManager.java Log Message: polishing Index: DataSourceTransactionManager.java =================================================================== RCS file: /cvsroot/springframework/spring/src/org/springframework/jdbc/datasource/DataSourceTransactionManager.java,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** DataSourceTransactionManager.java 22 Dec 2006 20:45:08 -0000 1.37 --- DataSourceTransactionManager.java 31 Jan 2007 23:36:11 -0000 1.38 *************** *** 1,4 **** /* ! * Copyright 2002-2006 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); --- 1,4 ---- /* ! * Copyright 2002-2007 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); *************** *** 31,35 **** /** ! * PlatformTransactionManager implementation for a single JDBC DataSource. * capable of working in any environment with any JDBC driver, as long as the setup * uses a JDBC 2.0 Standard Extensions / JDBC 3.0 <code>javax.sql.DataSource</code> --- 31,36 ---- /** ! * {@link org.springframework.transaction.PlatformTransactionManager} ! * implementation for a single JDBC {@link javax.sql.DataSource}. This class is * capable of working in any environment with any JDBC driver, as long as the setup * uses a JDBC 2.0 Standard Extensions / JDBC 3.0 <code>javax.sql.DataSource</code> *************** *** 40,48 **** * <p>Application code is required to retrieve the JDBC Connection via * {@link DataSourceUtils#getConnection(DataSource)} instead of J2EE's standard ! * {@link DataSource#getConnection()}. This is recommended anyway, as it throws ! * unchecked <code>org.springframework.dao</code> exceptions instead of checked ! * SQLException. Spring classes such as JdbcTemplate use this strategy implicitly. ! * If not used with this transaction manager, the DataSourceUtils lookup strategy ! * behaves exactly like the common one; it can thus be used in any case. * * <p>Alternatively, you can also allow application code to work with the standard --- 41,49 ---- * <p>Application code is required to retrieve the JDBC Connection via * {@link DataSourceUtils#getConnection(DataSource)} instead of J2EE's standard ! * {@link DataSource#getConnection()}. Spring classes such as ! * {@link org.springframework.jdbc.core.JdbcTemplate} use this strategy implicitly. ! * If not used with this transaction manager, the {@link DataSourceUtils} lookup ! * strategy behaves exactly like the native lookup; it can thus be used in a ! * portable fashion. * * <p>Alternatively, you can also allow application code to work with the standard *************** *** 52,62 **** * proxy DataSource to your DAOs, which will automatically participate in Spring-managed * transactions when accessing it. Note that DataSourceTransactionManager still needs ! * to be wired with the target DataSource, driving transactions for it. * * <p>Supports custom isolation levels, and timeouts that get applied as * appropriate JDBC statement timeouts. To support the latter, application code ! * must either use JdbcTemplate, call {@link DataSourceUtils#applyTransactionTimeout} ! * for each created Statement, or go through a {@link TransactionAwareDataSourceProxy} ! * which will create timeout-aware Connections and Statements. * * <p>Consider defining a {@link LazyConnectionDataSourceProxy} for your target --- 53,64 ---- * proxy DataSource to your DAOs, which will automatically participate in Spring-managed * transactions when accessing it. Note that DataSourceTransactionManager still needs ! * be configured with the specific DataSource that it should create transactions for. * * <p>Supports custom isolation levels, and timeouts that get applied as * appropriate JDBC statement timeouts. To support the latter, application code ! * must either use {@link org.springframework.jdbc.core.JdbcTemplate}, call ! * {@link DataSourceUtils#applyTransactionTimeout} for each created JDBC Statement, ! * or go through a {@link TransactionAwareDataSourceProxy} which will create ! * timeout-aware JDBC Connections and Statements automatically. * * <p>Consider defining a {@link LazyConnectionDataSourceProxy} for your target *************** *** 68,76 **** * * <p>On JDBC 3.0, this transaction manager supports nested transactions via the ! * JDBC 3.0 {@link java.sql.Savepoint} mechanism. The "nestedTransactionAllowed" flag ! * defaults to "true", since nested transactions work without restrictions on JDBC * drivers that support savepoints (such as the Oracle JDBC driver). * ! * <p>This implementation can be used as a replacement for the * {@link org.springframework.transaction.jta.JtaTransactionManager} in the single * resource case, as it does not require a container that supports JTA: typically --- 70,79 ---- * * <p>On JDBC 3.0, this transaction manager supports nested transactions via the ! * JDBC 3.0 {@link java.sql.Savepoint} mechanism. The ! * {@link #setNestedTransactionAllowed "nestedTransactionAllowed"} flag defaults ! * to "true", since nested transactions will work without restrictions on JDBC * drivers that support savepoints (such as the Oracle JDBC driver). * ! * <p>This transaction manager can be used as a replacement for the * {@link org.springframework.transaction.jta.JtaTransactionManager} in the single * resource case, as it does not require a container that supports JTA: typically |