WebLogic Stuck Thread Case – Large Fetch Generated by get row ADF BC method by Red Samurai
By Juergenkress-Oracle on Jan 16, 2014
post is not about a bug, but rather about hidden underwater stone to
avoid. Based on my previous use case for WebLogic Stuck Thread - Reproducing WebLogic Stuck Threads with ADF CreateInsert Operation and ORDER BY Clause,
I will describe one more possible scenario for the same issue. This
will be related to ADF BC API misuse, often it is unclear what side
effect could produce at first friendly looking method. This method -
Please download complete sample application, if you are interested to reproduce it in your environment - LargeFetchApp_v3.zip.
This sample provides a method to generate dummy data for regions, around 10000 rows. View Object is using ORDER BY to display records in ascending order:
There is custom method created in AM implementation class. This method is calling ADF BC API getRow(key) method. Nothing dangerous at first, but here I'm using a key of the last record from the rowset - 10099. You may think, this is just a method to get a row by key.
Yes true, but what it does for you - before
returning one row by key, it will fetch all rows until this row into
memory. It travels through each row one by one, until it gets a row with
defined key. This may consume a lot of memory, especially if rowset is
large and row with defined key is somewhere at the end of the rowset.
Example of such method. Read the complete article here.
For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.