hello,

I had a look at Hibernate's adminApp regardig Hibernate session/
transaction handling.

In the adminApp the transaction is commited (which also calls flush())
in the HibenateInterceptor after the invocation. I think this is not 
the best solution because flush() and the actual commit() are places
where most of the database related exceptions might occur and when 
they do the interceptor is unable to communicate the failiure to the 
user as the view is already rendered.

I asked about this at the Hibernate forum and Gavin replied that 
actually the best place for that code would be in the beforeResult()
method of the interceptor. When I do this and an exception occurs 
in my beforeResult() implementation, what is the best way to handle
that? How to communicate that failiure back to the client as there 
is no way I can change the action's result?

Also are there any other ways people are using Hibernate in WW2?

One way I can think of is to use Spring's HibernateTemplate in the
action's code...

any comments on this topic are greatly appreciated

best regards,
erik




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to