This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Transactions in swing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Transactions in swing" Watch "Transactions in swing" New topic
Author

Transactions in swing

johny sill
Greenhorn

Joined: Jul 08, 2006
Posts: 27
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

Joined: Jul 11, 2001
Posts: 14112
What kind of transactions are you talking about? JDBC?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
johny sill
Greenhorn

Joined: Jul 08, 2006
Posts: 27
yes i taking alout jdbc
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19543
    
  16

Then it doesn't matter that it's in Swing, it's a JDBC problem. Off we go!


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29237
    
139

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?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3697
    
    5

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?


My Blog: Down Home Country Coding with Scott Selikoff
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Transactions in swing
 
Similar Threads
one-to-one mapping
Swing based J2EE application - Suggestions req.
update problem
One table Sequeunce key mapping into another table
session.flush(); gives null