You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Stefan Böcker <ma...@v13dev.de> on 2014/12/09 15:45:34 UTC
Tapestry 5 and Hibernate (Session handling)
Hi,
I am new to Tapestry 5 and currently working on a simple web application
that makes use of Hibernate.
Injecting Hibernate-sessions in pages is simple and works fine, however
for my little web application I have to use the session handling of some
third-party library, that is part of my application.
I already implemented the method "contributeHibernateSessionSource" in
AppModule to have my own logic for reading a configuration-file. This
works fine, but unfortunately it is not enough. ;)
Now I want to use the session handling of the third-party library. Is
there any way to tell Tapestry not to handle the Hibernate-session the
default way, but to use some session-handling logic that I (or some
third-party library) provide?
I know, that it is a lot easier to just let Tapestry deal with sessions,
but maybe there is also a hard way? ;)
Thanks for your help!
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Tapestry 5 and Hibernate (Session handling)
Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Tue, 09 Dec 2014 12:45:34 -0200, Stefan Böcker <ma...@v13dev.de> wrote:
> Hi,
Hi!
> Now I want to use the session handling of the third-party library. Is
> there any way to tell Tapestry not to handle the Hibernate-session the
> default way, but to use some session-handling logic that I (or some
> third-party library) provide?
In this case, don't use tapestry-hibernate (i.e. not have it in your
classpath. Just create a org.hibernate.Session service in your AppModule
so you can @Inject Session in services, components and pages.
--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org