You can use [1]Middlegen to [2]generate *.hbm.xml files, then use [3]
hbm2java to generate Pojos.
[1] -- http://boss.bekk.no/boss/middlegen/
[2] -- http://www.hibernate.org/98.html
[3] -- http://hibernate.bluemars.net/276.html
Combine this with Spring's OpenSessionInView and the Struts' wild
card action mapping, and you'll find yourself developing at lighting
speed.
In fact, one of my clients have extended Middlegen to generate the
following (in addition to the *.hbm.xml files) from any data source:
a) a default Dao layer (each of which extends HibernateDaoSupport)
b) a base service layer with a stock set of finders using the
injected Dao's from (a)
c) an extended service layer impl (1 time gen) that extend (b) so
future regen's of (b) don't overwright custom code
d) unit tests for all generated sources
e) all of the xml needed to wire together the Dao and Service layers.
All I have to do, is create a new Facade and impl, and with Springs
autowiring, my crud work is done. The whole thing is quite
impressive and serves as a pretty nice launchpad for a new
project...which leads to my next link:
https://appfuse.dev.java.net/
--
James Mitchell
On Nov 2, 2005, at 11:49 AM, Gaet wrote:
Thanks Wendy,
yes, this article is a good presentation but it's a pity that there
is not a chapter with Hibernate!
It seems that only one tutorial exists with these 3 frameworks...
Does somebody know if it exists code generator for the interfaces
when using these 3 framework?
Because, I'm afraid on the number of classes we have to develop to
only retrieve one row in a table!
Thanks for help
----- Original Message -----
From: Wendy Smoak
To: Struts Users Mailing List
Sent: Wednesday, November 02, 2005 5:16 PM
Subject: Re: Struts + Spring + Hibernate
On 11/2/05, Gaet <[EMAIL PROTECTED]> wrote:
Are there some developers here who use this solution?
Does someone have a good tutorial or sample to indicate? (I've
already
seen "Wiring your web applications with Open Source
java"..thanks :o))
For the Struts + Spring part, Ted recently posted a link to a
good article:
http://www-128.ibm.com/developerworks/java/library/j-sr2.html
--
Wendy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]