Christian Bollmeyer on 01/09/05 18:19, wrote:
my suggestion would be to have a closer look at the Spring framework. IoC / dependency injection is really cool once you get a grasp of it. Instead of having the service look up a DAO instance, you simply inject the fitting implementation class into the service via Spring. The service itself only knows the DAO interface and has a setter property for it. Note that this way you also have to deal with shared instances (like with iBATIS DAO) and therefore have to keep heed of thread issues, but luckily Spring also provides template implementations for most common database access solutions (JDBC, iBATIS, Hibernate, JDO, Toplink (by Oracle) which are said (I still have to check that out) to be inherently thread-safe. Btw. can anybody here confirm this? Currently, we are probably too cautious in this direction (using iBATIS).
I am just catching up on these old mails, and I totally agree that Spring lends major productivity gains.
But I would love to know what the appropriate testing strategy would be to prove whether Spring's template implementations of these data service layer frameworks are thread-safe.
Or does Spring have a series of tests in its source code that prove it already? (Unlikely methinks).
Adam --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]