Tuesday February 10, 2004
Hibernate and iBatis co-existing
AppFuse is in an interesting state right now. In order for me to easily switch to using iBatis for the DAO layer, I left all the Hibernate stuff intact and just added iBatis classes and JARs. The next step is to extract the iBatis stuff into a separate CVS module and write a build.xml file to replace the Hibernate implementation with iBatis.
The one thing that will suck, in the iBatis version, is that the database can't be dynamically created from POJOs. However, if you're going to use the iBatis implementation, its likely that the database (or SQL) already exists. The reason I'm writing this post is because right now, in CVS, you can change the dao.type property to "ibatis" or "hibernate" when building and Voila! - that's the implementation you'll get. I see no reason why any project would ever want to have both implementations (maintenance would be a nightmare), so that's why I'm extracting the iBatis stuff in the next few days.
Posted in Java
at Feb 10 2004, 04:20:47 PM MST
4 Comments
Search This Site
Recent Entries
- Wine Tasting in Napa Valley
- How to build a Shot-Ski
- Bus Project Update
- Farewell to the 2011-2012 Ski Season
- Cruising around the Western Caribbean
- Spring Break!
- A Spectacular Trip to Stockholm and Madrid
- Comparing Web Frameworks and HTML5 with Play Scala at Jfokus 2012
- Play Framework 2.0 with Peter Hilton at Jfokus
- Secure JSON Services with Play Scala and SecureSocial
Posted by Prashant Rane on February 10, 2004 at 07:11 PM MST #
Posted by Jaap on February 11, 2004 at 06:11 AM MST #
Posted by Unknown on February 11, 2004 at 07:25 AM MST #
Last night, I was successfully able to rip out iBatis from AppFuse's core and put it into a contrib directory. I added an "install" and an "uninstall" target (to build.xml in contrib/ibatis) that will install/uninstall iBatis - leaving the Hibernate support intact. Today I'll create another target, "uninstall-hibernate" that will allow the user to choose a iBatis-only solution. That way, if the user runs "install" without running "uninstall-hibernate" they can have both implementations to look at and use.
Posted by Matt Raible on February 11, 2004 at 07:48 AM MST #