cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brent Johnson <bljohn...@gmail.com>
Subject Re: Using Hibernate via Java, not Flow
Date Wed, 13 Apr 2005 21:12:09 GMT
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 <lgawron@mobilebox.pl> 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

Mime
View raw message