This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Unwanted behavior: Action method being called several times
Julien Martin
Ranch Hand
Joined: Apr 24, 2004
Posts: 383
posted
0
Hello, I have a managed bean that calls a session ejb which itself does a search. The problem is that it is supposed to retrieve a resultset ONCE and the displayed behavior is that it never stop doing so. It fetches the resultset SEVERAL TIMES.
Here is the managed bean and the method to look at is the performSearch method:
Here is the object request passed:
and here is the session ejb:
I just don't understand why it does so. The peformSearch should be executed ONCE only.
Here is my face config file:
Can anyone help?
Thanks in advance,
Julien.
Daniel Rhoades
Ranch Hand
Joined: Jun 30, 2004
Posts: 186
posted
0
You will probably get at least two searches happen due to JSF lifecycles:
- renderView phase (1st time you see the page) - restoreView phase (when you execute another action)
But it depends on your how you are moving from one page/action to another.
Drinking more tea is the key...
Julien Martin
Ranch Hand
Joined: Apr 24, 2004
Posts: 383
posted
0
Thanks Daniel, The problem is that it is executed 20 to 30 times instead of once... Julien.