• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

recursive JSF action

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the error we get when we call a JSF action recursively?

Code:
Public String actionOpen()
{
String Str="";
return actionOpen();
}

I think its a stackoverflow exception ..??
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try it yourself?

It is not different from how it behave in plain vanilla Java (which the posted code actually is, JSF is just a component based MVC framework).
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yup.

An action processor is jkust a plain old method, and it does exactly what any other plain old method would do. The only thing magic about Action methods is that JSF calls them when a view demands it.
 
sriram vemaraju
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot i wanted to try but thought that it would hang up my system.
 
Tim Holloway
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

sriram vemaraju wrote:Thanks a lot i wanted to try but thought that it would hang up my system.



Only temporarily. Eventually the thread would blow on a stack overflow.

How "hung up" your system would be can vary. Other threads will continue to run, but the CPU running the recursing thread would go to 100%, and overall system response will be degraded. It shouldn't crash or lock the machine, however.
 
reply
    Bookmark Topic Watch Topic
  • New Topic