hao li

+ Follow
since Jul 24, 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 hao li

Can I start Activity/Service/BroadcastReceiver or make a bind call from one user to another user?
If so, how to do it?
4 years ago
St�phane Weber and Ronnie Phelps
St�phane give me a right answer.
Hi, Michael Morris,
Thanks, I did it. I like your design!
Thanks, Michael Morris and mark.
How do you know it is server call or client call?
make a flag or need a set parameter method for remote database?
the current active client request count is zero
This means that the client who close the database can still access the database if the count is not zero. unless we have a static set in the server to store all connected client...
too complicated?
I got an information from a book that We had better do not use volatile variable.
but it seems It is right place to use it.
Please see my code.
variable connectStatus is private static volatile byte .
in method getDatabase we try to get a remote databse for the client, I have code:
if (connectStatus == DISCONNETED){
throw new IOException("Server is stopped!");
return new RemoteServerImpl.....
I have A gui with stop server button. the first row of method actionPerformed in the button ActionListener is:
connectStatus = DISCONNETED;
What do you think about it?
Do you think I am right?
Since close is public method, If the client code
close the database by calling the method, the server database can not support the other clients.
For my code,I close the database in the server and I do not close database in the client. but method close is public method, do we need to do something on it for the client to close the database?
After I install SDK 1_3_1 or JDK_1_3_1, it seems
the command "java" works in DOS. We can use the command "java -jar server.jar" in DOS. Means that we don't need to use DOS command like:
Path = C:\jdk1.3.1_04; %PATH%
to set up environment
Am I right?
When I select test history in CertManager in
2000 and XP OS. the web tells me "your demographics must be updated" how can I download the software?
Since I want to upload my assignment.
The instruction says that:
1) but the submission that you return must have been tested and shown to work under a production (not development) version of the Sun Microsystems' Java 2 platform.
I tesed and worked on Java 2 platform. Do I need
any document to show it like the above words in the instruction "shown ...?
The instruction also says that:
Your user interface should be designed with the expectation of future functionality enhancements, and it should establish a control scheme that will support this with minimal disruption to the users when this occurs.
Need to say some thing like using layout GridBagLayout and command pattern? any thing else or it is enough?
Can I put images in user manual which is html file?
I try to use the following code
if (LocateRegistry.getRegistry(port) == null){ LocateRegistry.createRegistry(port);
in the server to replace start rmiregistry command. but it is failed.
How can I start my server without using rmiregistry? please help.
I try to use the following code
if (LocateRegistry.getRegistry(port) == null){LocateRegistry.createRegistry(port);
in the server to replace start rmiregistry command.
How can I start my server without use rmiregistry? please help.
Thank you for your replay,
You said:
No environmental setup at all
but before I run server, I should setup:
start rmiregistry
Is it right or this command can merge into code?
the instruction say that:
For example, do not say
something like "add server.jar to your classpath". You should document exactly how to add the jar file to the classpath.
But for my case,after I made client.jar and server.jar, I dont need to setup classpath.
all I need to do is that:
java -jar server.jar portNumber ...
java -jar client.jar ...
It works fine.
Am I wrong?
Thank you for your replay.