From: Rick E. <spr...@us...> - 2006-08-25 09:33:26
|
Update of /cvsroot/springframework/spring/src/org/springframework/jdbc/datasource In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv19300/src/org/springframework/jdbc/datasource Modified Files: JdbcTransactionObjectSupport.java Log Message: Refactored to use the ClassUtils.isPresent() method as opposed to a try catch construct. Index: JdbcTransactionObjectSupport.java =================================================================== RCS file: /cvsroot/springframework/spring/src/org/springframework/jdbc/datasource/JdbcTransactionObjectSupport.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** JdbcTransactionObjectSupport.java 5 Jul 2006 12:40:28 -0000 1.11 --- JdbcTransactionObjectSupport.java 25 Aug 2006 09:33:23 -0000 1.12 *************** *** 29,32 **** --- 29,33 ---- import org.springframework.transaction.TransactionUsageException; import org.springframework.transaction.support.SmartTransactionObject; + import org.springframework.util.ClassUtils; /** *************** *** 55,64 **** static { ! try { ! Class.forName(SAVEPOINT_CLASS_NAME); savepointClassAvailable = true; logger.info("JDBC 3.0 Savepoint class is available"); ! } ! catch (ClassNotFoundException ex) { savepointClassAvailable = false; logger.info("JDBC 3.0 Savepoint class is not available"); --- 56,63 ---- static { ! if (ClassUtils.isPresent(SAVEPOINT_CLASS_NAME)) { savepointClassAvailable = true; logger.info("JDBC 3.0 Savepoint class is available"); ! } else { savepointClassAvailable = false; logger.info("JDBC 3.0 Savepoint class is not available"); |