Re: Is it possible to get a new Hibernate session and

2013-09-03 Thread Martin Kersten
@Thiago I am absolutely correct here. The LazyLoadingException is indeed resulting from a Transactional problem. The lazy loading has to be done inside the very same transaction unless you reattach the entity for the next transaction. On reattach hibernate reassures the entity has not changed by l

Re: Is it possible to get a new Hibernate session and

2013-09-02 Thread Boris Horvat
hm...I see your point, then I will drop this idea then. Thanks On Tue, Sep 3, 2013 at 12:20 AM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > On Mon, 02 Sep 2013 18:01:06 -0300, Boris Horvat > wrote: > > Hi Thiago, >> > > Hi! > > > sorry for continuing this thread but I was won

Re: Is it possible to get a new Hibernate session and

2013-09-02 Thread Thiago H de Paula Figueiredo
On Mon, 02 Sep 2013 18:01:06 -0300, Boris Horvat wrote: Hi Thiago, Hi! sorry for continuing this thread but I was wondering is it possible to somehow provide some automated ways in tapestry to reattach the session. Just use Session.merge() before using an entity. Or create a session p

Re: Is it possible to get a new Hibernate session and

2013-09-02 Thread Boris Horvat
Hi Thiago, sorry for continuing this thread but I was wondering is it possible to somehow provide some automated ways in tapestry to reattach the session. Something like handle uncaught exceptions in normal applications. If there is such an event I guess it should be possible to somehow have this

Re: Is it possible to get a new Hibernate session and

2013-09-02 Thread Thiago H de Paula Figueiredo
On Mon, 02 Sep 2013 15:31:58 -0300, Martin Kersten wrote: John, if I understood you correctly you expect the session to be still alive when hibernate answers a action request in order to render a new response? If this is the case then the session is already gone. For each request a new sessio

Re: Is it possible to get a new Hibernate session and

2013-09-02 Thread Martin Kersten
John, if I understood you correctly you expect the session to be still alive when hibernate answers a action request in order to render a new response? If this is the case then the session is already gone. For each request a new session is born and closed after the rendering phase is completed. Do

Re: Is it possible to get a new Hibernate session and

2013-09-02 Thread Thiago H de Paula Figueiredo
See org.hibernate.Session.merge(). And this isn't really about Tapestry. On Mon, 02 Sep 2013 13:10:13 -0300, Jon Williams wrote: quoting from the wiki... https://wiki.apache.org/tapestry/Tapestry5AvoidingLazyInitializationExceptions "*To really solve Lazy Initialization Exceptions, you nee