Appreciate your detailed reply.
Here i am actually talking about temporary tables - whose life time is typically the life time of the connection object.
"Two different client threads could access the same table through two different connections. ."
Theoretically, i suppose the above should not happen since each Connection object (each session) would have its own temp tables.
Every call to this method will try create/override the existing temp tables.
Won't the temp tables be dropped when the connection object is closed at the end of the method ?
Every call to this method will try create/override the existing temp tables.
Arent these temporary tables created in different sessions (connection objects) ?
As stated earlier the temp table gets created after the connection object - i.e scope is restricted to that of the life time of a connection object. Due to some reason we find multiple temp tables getting created after the request gets processed i.e control comes out of the method, which i feel shouldn't be happening considering that the connection object is closed within a finally block. The issue here is one of temp tables not getting dropped.
I hope i've been able to make the problem more explicit.