cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JD Daniels>
Subject Re: Using Hibernate via Java, not Flow
Date Wed, 13 Apr 2005 18:22:24 GMT
I use the open Session in view model. The session lasts the duration of 
the request. I can't find the article I used to get up to speed on it, 
but this should get you going:

Brent Johnson wrote:
> Well, I tried adding in a hibernate close to get around the issue of two 
> different sessions monkeying around with the POJO objects, causing an 
> exception to be thrown (and when those get thrown the whole application 
> flakes out).
> But, I'm running into a "chicken-or-the-egg" problem. If I close the session 
> prior to my sendPageAndWait() call, the POJO's become invalid and if I try 
> to access one of their getters I get an exception:
> could not initialize proxy - the owning Session was closed
> But, I can't close them right after the sendPageAndWait(), because at that 
> point I need to decide whether I should save the modified POJO's, delete 
> them, etc depending on what the user chose to do.
> Where do most people decide to close their sessions when using 
> sendPageAndWait()?
> On 4/13/05, Leszek Gawron <> wrote:
>>It's all not that hard but still there's some philosophy to swallow and
>>that might take time.
> I'm a pretty quick learner, I'll take a quick look and see if I can wrap my 
> head around it enough to be able to get it implemented before the project is 
> scheduled to start testing.
> Thanks,
> - Brent

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message