I’m developping app using java, c3p0 for connection pooling and SQL Server 2005 for database.
My Question is, is there any method to block other connection when we do a transaction in database? For example, if we inserting a record to database, another connection who tried to inserting record on the same table will be waiting until the first is finished succesfully…
Thanks
You can set the isolation level of your connection for those transactions that require it; the most restrictive is SERIALIZABLE. You should not try to “block” other connections.