Attempting to instantiate all of your Hibernate generated Parent and Child
classes by continously running all of your sessions together..
so referencing
http://www.hibernate.org/43.html
You *could* write your own SessionRequestServletFilter which will accomplish
this objective for you
(ensuring the saveOrUpdate and/or merge methods would accomplish your
objective)
There is also mention of JBoss SEAM supports OSIV pattern (but I havent seen
any working examples thus far)
Martin--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed. If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy. Thank you.
----- Original Message -----
From: "Martin Gilday" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Saturday, May 19, 2007 11:42 AM
Subject: Re: Hibernate headache with struts 2
Looks like you are trying to access Hibernate managed objects or perform
session manipultion in your view. Spring makes this easier but you can
do it manually easily. You just need to keep your session open longer.
Have a google for things like open session in view filter.
----- Original message -----
From: "Mansour" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Date: Sat, 19 May 2007 12:36:51 -0300
Subject: Hibernate headache with struts 2
I am trying to use hibernate with my struts project. The problem I keep
on getting :
javax.servlet.ServletException: org.hibernate.SessionException: Session
is closed!
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:518)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421)
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)
This occurs when: session.commit(something);
Is this a struts 2 issue ? IF yes, then how to get s2 to work with
hibernate. I have googled this, and every thing suggest using spring.
This is not an option for me.
Can any one help ?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]