Hello,
I' just looked at jBoss Seam documentation. I wonder if anyone allready
suggested to have similar features on Struts actions, that seems not so
difficult to implement, by mixing an OpenSessionInView interceptor, some
ModelDriven elements and injecting a JPA EntityManager in the action.
As
I think Ted and I started a conversation briefly about this, and I
know there was a thread on openjpa-users a while back. The
OpenSessionInView doesn't really translate well to JPA and
EntityManagers. In Hibernate, you have a 'getCurrentTransaction' (or
is it getRunningTransaction, I can't
Hi All,
I´m studing Interceptors and I was looking for the local where Struts call
the destroy() method of Interceptor.
The init() method is called at the same time of construction of Interceptor,
but I can´t find where the destroy is called.
Someone know where its happen?
Tanks!
Décio
This is one of the founding principles that we put into JCatapult. It
uses Guice, which is pretty good for DI and Hibernate for JPA. JCatapult
uses a Filter to implement open session in view using Guice and it works
well. An interceptor could work for Struts only applications as well.
but with JPA, there is a one-to-one relationship with EntityManagers and
transactions.
Not true if you are speaking about extended persistence contexts. Also, even
transaction-scoped EntityManagers don't require a transaction for read only
queries.
You know, I think you're right! I searched the entire codebase (both xwork
and struts) and I have found nowhere where we call destroy() on the
interceptors. I guess that hasn't been an issue because if the destroy
isn't being called, no big deal because your usually shutting down anyway.
If we
If by alternate implementation, you mean an implementation of JSR
299, that's something best discussed with the MyFaces group.
Evidentially, Shale is merging with MyFaces, making MyFaces our
one-stop JSF shop. :)
Meanwhile, Don's been working on a scope plugin in the sandbox that
mimic's
Actually, we've done a little more work on the scope plugin since we
took it out of the sandbox:
http://cwiki.apache.org/S2PLUGINS/scope-plugin.html
Originally we took most of our API from Seam, but I think we'll be
diverging from Seam a bit since it will make things easier for s2 users.
My