-
1. Re: StatusMessages getting lost after Exception
rchoudha Nov 13, 2012 1:41 PM (in response to germanescobar)Hi,
Were you able to get an answer or workaround for this issue? In my app the StatusMessages keep disappearing when there is some exception in the app.
I cannot let all the exceptions to be handled by Seam. I have to restart the JBoss server to get the messages to appear again.
Please advise.
thanks
-
2. Re: StatusMessages getting lost after Exception
mkouba Nov 14, 2012 4:34 AM (in response to rchoudha)Hi,
the example above works as expected. However you have to use long-running conversation (@Begin, conversation.begin(), etc.), since temporary conversation does not survive redirect.
I'm not sure about "StatusMessages disappearing" and restarting AS. Provide more info so that we can check :-)
-
3. Re: StatusMessages getting lost after Exception
rchoudha Nov 14, 2012 10:11 AM (in response to mkouba)Hello Martin,
Thanks for quick reply. I have EAP 5.0 running a JSF Seam app ( Seam 2.2.1.EAP5). The database that the app uses goes down every night. I can see exceptions during the night in the logs when JBoss is trying to renew the db connections in the pool. One side-effect (a big one) I see is that the Status Messages stop appearing on the pages once that happens.
When I restart the JBoss, the messages start appearing on the page again. If the database does not go down and if there is no major uncaught exception in the app,
the Status Messages work properly in the app for days.
Is it a bug in Seam version?
Please advise.
thanks
Rohit
-
4. Re: StatusMessages getting lost after Exception
mkouba Nov 14, 2012 10:36 AM (in response to rchoudha)Hm, looks odd. What are the other side effects?
-
5. Re: StatusMessages getting lost after Exception
rchoudha Feb 14, 2013 11:23 AM (in response to mkouba)How to Reproduce
1# You must be using the StatusMessage.add() method which gets the message from a .properties file (The message is got via ResourceBundle).
2# You execute multiple times the part of your system that is suppose to prompt you the messages. After some executions the messages stop showing up.
Issue
After decompiling the SEAM class I notice that the ResourceBundle turns NULL after multiple executions, I haven't gone too deep in finding why the ResourceBundle in SEAM is turning NULL, so instead we placed the messages in the database and we retrieve the messages from there.
It is important to notice that this issue only happens when the application gets the messages from a properties file. If the message is hardcoded this issue never happens.
thanks