Your "AppModule" is created with the same name used in web.xml (as Robin pointed out). By default its AppModule.java, as created by the quickstart archetype. You should find that to use Hibernate you need only to add it, annotations, and tapestry-hibernate to your pom.xml. After that you need only to @Ineject Session instances into classes/components/pages where you want to use it. For the record, I did a test with entities in a different package (not *.entities) and was able to use Hibernate fine. This is because the tapestry-hibernate module auto-loads (and maganges) sessions based on hibernate.hbm.xml, which also is responsible for loading entities (unless you configure via another method). I did not need to contribute as the documentation suggested.

sincerely,
chris

Andy Buckley wrote:
Hi,

I'm trying to get Tapestry working with Hibernate - unfortunately there isn't
much guidance on this, but I found this tutorial handy:

http://wiki.apache.org/tapestry/Tapestry5HowToUseTapestryHibernate

My application differs from this template, though, because the mapped entities
are in an external library. This page:

http://tapestry.apache.org/tapestry5/tapestry-hibernate/conf.html

shows a way to deal with this, but I'm left with no idea where to put my
contributeHibernateSessionSource(...) method! It doesn't seem to work if added
to the page class (good: that would be inconvenient anyway!) so where should I
put it? Help! :-)

Thanks,
Andy

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to