michael opto

+ Follow
since Jan 17, 2002
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by michael opto

My goal is to import a huge text file(around 20Mb) into this JTextPane. I used the setPage() method and used the "file:///..."; protocal since that huge file is one my local machine. It is so slow to show this file in the JTextPane. Is there any way to make it fast?
16 years ago
Did anybody meet this kind of problem? When I tried to upload my assignment, I got the following information: "You do not have the rights to upload that assignment. Press the "Back" button on your browser and try another assignment. If you feel that you should have the ability to upload, please email us at who2contact@central.sun.com for assistance. "
What's wrong?
So if I meet an essay question about: does your GUI design use MVC pattern? I have to say no?
When I see the posts about MVC, I want to ask a question. I modified my table model, and called the table model's update methods to update the table. I am sure this is the MVC in swing. But I am not sure if this is the MVC you guys talked about the GUI design. Please help me on this.
Let me specify a little about my design. All the real work is handled at the server side. The client has no idea what the database is. The client only knows the DataServer which knows the Data that deals with the database. Do you mean that I need to change the Data class? But how?
If the client is in local mode, the DataServer object at the client side is actually a DataServerImpl instance. Although it implements Remote, since Remote is just an interface without any method, I assume there is little overhead. But is it a neat design or a complicated one? What do you think?
Could you take a look at my design? My design is very simple. No lock manager, no Facade. It works. But I don't know if I miss anything. Maybe need more work on the Server class.
//implements the lock, unlock, and search methods here
Server side:
DataRemote extends Remote{
//defines all the public methods in Data and other own-designed methods
DataRemoteImpl implements DataRemote{
//RMI implementation
//forword mothods to Data
//get the instance of DataRemoteImpl and export it;
//rebind it to the rmiregistry
//need anything else here?
Client side:
//invoke methods on DataServer returned by a Factory
I guess my thought is quite reasonable. Server needs administrator. Please help me think about any solution. My problem is that when I have my Server running, if I start a local client, it seems that this local client is using a different DataServerImpl object from that used by the remote client. So the locks are different too. Is there anything to do with RMI here?
Another thing is: can you tell me why we need singleton?
Thanks Sai. But what I am thinking about is that if an administrator wants to change the database on the server, he can start a client as a local client. He just needs to lock the whole database so that other remotely connected clients can't modify the database. And the remote clients don't need to be disconnected. In this case, the remote clients and the local client are working at the same time.
Did anybody's program can work both locally and remotely at the same time? It seemed that I have a problem with the lock method. If I lock a record through a remote client, I still can book tickets through the local client. I am using RMI and the local client just uses a instance of the remote interface implementation.
Thanks in advance!
I have a question about the stub returned by java.rmi.Naming.lookup(...). Let's say there is a object which hasn't been exported. Client A gets this unexported instance. Client B gets the exported instance through lookup method. Is there any difference between client A and B for using their object instances they got?
Thanks in advance.
18 years ago
Comment please! Thanks!
Thanks Mapraputa! Thanks everybody! Very clear!
18 years ago
Forget about it. I see now. I was thinking about something else. Sorry, please delete this post.