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.
| Online: | 23 Members of 4546 |
| Forum: Seam Users |
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!
10 Replies: | |||
|---|---|---|---|
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? |
|||
This not work... another idea? Marcos Sousa marcossousa.com Enjoy it! |
|||
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? |
|||
ok, but appears to me an empty message. Marcos Sousa marcossousa.com Enjoy it! |
|||
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? |
|||
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. |
|||
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 |
|||
Anyone want to create a patch? Dan Allen | mojavelinux.com | Author of Seam in Action |
|||
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. |
|||
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 What kind of transaction is this about anyway? |
Marcos Sousa marcossousa.com Enjoy it!