Dive into Oracle ADF

Send me a mail
 Dive into Oracle ADF   Click to see the XML version of this web page.   (Updated: 2/3/2008; 9:16:56 PM.)
Tips and tricks from Steve Muench on Oracle ADF Framework and JDeveloper IDE

Search blog with Google:
 

Search BC4J JavaDoc:
 

May 2005
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Apr   Jun

Get Firefox!

Monday, May 09, 2005

I triaged a bug report today where a customer was surprised at the behavior of their view object when they performed the following sequence of steps:

  1. Set their application module configuration properties to run in "Failover Mode"
  2. Programmatically called setWhereClause() to add a where clause that took one bind variable and called setWhereClauseParam() to set the bind variable value, and executed the query to display the results in a web page.
  3. Programmatically called setWhereClause() to change the where clause of the same view object instance to one that took two bind variables, and called setWhereClauseParam() twice to set each of those two bind variables, and executed the query to display the results in a web page.
  4. While keeping their browser window open, shutdown their application server to simulate a failure of the application server.
  5. They then started the application server again, and clicked on a link in that still-opened window to cause the "where clause with one bind variables" code described above to execute again. This was so observe that the application could "keep going" after an application server failure.

Only trouble was, their code had apparently never been tested in the conditions when the application module actually did undergo failover reactivation, or they would have observed this behavior during the testing phase. The ADF Business Components failover feature guarantees that your view object instances are reactivated (in the new application server instance) using the same user-defined where clause, bind variables and bind variable values that they had the last time they were executed. So, in the above sequence, the last time they were executed before failing-over, the VO had had two bind variables at VO execution time, and the next time they were used, the code was assuming only one was now needed.

An easy way to eagerly excercise the application failover feature during testing is to visit the Application Module configuration editor's "Pooling and Scalability" page and uncheck the Application Pooling Enabled checkbox. When you run with that configuration property unchecked, it will force the application module's state to be reactivated on each HTTP request so that you can verify that your code will work the same way when application module reactivating occurs at runtime.

AM reactivation from "dehydrated" a pending state snapshot can occur both during an application failover scenario, as well as under extreme load when the value of your jbo.recyclethreshold is not large enough to allow all simultaneous users to enjoy the better performance of "sticking" with the same application module instance from the AM pool that they "touched" on their last HTTP "visit" to the middle-tier.

So, the moral of the story is that it's always good to test your application with application module pooling disabled just to make sure you won't have any surprises in your production environment should your client end up working with an application module instance that has been reactivated from saved state.


10:56:56 PM    



I called my mom for Mother's Day yesterday using SkypeOut. She was out at a restaurant having breakfast with my dad and brother nine timezones earlier in California. A few minutes before my call, my sister had also thought to call Mom from where she works in Europe to say hi, as well. My quick-thinking dad had my mom and brother whip out their cell phones and dial him up -- sitting just inches away -- in order to get a transatlantic five-way conference call going. I passed the headphones to my kids, in turn, to say hi to Grandma as well...so thanks to Skype and the ATT cellphone network, we had three generations of Muench's making mom's day...

I could only imagine the looks my mom, dad, and brother must have gotten at the restaurant, each sitting with their own cellphone to their head, talking to each other and to us far away!


10:28:05 PM    


© Copyright 2008 Steve Muench.