Help

Controls

PermLinkWikiLink

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Forum: Seam Users Forum ListTopic List
11. Jun 2008, 22:58 CET | Link

Hello Community,

I have Spring 2.5 and seam 2.0.2 working together in the same project. I'm having some troubles with transaction. When a spring method throws a rollback transaction, seam add a Transaction Failed message to JSF messages.

My components.xml looks like:

 <core:init transaction-management-enabled="true" debug="false"/>
<spring:context-loader/>
<spring:spring-transaction platform-transaction-manager="#{transactionManager}"/>

And my Spring transaction configs look like:

<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"/>
<tx:annotation-driven proxy-target-class="false" mode="proxy"/>

Is there anything that I can do?

ps: I can't set proxy-target-class to true because some transactions doesn't rollback fine!

 

Marcos Sousa marcossousa.com Enjoy it!

10 Replies:
11. Jun 2008, 23:08 CET | Link

Tried nulling the org.jboss.seam.TransactionFailed key in your properties files?

 

If a man speaks in the forest and there is no woman around to hear him, is he still wrong?

11. Jun 2008, 23:35 CET | Link

This not work... another idea?

 

Marcos Sousa marcossousa.com Enjoy it!

11. Jun 2008, 23:37 CET | Link

Well if you have edited away the value and the text still appears then one thing that comes to mind is that you haven't edited the correct thing ;-)

 

If a man speaks in the forest and there is no woman around to hear him, is he still wrong?

11. Jun 2008, 23:46 CET | Link

ok, but appears to me an empty message.

 

Marcos Sousa marcossousa.com Enjoy it!

12. Jun 2008, 07:52 CET | Link

If you really hate the message you can override addTransactionFailedMessage in SeamPhaseListener. Hmm, there has to be a more simple way.

 

If a man speaks in the forest and there is no woman around to hear him, is he still wrong?

15. Jun 2008, 01:17 CET | Link

I've got the same issue. I think it's unnecessary here to raise a FacesMessage, because the web page user shouldn't be informed about the transaction failure.

If we need, we could add a more meaningful message on a transaction failure but just in appropriate form within a controller and not from framework.

In my case, i expect those exception but will not inform the user about it.

15. Jun 2008, 02:36 CET | Link

Actually, the correct solution for this problem would be to have a FacesTransactionEvents which observes the transaction failed event. That way, if you don't want the event, it's just a matter of overriding the FacesTransactionEvents component either to disable it or do your own thing. You can see this handoff used with security-related events and messages.

Can you file a JIRA?

 

Dan Allen | mojavelinux.com | Author of Seam in Action

15. Jun 2008, 02:40 CET | Link

JBSEAM-3116

Anyone want to create a patch?

 

Dan Allen | mojavelinux.com | Author of Seam in Action

16. Jun 2008, 13:01 CET | Link

Resolution of JBSEAM-2989 will fix a whole class of Seam's over verbose messages problems. This one as well.

Please fix/vote for JBSEAM-2989 instead.

20. Jun 2008, 21:53 CET | Link

I too am getting this message in my queue and don't even know where its coming from!

Isn't there a way to prevent it in the first place - like turning off this transaction service if I'm not using it?

What kind of transaction is this about anyway?