File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC transaction concurency

 
Bigwood Liu
Ranch Hand
Posts: 240
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 412
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
Bigwood Liu
Ranch Hand
Posts: 240
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 412
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 240
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Gaurav.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic