I only added the following method:

        public static void clearCache() {
                if (sequencesMap != null) {
                        sequencesMap.clear();
                }
        }

and called it when i destroy the tables, and everything
works fine now.

-----Message d'origine-----
De : Guillaume Nodet [mailto:[EMAIL PROTECTED]
Envoy� : vendredi 23 avril 2004 16:25
� : OJB Users List
Objet : Problem with sequence manager


Hi,

In my application, i can dynamically create and drop the tables
for storing ojb objects. The problem is that when i insert some
data, drop the tables, recreate them, and insert data, the sequence
manager is not re-initialized (i use SequenceManagerHighLowImpl)
so when inserting data in the newly created tables, the sequence
manager reuses caches sequences (in the sequencesMap), instead
of creating new ones. So when a sequence runs out of id, it looks
into the database, creates a new sequence and thus ids overlapp.

Could it be possible to add a method for clearing the cache of
sequences (stored in the sequencesMap attribute) ?

I will for the moment use my own sequence manager (a copy of
SequenceManagerHighLowImpl with the above method).

Thanks,

Guillaume

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to