commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick.Grim...@xtl.com
Subject Re: [beanutils] RowSetDynaClass
Date Thu, 11 Sep 2008 19:23:25 GMT
I'm running into a new issue that seems to be intermittent.  The process I
created selects data from tables in one database and inserts it into another
database.  At the beginning of my process, I initialize an array of
HarvestRowSetDynaClass (this is my custom class that extends RowSetDynaClass)
with an initial array length equivalent to the number of tables I need to
harvest in my source database.  The source database is constantly being updated
over the web.  The query to the first table returns 20000 records (not sure why
it's such a round number), but that changes as the database gets updated from
the web.  I create a new HarvestRowSetDynaClass object in my array for each
ResultSet.  Later in my process, I iterate through my array, get the rows from
each HarvestRowSetDynaClass object, then I iterate over it's DynaBeans to get
the data and insert it into my target database.  Every once in a while though,
my process gets through the 20000 records from the first HarvestRowSetDynaClass
object, moves on to the next one in the array and throws a NullPointerException.
This behaviour seems intermittent because the process runs fine at other times.

Could this be due to the garbage collector clearing my HarvestRowSetDynaClass
array before I have the chance to read from it again?  Would I be better off
storing my HarvestRowSetDynaClass objects in a list rather than just a simple
array?

Thanks,
Patrick



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message