turbine-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Szűcs Attila <szucs.att...@codespring.ro>
Subject Template execution finished listener
Date Wed, 01 Sep 2010 06:19:14 GMT

I am using Turbine 2.3.2 with Hibernate 3. My problem is that the Hibernate session is not
active when my (Velocity 1.6.4) template executes, and I am accessing fields from the database
for which Hibernate needs lazy initialization. Therefore I get a LazyInitializationException
- no Session error. Since I want my Hibernate session to be alive when a velocity template
executes I would like to have a class to execute after the velocity vm. This way I could close
my Hibernate session properly, only after the velocity template has been rendered. (Disabling
lazy initialization in Hibernate is not an option for me). Are there any possibilities that
Turbine offers to write a kind of listener (I am not sure how to call it) that would execute
right after a velocity screen has been executed?

Thanks ,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message