You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Frans Thamura <fr...@meruvian.org> on 2009/02/14 17:11:55 UTC
Struts2 interceptor with JTA in Sprign
hi all
i use an interceptor that do query, so i injected the hibernate using
spring - my struts2 using spring
and i want to implement JTA in my persistance factory
i try use the non interceptor version, work well, but i find the
interceptor cannot work with JTA related injection
can help all
--
--
Frans Thamura
Meruvian
One Stop Java and Enterprise OSS Provider
Mobile: +62 855 7888 699
Blog & Profile: http://frans.thamura.info
Training JENI, Medallion (Alfresco, Liferay dan Compiere).. buruan...
URL: http://www.meruvian.com
Promo: Beli Zmanda Backup di Meruvian, 10% discount dari pricelist..
Buruan sekarang!!!
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts2 interceptor with JTA in Sprign
Posted by Wes Wannemacher <we...@wantii.com>.
On Monday 16 February 2009 05:15:49 Torsten Krah wrote:
> Am Samstag, 14. Februar 2009 17:11:55 schrieb Frans Thamura:
> > i try use the non interceptor version, work well, but i find the
> > interceptor cannot work with JTA related injection
>
> Why?
> I am using S2 and Spring with JTA managed transaction too here and it works
> fine (if spring is the object factory which does create your objects and
> interceptors to get the persistence manager injected).
>
I just want to second this... @Transactional rocks! I just mentioned in
another thread that you can have your services wired into actions that are
configured by Struts rather than the plugin. IMO, it's a good idea to have
your transactions bounded to your service layer, this way you can keep Spring
configuration (even if it is just the @Transactional annotation) out of your
Struts objects.
-Wes
--
Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts2 interceptor with JTA in Sprign
Posted by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de>.
Am Samstag, 14. Februar 2009 17:11:55 schrieb Frans Thamura:
> i try use the non interceptor version, work well, but i find the
> interceptor cannot work with JTA related injection
Why?
I am using S2 and Spring with JTA managed transaction too here and it works
fine (if spring is the object factory which does create your objects and
interceptors to get the persistence manager injected).
Why does it not work for you, i don't get your problem.
Torsten
--
Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.
Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html
Really, I'm not out to destroy Microsoft. That will just be a
completely unintentional side effect."
-- Linus Torvalds