Eric Li

Greenhorn
+ Follow
since Nov 06, 2001
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 Eric Li

Thanks! Mark. This helped me a lot and made me feel more comfortable to stick to my original plan. I just don't want my submission to be failed because of this classpath thing or just my way of packaging.
Eric
Congradulation! Mark! I have a question about packaging.
I plan to incude the classes for database and server_stub in the client.jar and include the classes for database in the server.jar. This way I don't need the classpath from the command line to avoid the environment setup. In your opinion, do you think this is acceptable to this assignment? And what's your packaging strategy? Thanks in advance!
Eric
Congradulations! Gennady! This is a great score!
I have 2 questions:
4. When my server initializes it creates an instance of RMIConnection correctly initialized with Data settings. When a client first connects to the server it clones this RMIConnection and returns a reference of the clone to the remote client.
So every client has its own server side object, similar to HTTPSession in servlets.
--------------------------------------------------------
Q1: If each client has its own RMIConnection, then there is no need to use clientID for DGC since each RMIConnection will be unreferenced automatically when the client disconnects. It's also unnecessary to use clientID to maitain the locks for each RMIConnection in a lock manager. Lock manager is not needed in this case because each RMIConnection knows what locks it has and thus will not unlock the record it doesn't have a lock on. This is my implementation. What about your implementation around this lock/unlock and clientID and DGC.
Q2: What's your choice of modifying vs. Extending the Data class and why?
Thanks! Your help will be greatly appreciated!
Eric
Two questions are confusing me:
1. The remote client code that you write must provide all the public methods of the suncertify.db.Data class.
My understanding is for the local mode, the client will definitely implement all the public methods of suncertify.db.Data. But is this what this remote client refers to?
In network mode, the client will just make the connection with the rmi server and get a server handle and whenever client wants to do something with db on the server side, it just call the server method through the handle. Why should the remote client need to implement all the public methods of Data class? Why should the remote client care since the server already does this for him?
2.
Writing Data Client
To connect with your server, you should create a client program. This implementation should include a class that implements the same public methods as the suncertify.db.Data class, although it will need different constructors to allow it to support the network configuration.
This talks about the same as implementing all the public methods as the Data class. I guess the remote client is probably the same as Data client. But I still don't get it why client needs to implement all the public methods as in Data class in remote mode. I understand the client needs to do that in local mode.
Could somebody have the same kind of questions and somebody else have different thought? Any comments are appreciated!

You can use just one single TableModel for this assignment. Whenever you want to refresh JTable with new table values, you pass them to a method in your TableModel. Inside that method, you will change the TableModel's values to the new table values. Right after this, call the fireTableChanged(new TableModelEvent(this)). This should do it.
Mine doesn't require to change connection on the fly either. Client can stick with one mode. Thanks!
How do you handle the client's choice of local vs. network, through command line or through the GUI such as JOptionPane? The reason I am asking this is that it looks like the client can have only limited command parameters such as DNS name, port no. etc., and no other command parameters are allowed. But I think to give the client choice is really a good idea and the doc doesn't say this choice has to be made from GUI.