Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!

Jeff Song

Greenhorn
+ Follow
since Nov 05, 2002
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 Jeff Song

My server has no GUI so is it need user document?
where to put it, in help menu or in a solo dir?
Which charsetname is right?
US-ASCII
OR UTF-8?
so use the new String(buffer, offset, description[i].getLength(), "UTF-8")
???
I think u should include the file with the filename.but the descriptions are not reqired.
Hi,All
I met a new problem. I create a thread which will repeatly run in the server to check if there is overtime locks on server. If there are such locks, this thread will release the lock and notifyAll().
BUT, In this scene, Client A locked record 1 but didn't unlock it and A crashed. Client B tried to lock record 1 but found the record had already locked by other so thread of Client B was wait(). AND NOW, the thread I mentioned before found there is a overtime lock(of record 1) and release the lock. BUT when this thread notifyAll(), it can not call the Thread of Client B from wait to run.
I have tried many way but found only notifyAll() from Remote(through RMI) can let the wait thread(from remote too) from wait to run. Thread on server can not notify the threads called by Client from remote.
Can somebody supplied a solution to resolve the problem of the perivous scene.
Thanks in advance!
Hi,Mark,
Thank you very much for your response. The question confused me for a bit long time. But I think I have found the answer now.
Thanks again!
Hi,All
What I want to ask is: If we attemp to book a flight which already be locked by another client.
What the current client GUI should look like? Standby or still active for other operations such as search or book another flight.
Is it not allow for GUI to freeze while the lock is work on?
In my way , my GUI will available for operation while the lock was blocked which means my client get the record control. But I wonder its right.
Hi all,
My business logic is in client-side and I code my book() method as sequence:
lock-read-modify-write-unlock
The business logic is in client so that both mode(local or client) use the same sequence. But I saw somebody said that it is not necessary to lock record in local mode.
So my question is: How to write business logic?
What I can think out is:
if(!localMode){
lock()
}
read();
modify();
write();
if(localMode){
db.close;
}else if(remoteMode){
unlock();
}
Am I write? How to seperate lock method between local mode and remote mode?
Thanks in advance!
Congratulation!!!
Can u introduce your design choice as usual
17 years ago
but in this case,the compiler would said the methods in interface DataClient don't throw RemoteException!
FBNDatabaseRemote only extends Remote and DataInterface, it has no any body,right?
but every remote method must declared to throw RemoteException. If the methods in DataInterface don't throw RemoteException, How can the FBNDatabaseImpl pass complier.
Oops!Thanks
But i didn't find the requirement in instruction.
It is only required in local mode only I understood.
Should I supply absulote path or relative path???
Hi,Jay
When I implement my assignment, I encounter a problem.
The DataClient interface has all public method of Data, and it DOESN'T throws RemoteException.
FBNDatabaseRemote extends Remote and DataClient,
but when code FBNDatabaseImpl, the compiler said the methods in interface DataClient don't throw RemoteException!!??
Do those methods in interface DataClient need to throw RemoteException?
Is tt possible to assign db path in parameter in the server-side?
or use the default db.db in suncertify.db package
Hi,Jay
I an still wondering how you write ur method content:

public int getRecordCount() {
data.getRecordCount;
}
OR
public int getRecordCount() {
//do nothing
}
Hi,Jay
But in this way, Wrapper just has a refrence of Data instance, but in the guide said, must include a class implement all the public method of Data Class.
You just have a interface with all the public method of Data, not a class IMPLEMENT all the public method. You must have your own reason of resolving this issue. Can u explain it to me?