shao zhimin

Greenhorn
+ Follow
since Aug 07, 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 shao zhimin

Thank all the members in this forum. i learn much knowledge from this forum. it is beautiful. Next, i prepare SCEA, i beleve this form is my knowledge library!!!
18 years ago
Thanks Gurpreet for your reply. Do you use GUI for server side? What logic to be implemented when you want to close the server?
I use unbind and rebind to stop and restart the server in my server GUI. but when i stop the server, i still can book and search operation without error and the remote database still running . How to stop the server? Is lock the database, or not? Please help me!!
I have some question at test my assignment:
1) i start the server, then start two client. i use one client to lock an record, and the other client lock the same record and wait,then i close the first client. Why the server-side not call the unreferenced method? (In the unreferenced method,i have print clause and some operation.)
2)In server-side, do i need to set an share lock? i consider when the client to read the record that is being modifyed by the other client, the message that is received by the first client is dirty data.
i planning to design an buffer area that mapping the database and the client to read it, not to directly read data in the db.db file. when each written-operation complete, it write back to the buffer-area. is right?? or not do it?
Samual :
the JEditorPane code and the document must be in the same directory, is right?? If them pack the different directory, how to do it??
Another Question:
i have three package: client, server, OnlineHelp.
i have an JEditorPane code in my client package and user document in the OnlineHelp package.
How to get URL in my JEditorPane code??
Thanks Michael for reply.
i check my code and find some error in
Naming.rebind(). my original code: Naming.rebind("Connection",connection); and modify:
Naming.rebind("//localhost ort/Connection",connection);
the program run well.
I use java.rmi.registry.LocateRegistry.createRegistry(int port) method in my server, but if the port is not 1099, i start server to get following error:
java.rmi.ConnectException: Connection refused to host:172.16.2.44;nested exception is:
java.net.ConnectException: Connection refused: connect
if i use the port "1099" ,the error is not throw.
why??
thanks Michanel, but now i consider that the ActionController extends ActionListener and all the user event are dealed in the controller. i have another question that how to distinguish the different event?? use getActionCommand() methods or the other method?
the reason what i to do that i look some posts in the forum and someone use one Controller, but i do not well it.
I,m writting my GUI, but doubt that the MVC pattern. now i design three panel -- searchingPanel, bookingPanel and JTable, i have a question that searchingPanel bookingPanel is View or controller??
now i have a ActionController (but not implements ActionListener). searchingPanel and bookingPanel implements ActionListener. when an user event occur, its call the methods of ActionController. is it rigtht?? i only one controller?
i use RMI Mechanism ,but i don't know what advantages of RMI is ,and how to write it?? help!!
If the sequence is "lock, read, modify, write, unlock", then one client is modifying the record,
however the other can read the record. Is right?
how to implements the lock ?
In SCJD Documents written:"Note that the locking required is effetively a "write" lock only." and "...the sequence lock, read, modify, write,unlock..."
What's meaning? Why not the sequence is "read, modify, lock, write, unlock"??? Do you implement this ??