|
From: Artem P. <bla...@ca...> - 2005-11-23 23:51:06
|
I am sorry, but I was not subscribed to the mailing list when I posted = my original message regarding the OpenSessionInViewFilter implementation = in Spring. The main reason why I want to store the Hibernate session in the HTTP = session is that in my application, the lifetime of a business objects = exceeds an HTTP request. Furthermore, the application is layered, and = re-attaching all business objects to a new session for every request = would require leaking some Hibernate-specific code into the presentation = layer and/or implementing "reattachment" mechanisms in my business logic = layer. The time it takes to create session objects is immaterial, and I = am not currently concerned about performance at that level. I'm more = concerned about proper layering. I don't want to replace the original filter with the one I'm = proposing... It's just an alternative for applications that require = long-running sessions. Applications that do not use session management = will work just fine with the original filter. The main problem is that = even though Hibernate entities are "just POJOs", they will most likely = contain proxies, and if the original session is closed, they need to be = merge()d with a new session or else they will start throwing exceptions. = Thank you, Artem Ploujnikov |