File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes JDBC transaction concurency Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC transaction concurency" Watch "JDBC transaction concurency" New topic
Author

JDBC transaction concurency

Bigwood Liu
Ranch Hand

Joined: Feb 26, 2003
Posts: 240
Hi all,

the transaction is set by connection:


In a connection pool, there are some connection instances. when we are doing a transction based on one connection, there are other clients access the database for the same data by using other connections.

My question is, in this case, if the transaction integrity can be gauranteed?
Gaurav Chikara
Ranch Hand

Joined: Jun 09, 2000
Posts: 410
We can define Transaction isolation levels for definfing transaction integrity .If that doesn't suits what you are looking then we can define locks on the schema objects based on the type of operaton requested (DDL/DML)


SCJP,SCWCD,SCBCD<br />If Opportunity doesn't knock then build the door
Bigwood Liu
Ranch Hand

Joined: Feb 26, 2003
Posts: 240
Thanks, Gaurav

I am just not sure about the isolation level. In fact it is part of my question. I think one connect can create multiple statements, so as I understand, the isolation is related to one connection so that when in multi-connection situation, the isolation setting is not functional.

Am I right?
Gaurav Chikara
Ranch Hand

Joined: Jun 09, 2000
Posts: 410
It is similar to semaphore concept. If one connection defines isolation level of SERIALIZABLE and then table will be exclusively locked by it and if another connection handle tries to define any other ISOLATION LEVEL.It may have to wait.
Application server gives us connection pool. And we define I don't think that we define a particular ISOLATION LEVEL for one connection handle and other for another as we don't seem to recognise connection handles as having some diff identity
Bigwood Liu
Ranch Hand

Joined: Feb 26, 2003
Posts: 240
Thanks, Gaurav.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC transaction concurency