Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Transactions in swing  RSS feed

 
johny sill
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,

How to maintain transaction management in swing application,

i have a problem when save the the transaction,

when the two users save the transaction at same time ,only one transaction is committed ,other one generate an error

please tell me,

Thanks in advance,
johny
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What kind of transactions are you talking about? JDBC?
 
johny sill
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes i taking alout jdbc
 
Rob Spoor
Sheriff
Posts: 21047
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then it doesn't matter that it's in Swing, it's a JDBC problem. Off we go!
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37180
515
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by johny sill:
when the two users save the transaction at same time ,only one transaction is committed ,other one generate an error

This is how transactions work. What would you like to happen?
 
Scott Selikoff
author
Bartender
Posts: 4087
21
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi johny, what error are you seeing? If they are both modifying the same data its possible you'd see a concurrent access error. Could you post a short stack trace showing the error message?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!