Joe Stewart

Greenhorn
+ Follow
since Dec 09, 2004
Merit badge: grant badges
For More
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 Joe Stewart

Andrew,

Thanks. I get the following error when compiling the test package:

joe@notebook:~/scjd/src> javac sampleproject/test/*.java
sampleproject/test/DBTester.java:50: getRemote(java.lang.String,java.lang.String) in sampleproject.remote.DvdConnector cannot be applied to ()
db = DvdConnector.getRemote();
^
1 error

Also, what is the link to the current errata list? The only link I could find on the book's page is to a submission form.
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
Andrew,

The starvation example in your book works different on my system (SuSe Linux 10.0). The starvation thread always runs, and in about forty trys, thread four never ran. Do you have any idea why?

It appears that my JVM runs the threads in order, almost every time, like so:

Starvation Thread: is working 10
Starvation Thread: is working 9
Starvation Thread: is working 8
Starvation Thread: is working 7
Starvation Thread: is working 6
Starvation Thread: is working 5
Starvation Thread: is working 4
Starvation Thread: is working 3
Starvation Thread: is working 2
Starvation Thread: is working 1
Thread-2: is working 10
Thread-2: is working 9
Thread-2: is working 8
Thread-2: is working 7
Thread-3: is working 10
Thread-3: is working 9
Thread-3: is working 8
Thread-3: is working 7
Thread-3: is working 6
Thread-3: is working 5
Thread-3: is working 4
Thread-3: is working 3
Thread-3: is working 2
Thread-3: is working 1

The thread priority seems to have no effect on the starvation thread.
Andrew,

The file NotifyVersusNotifyAll.java included in the source archive differs from the code in the book, and does not behave as shown in the book. I changed line 25 to mutex.wait(2000); and then it works as shown.

It's not clear to me from your earlier reply why the test code wasn't included in the source archive. Is the code as shown in the book, chapter 9, for DBTester.java and DBTestRunner.java complete and correct? If I take the time to type it up myself, will it compile and run properly?
Andrew, I also notice that the DennysDVDs2.0 test harness code is missing from the source code archive. The book states that is should be in the directory src/sampleproject/test, but the directory does not exist.
[ December 31, 2005: Message edited by: Joe Stewart ]
Andrew, the examples for your book don't compile with the files Server.java and RmiSocketExample.java.

Server.java gives a duplicate class error, and RmiSocketExample.java has numerous problems. Are these files just work product that you forgot to remove, or do you have a new RmiSocketExample.java?
[ December 31, 2005: Message edited by: Joe Stewart ]