Subject | Database -Concurrency - question... |
---|---|
Author | Allysson Costa |
Post date | 2007-08-02T22:18:37Z |
Dear Friends,
I'm starting with programming(JAVA) e database(FIREBIRD) manipulation recently.
Then I have a system where one vacancy(class position at schools ) can be attributed to one student. Then I get one vacancy selected e press some buttons in my application that show sets of available students.
When one person works alone at application I have no problems. But when two or more people are selecting students to the selected vacancy occours a concurrency problem.
FIRST SITUATION:
The works(who are selecting) get the same vacancy selected and make attribution to distincts students. In this situation only the last student commited will be attributed. The works will have the false notion and one of students are not attributed to one vacancy yet.
SECOND SITUATION:
The works(who are selecting) get the distinct vacancies selected and make attribution to same student. In this situation the stundent will be attributed to one vacancy only. . The works will have the false notion and one vacancy are not attributed yet.
How can I solve this? Is there Firebird mechanisms to solve this?
Any help.
Thanks in advance.
Allysson
Alertas do Yahoo! Mail em seu celular. Saiba mais.
[Non-text portions of this message have been removed]
I'm starting with programming(JAVA) e database(FIREBIRD) manipulation recently.
Then I have a system where one vacancy(class position at schools ) can be attributed to one student. Then I get one vacancy selected e press some buttons in my application that show sets of available students.
When one person works alone at application I have no problems. But when two or more people are selecting students to the selected vacancy occours a concurrency problem.
FIRST SITUATION:
The works(who are selecting) get the same vacancy selected and make attribution to distincts students. In this situation only the last student commited will be attributed. The works will have the false notion and one of students are not attributed to one vacancy yet.
SECOND SITUATION:
The works(who are selecting) get the distinct vacancies selected and make attribution to same student. In this situation the stundent will be attributed to one vacancy only. . The works will have the false notion and one vacancy are not attributed yet.
How can I solve this? Is there Firebird mechanisms to solve this?
Any help.
Thanks in advance.
Allysson
Alertas do Yahoo! Mail em seu celular. Saiba mais.
[Non-text portions of this message have been removed]