cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <>
Subject Re: Flow Database stuff ( The new FOM? )
Date Fri, 11 Jul 2003 13:49:12 GMT

On Thursday, July 10, 2003, at 09:04 AM, Reinhard Pötz wrote:

> IMO no. I would use Object/Relational mapping tools like OJB
> or Hibernate (
>> Is there a wiki somewhere on this type of thing?
> Wiki.jsp?page=XMLFormJXFormHibernateAndFlowscr
> ipt
> and here you find a component providing a Hibernate session:
> /src/java/org/apache/plexus/hibernate/ 
> ot=plexus

Forgive me if I have not entirely understood the usage patterns of the  
classes above.

However, with the generous assistance of Ugo Cei, I am successfully  
using the technique highlighted in the first sample here [1] for  
managing Hibernate Sessions in my FlowApp.

The basic issue is that you want to avoid maintaining an open Hibernate  
Session whilst the user is interacting with a form (etc.). The Session  
should to be opened and closed during each Request (and any Transient  
Beans refreshed before re-use). The above technique uses a Servlet  
Filter to manage this, with a static method to retrieve a Session in  
your flowscript at the beginning of each Request that needs it.



regards Jeremy

View raw message