• Post Reply Bookmark Topic Watch Topic
  • New Topic

Threads in JSF?  RSS feed

 
Knolf Moervenson
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I Like to add a short message system on my jsf so that a message like "Saved" or "No Result" is displayed for just 2 or 3 seconds. How can I do that? Is it possible to work with threads in JSF?
 
Dariusz Kordonski
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you want to display the message on the client side (browser)? Then I'm afraid threads won't be any help for you. You should try to do this with JavaScript.

As far as I know, you should generally avoid atarting threads within a J2EE application on your own, i.e. using Thread.start(). They may 'hang' within the application server even after your application was stopped / reloaded, causing some memory issues.
 
Michele Giacobazzi
Greenhorn
Posts: 1
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dariusz Kordonski wrote:

As far as I know, you should generally avoid atarting threads within a J2EE application on your own, i.e. using Thread.start(). They may 'hang' within the application server even after your application was stopped / reloaded, causing some memory issues.


How would you handle a background operation than? For example, I would need to refresh some data periodically, as long as there are active sessions on the application.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!