myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Werner Punz <we...@gmx.at>
Subject Re: JSF and Command EJB and XA Transactions
Date Thu, 01 Dec 2005 10:38:28 GMT
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.
> 


Mime
View raw message