Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 76005 invoked from network); 1 Dec 2005 10:54:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Dec 2005 10:54:03 -0000 Received: (qmail 82513 invoked by uid 500); 1 Dec 2005 10:53:59 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 82465 invoked by uid 500); 1 Dec 2005 10:53:59 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 82454 invoked by uid 99); 1 Dec 2005 10:53:59 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2005 02:53:59 -0800 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=RCVD_NUMERIC_HELO,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of gcjmu-myfaces-user@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2005 02:55:25 -0800 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1Ehm2A-0002UY-Jb for users@myfaces.apache.org; Thu, 01 Dec 2005 11:51:26 +0100 Received: from 195.78.47.10 ([195.78.47.10]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 01 Dec 2005 11:51:26 +0100 Received: from werpu by 195.78.47.10 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 01 Dec 2005 11:51:26 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: users@myfaces.apache.org From: Werner Punz Subject: Re: JSF and Command EJB and XA Transactions Date: Thu, 01 Dec 2005 11:38:28 +0100 Lines: 48 Message-ID: References: <3482D05C8415B243B76987855C5F8A6207C74D51@perexc14.internal.dom> Reply-To: werpu@gmx.at Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 195.78.47.10 User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en In-Reply-To: <3482D05C8415B243B76987855C5F8A6207C74D51@perexc14.internal.dom> Sender: news X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Ah one last word, never ever use a phase listener for stuff like that, the problem is, that phase listeners might not be called if an action or whatever decides to skip additional phases and do the shortcut into the rendering, you might get the initial phase listener called but not the one which deals with closing the transactions. TRIFILETTI, Mel wrote: > At the moment we have a struts application which we are trying to move > to JSF. > > We are using XA transactions in our application. Currently we use a > command pattern in struts, we implement this by calling the command in > the our base action execute() method, which calls our actionExecute() > method. This means that the logic in all sub classes is placed in the > actionExecute() which runs in the command. > > The advantage of this is, all our logic is automatically run in an XA > transaction, and all our ejb references are placed in one place on the > command. > > So my question is: > I am trying to find a convenient customisation point in JSF so I can run > all my business logic in a single transaction via the EJB command pattern. > > I have had a brief look at a phase listeners, which provides the > beforePhase() and afterPhase() methods. Given the two methods I can't > use the command pattern but could maybe use straight JTA to accomplish > my goals. > > I thought about looking at modifying the guts of the faces servlet but I > would rather not do that. > > Where else can I look? > > Mel > "DISCLAIMER: This email, including any attachments, is intended only for > use by the addressee(s) and may contain confidential and/or personal > information and may also be the subject of legal privilege. If you are > not the intended recipient, you must not disclose or use the information > contained in it. In this case, please let me know by return email, > delete the message permanently from your system and destroy any copies. > > Before you take any action based upon advice and/or information > contained in this email you should carefully consider the advice and > information and consider obtaining relevant independent advice. >