Ying Ren

Ranch Hand
+ Follow
since May 24, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ying Ren

I think most of time the MVC means the total GUI design not only the JTable. I create a view class, a controller class and the a set of data related class.
Ying Ren
scjd2
I knew RMI had the limit of clients. Out of limits will have some problems. In this assignment, we are not required to worry about the number of clients.
Ying Ren
scjd2,scjp2
I am not sure what you are asking. But I know both client and server will have datainfo class. So don't worry about that.
YING REN
It took me exactly two weeks after I took the essay exam.
21 years ago
I just want to thanks everyone here. I will be around here to answer the questions.
Test: Sun Certified Developer for the Java 2 Platform (310-027)
Date Taken: 2002-08-19 07:05:46.903
Registration Number: hf2dtt0854
Site: va11
Grade: P
Score: 148
Comment: This report shows the total points that could have been awarded in each section and the actual number of points you were awarded. This is provided to give you per-section feedback on your strengths. The maximum possible number of points is 155; the minimum to pass is 124. Section Summary Report: General Considerations: Maximum=58 Deductions=3 Actual=55 Documentation: Maximum=20 Deductions=2 Actual=18 GUI: Maximum=24 Deductions=2 Actual=22 Server: Maximum=53 Deductions=0 Actual=53 Total: Maximum=155 Deductions=7 Certification Score=148
21 years ago
Hi,
I had the same problems before. I solved it by deleting the old stub copy file in the client side then put the new copy one in the client side.
As i understand it will happen when the stub file is not the same as the one in server side.

YING REN
Hi,
I follow the popular solution, that you should create a lockmagager class in your server side. Since, the lock and unlock are only used in remote mode. And in your remote data class which should provide all the services that data class provides, you instance a new lockmanager class using this remote data class, thus, you can track the lock owner all the time.
YING REN
Hi,
I have finished the assignment. I found it is hard to explain how to set classpath both in windows and unix. So i decided to use executable jar file. But why it alway has the error:Fail to load main-Class manifest attribute from ...
How to solve the problem?
Another question,is there any specification about the final package name. should use the ID or whatever?
Thanks
Best
I use the HashMap for storing the record and the connection.
YING REN
I used to create a timer. But now I agree with someone else, you needn't use the timer. Because the instruction said "no time out in lock." So, I delete them.
YING REN
Hi,
I changed my mind. Now I use the Timer to handle the deadlock. Every connection will have 1 minutes if the deadlock happens.

YING REN
I try to use the Timer in my booking method. I am still confused at the definition:

A facility for threads to schedule tasks for future execution in a background thread


Is it means that the Timer is a seperate thread which will not influenced by the Exception thrown by the readRecord or modify(),and will not terminated? If so, I think it is no need to use thread in this method. Am I right?
Ying Ren
Hi, Mark
Thank you.
I think it is hard for me to deal with the dead during the lock, anyway, I will handle other dead situation.
try {
lock(rec);
booking.processBooking();
unlock(rec);
}
catch (Exception e) {
JOptionPane.showMessageDialog(null,"Sorry, your booking process is unsuccessful.\n"+
"The reason is: "+e.getMessage(),"Booking Error",JOptionPane.ERROR_MESSAGE);
}
finally {
lock.unlock(rec);
return booking.isSuccess();
}
I have another FlightBooking class to handle the booking and the LockManager for lock which uses the recordnumber and the RemoteDataAccess as argument.
How do you think?
ying Ren
I have not seen any requirement about deadlock. Do we need to deal with it?
Ying Ren
I have tracked a lot of thread here about the clientID. Why don't use the RemoteDataAccess directly? I think every client will produce the different RemoteDataAccess.
PS: I have ConnectFactory which will return the new RemoteDataAccess object for every client.
Ying Ren