By bloid
via blog.jdevelop.eu
Published: Mar 17 2008 / 15:37
In this Blog you will see how to add Google-Guice functionality to a Hibernate-Application. In Part I i will introduce a simple Hibernate-Application. In Part II you can see how this Application will be transformed for using Guice.
SaveShareSend
Tags: frameworks, java
Comments
pavelgj replied ago:
Don't go there, unless you're ready to scroll through ENTIRE poorly formatted source code, including Hibernate utility classes and .hbm.xml files (WHY NOT hibernate-annotations???). Plus it's not the best way to use Guice -- author clearly doesn't have too much experience with it.
tweakt replied ago:
Damn, I *just* built some guice-hibernate glue code and interfaces over the last couple days. There is definitely much more powerful ways of using Guice. (Um Why wrap access to Session inside HibernateUtil within a HibernateConnection??). This can be done much cleaner and with far simpler API. Also MethodInterceptors rock! I wish I had a proper forum to present my version. There's good example code out there though. Guice is more powerful than this implies, trust me!
,
mbreese replied ago:
This is nothing more than a code dump... (I'm guilty of doing the same thing, but not this bad). It's also made out to be much harder than what it really is. You really only need one class to properly integrate Hibernate and Guice, after that the rest is the same as you'd do with Spring or just plain Hibernate.
Voters For This Link (9)
Voters Against This Link (3)