we have two applications A1 & A2 both are accesing the same
databse table employee at the same time how we will manage
this so that both application can get the correct no of
emloyee while A1 is inserting a employee at the same time
while other applicatuion is getting the empployee list.
Answers were Sorted based on User's Feedback
Answer / krish
By implementing the class with SingleTheeadModel interface.
(Or) by writing the separate synchronized methods for insert
and retrieve methods. (or)by avoiding to declare Connection
object as instance variable.
| Is This Answer Correct ? | 14 Yes | 0 No |
Answer / abdul
This can be done thru JDBC isolation properties., there
were some ISOLATION LEVEL where you can achive this.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / shaik baji
If it is a simple and small application synchronize the
Connection object other wise set the lock on the respective
table.
| Is This Answer Correct ? | 4 Yes | 2 No |
Answer / aravind
I hope version checking concept will help you in this case.
| Is This Answer Correct ? | 2 Yes | 8 No |
What is the flow of requests in struts based applications?
What is http forward?
Which components are available using actioncontext map?
How interceptor works in struts 2?
Why is action servlet a singleton in struts?
What are the struts2 error message keys that can come during file uploading process?
Which tag is used to declare constants in struts xml?
what are tiles in struts?
Can we have multiple struts-config files in a single web app? If yes why should we have them? Will multiple copies make any impact on performance?
What is the purpose of @urlvalidator annotation?
Name some useful annotations introduced in Struts2?
What is form bean in struts?