resetting IDBroker?

Jonathan Purvis <[email protected]>
Newsgroups gmane.comp.jakarta.turbine.torque.user
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.