From: Juergen H. <jho...@us...> - 2007-04-30 16:59:21
|
Update of /cvsroot/springframework/spring/src/org/springframework/jdbc/datasource In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv1115/src/org/springframework/jdbc/datasource Modified Files: DataSourceTransactionManager.java Log Message: added javadoc warning about the DataSource having to return independent Connections Index: DataSourceTransactionManager.java =================================================================== RCS file: /cvsroot/springframework/spring/src/org/springframework/jdbc/datasource/DataSourceTransactionManager.java,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** DataSourceTransactionManager.java 18 Mar 2007 13:30:26 -0000 1.42 --- DataSourceTransactionManager.java 30 Apr 2007 16:59:18 -0000 1.43 *************** *** 28,33 **** import org.springframework.transaction.support.AbstractPlatformTransactionManager; import org.springframework.transaction.support.DefaultTransactionStatus; - import org.springframework.transaction.support.TransactionSynchronizationManager; import org.springframework.transaction.support.ResourceTransactionManager; /** --- 28,33 ---- import org.springframework.transaction.support.AbstractPlatformTransactionManager; import org.springframework.transaction.support.DefaultTransactionStatus; import org.springframework.transaction.support.ResourceTransactionManager; + import org.springframework.transaction.support.TransactionSynchronizationManager; /** *************** *** 40,43 **** --- 40,51 ---- * Connection per DataSource. * + * <p><b>Note: The DataSource that this transaction manager operates on needs + * to return independent Connections.</b> The Connections may come from a pool + * (the typical case), but the DataSource must not return thread-scoped / + * request-scoped Connections or the like. This transaction manager will + * associate Connections with thread-bound transactions itself, according + * to the specified propagation behavior. It assumes that a separate, + * independent Connection can be obtained even during an ongoing transaction. + * * <p>Application code is required to retrieve the JDBC Connection via * {@link DataSourceUtils#getConnection(DataSource)} instead of a standard *************** *** 130,133 **** --- 138,144 ---- * nevertheless a TransactionAwareDataSourceProxy passed in, it will be * unwrapped to extract its target DataSource. + * <p><b>The DataSource passed in here needs to return independent Connections.</b> + * The Connections may come from a pool (the typical case), but the DataSource + * must not return thread-scoped / request-scoped Connections or the like. * @see TransactionAwareDataSourceProxy * @see org.springframework.transaction.jta.JtaTransactionManager |