I found a soulution for Oracle, it look's like in Oracle the temporary tables are global, but the data is per session. So when I generate my schema I create from the beginning the two temporary tables and never drop them. This works because if thread's come from different session, the temporary tables are there and since the data is per session, they cannot see or delete another thread's data. One more thing, after a session to the temporary tables was closed the data in the temporary table for that session is deleted to limit the increase of the temp table size.
Thanks! Hope it helps! ________________________________ From: Damian Steer <[email protected]> To: neo21 zerro <[email protected]> Sent: Wednesday, July 27, 2011 10:07 PM Subject: Re: Oracle temporary table. On 27 Jul 2011, at 11:39, neo21 zerro wrote: > > Hello Damian, > > > Thank you very much for your help. > The problem is that I get the error: name is already being used by >existing object, and I presume that > this is because in the class TubleLoaderBase the method ensureTempTables1, > give's the error. I'm accessing it from a multithreaded context, > so I presume this could happen : > Thread 1: drop's the temporary tables > Thread 2: create's the temporary table > Thread 1: create's the temporary table (assiuming that the tables were >droped) - here is where the error appear's > Could you provide some simplified code to show how you are working with SDB? Are you sharing an sdb store between threads, or using distinct sdb stores? Damian
