db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Purvis <...@netvalue.net.nz>
Subject resetting IDBroker?
Date Wed, 24 Sep 2008 05:03:06 GMT
Hi,

As part of our unit tests for our application that uses Torque we have 
an H2 database that runs in memory.  Each test shutdowns down Torque, 
recreates the database from an SQL script and restarts Torque.  Even 
though the ID_TABLE is reset, the IDBroker still remembers the old 
values it had cached.  I solved this by adding these lines to the stop() 
method in IDBroker.java:

         ids.clear();
         quantityStore.clear();
         lastQueryTime.clear();

Is there a better way of doing this?


Regards,

	Jon

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


Mime
View raw message