|
From: <jue...@we...> - 2003-03-28 18:45:23
|
Hi Rod, everybody, I've checked in the following major changes: - JndiServices is now a static helper (used in DataSourceUtils, = JmsTemplate, and the EJB access classes); ContextFactory is dissolved = for the time being. - SingleConnectionDataSource can now wrap the underlying single = connection to suppress close calls (via a DynamicProxy), to be able to = accept close() calls from non-SmartDataSource aware users like O/R = mapping toolkits. - introduced generic TransactionStatus for programmatic rollback etc. - moved PlatformTransactionManager from the AOP package to the = transaction package, and reworked it (now features a getTransaction = method taking propagationBehavior and isolationLevel parameters and = returning a TransactionStatus, and commit and rollback methods). - moved propagation behavior and isolation level constants to = PlatformTransactionManager, using the java.sql.Connection values for the = latter and adding a "default" value. - added TransactionTemplate+TransactionCallback analogous to = JdbcTemplate, the callback getting the TransactionStatus for otpional = programmatic control and returning a result object to be able to return = an object to the original caller. - reworked AOP's TxControl into TransactionControl that uses = TransactionStatus. - completed transaction exceptions, modelling = HeuristicCompletionException with an outcome state instead of a = dedicated hierarchy for these rather rare situations. - introduced JtaServices helper class and JtaTransactionManager = implementation in com.interface21.transaction.jta (no dedicated = JtaTemplate, easily achievable via feeding a JtaTransactionManager to = TransactionTemplate). - introduced SingleConnectionTransactionManager in = com.interface21.transaction.mock, a transaction manager for = SingleConnectionDataSource, handling autoCommit state and = commit/rollback of the single underlying connection (for testing = purposes, and for being able to run server-oriented data access and = business logic transactionally in a standalone application). - introduced AbstractPlatformTransactionManager in = com.interface21.transaction.support, allowing for easy implementation of = PlatformTransactionManagers (handling existing transactions, = programmatic rollback-only, non-transactional fallback, etc), used by = both JtaTransactionManager and SingleConnectionTransactionManager. - introduced TransactionCallbackWithoutResult in = com.interface21.transaction.support, allowing for implementing a = doInTransaction version without the need to return a (null) result. Rod, please check the AOP transaction interceptor, I've not tested it = beyond the test suite. I am aware that we might still need some tweaking = of the transaction support in terms of design, but I like the current = version, and I consider it a good basis. I hope you like the design = changes, of course I'm open to any suggestions. Finally, I have that there aren't any tests for the transaction package = yet - they are forthcoming, promised! (repeat to myself: "test first" = "test first" "test first"...) Regards, Juergen DI J=FCrgen H=F6ller Senior System Architect __________________________________ werk3ATS - division systementwicklung part of werk3AT internetmedien oeg europaplatz 4 A - 4020 linz t. +43 (0) 732 71 65 29 f. +43 (0) 732 71 65 29 3 jue...@we... www.werk3at.com __________________________________ werk3ATS - WIR ENTWICKELN ERFOLG |