Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 67710 invoked from network); 1 May 2009 00:32:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 May 2009 00:32:03 -0000 Received: (qmail 95816 invoked by uid 500); 1 May 2009 00:32:00 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 95767 invoked by uid 500); 1 May 2009 00:32:00 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 95757 invoked by uid 99); 1 May 2009 00:32:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 00:32:00 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mauricioaniche@gmail.com designates 74.125.46.29 as permitted sender) Received: from [74.125.46.29] (HELO yw-out-2324.google.com) (74.125.46.29) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 00:31:52 +0000 Received: by yw-out-2324.google.com with SMTP id 2so1190675ywt.17 for ; Thu, 30 Apr 2009 17:31:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type; bh=9/CM9xMClJvtCpb4HxbGizc4x2QPP20bpiEYuEFOIM8=; b=pWm+naWzlR7OCSDiBotVsUwBWqWH0NhXlycMWab15tVIfZheLRdphf/3cjPoDdri35 LNZtRVPu/OTGDjsOjYmN3itH2lQI/wzVA+w3Y51+RicqOT44j6O9b7vGbiyrgIrCKKxe H1GD8yONeNbQf0qytFreAAf4pY34gv/YHsvNc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=i7CO79ZOiZ6moUZcXMJ8PO9ePHAPkH1C+XYCQ6zqQyaK5oS+BahAvIY1QH59wezH6O 78R8pHdBAWte2gu6v8Gzi5V26gagGcV07ikPfvWLIdQH4ap/z0Y6M7x2G/4F3FsR7zRo Fg8mzPPcxMVEspLSTasJjKK82CqlOXumlIpD4= MIME-Version: 1.0 Received: by 10.101.69.6 with SMTP id w6mr4604567ank.6.1241137891206; Thu, 30 Apr 2009 17:31:31 -0700 (PDT) From: Mauricio Aniche Date: Thu, 30 Apr 2009 21:31:11 -0300 Message-ID: <313e92a60904301731n59b22643l70cdf9be02e45169@mail.gmail.com> Subject: @Transactional Spring Annotation in a Struts2 Action does not work To: user@struts.apache.org Content-Type: multipart/alternative; boundary=0016368e21eb1f68c30468ceefee X-Virus-Checked: Checked by ClamAV on apache.org --0016368e21eb1f68c30468ceefee Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi, I am using Struts2+Spring+JPA/Hibernate. When I use the @Transactional to mark an execute() method in a Struts2 Action, the action stops working properly (i.e. the attributes in the action are not automatically setted). It does not work with Spring AOP transactions as well. In my struts.config I setted the following constant: ---- ---- In my applicationContext.xml I set the pointcut to the actions. I have the following: ---- ---- And in my web.config I have open-session-in-view, struts2 filters and the spring listener: ---- open-session-in-view org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter entityManagerFactoryBeanName entityManagerFactory struts2 org.apache.struts2.dispatcher.FilterDispatcher open-session-in-view /* struts2 /* Spring Listener org.springframework.web.context.ContextLoaderListener ---- The funny thing is that if I use the transaction aspect in any other package (i.e. my repositories) everything works fine. It just crashes when I use it in the struts action. Any idea? Thanks in advance, Mauricio --0016368e21eb1f68c30468ceefee--