have a look here, perhaps it helps you http://www.chenillekit.org/chenillekit-hibernate/dao_sample.html
with regards Sven Homburg Founder of the Chenille Kit Project http://chenillekit.codehaus.org 2010/10/8 Alex W. Croton <acro...@linkfinancial.eu>: > Many thanks to all who offered solutions on this one - I think I've got it > cracked now. > > My problem was not so much in getting the code for the DAO working, it was > the realisation that I could/needed to inject the Session into the DAO to be > able to 'talk' to Hibernate, and to then inject the DAO into the component > code - of course, this will probably prompt a "you don't do it like that!!" > response, but if there's a better way, I still can't see it :-) > > Regards, > > Alex C > >> -----Original Message----- >> From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] >> Sent: 08 October 2010 12:53 >> To: Tapestry users >> Subject: Re: Early steps getting Tapestry and Hibernate working via DAO >> >> On Fri, 08 Oct 2010 04:07:16 -0300, ael <alan-lua...@dash.com.ph> wrote: >> >> > So what would be the difference? >> > The important is you achieve >> > what you want to do. >> >> The difference is that the Tapestry-Hibernate integration (session and >> transaction handling) will not work if your DAO is not a Tapestry-IoC >> service. >> That simple. >> >> As Howard said, you don't need to use Tapestry-Hibernate. If you don't, then >> you need to handle sessions and transactions yourself. >> >> It's very important to achieve, but the way you achieve is is very important >> too. Messed up code, even when it works, has less value, as the only 100% >> sure thing in software development is that something will change. With well- >> written code, reacting to this changes is way faster, easier and needs less >> effort. >> >> -- >> Thiago H. de Paula Figueiredo >> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, >> and instructor Owner, Ars Machina Tecnologia da Informação Ltda. >> http://www.arsmachina.com.br >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org