I am reading the book Patterns of enterprise application architecture. While going through the basic patterns - such as Registry pattern I am finding that possibilities that these patterns which were first published in Nov,2002 may not be the best possible solutions to go for.
For example take the Registry pattern. In our organization we use simple JDBC calls for db operations and if needed pass the connection object for a single transaction. This approach is not the best - but the alternative of using Registry pattern also is not seeming good as the dependency would then not be visible - can be an issue for testing. Dependency Injection is suggested as a better way to implement this behavior.
Can anyone who has worked on Java EE web/enterprise apps comment on this - and what would you recommend to analyze the usage of each pattern (its pros and cons?). Any recent book that does a coverage of this in detail?.
I recommend Adam Bien's Real World Java EE Patterns if you're looking for an up to date coverage of patterns and best practices with Java EE 5 and 6: