Roberto Perillo wrote:
Roel De Nijs wrote:You say you can only increase counter to 100. What happens with your program if you increase the counter to 500 or 1000? Giving us such information is much more important than the modified DataClassTest.
Agreed. For instance, do you run into a deadlock? That's weird, because that would (could) happen when running the program 100x as well.
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
Roel De Nijs wrote:First of all I'm not a Java black belt and that's completely not needed to pass this certification (even with full marks). When I started with this assignment I had no practical experience with threading and multi-threaded application (except for a few classes I wrote to pass the SCJP certification), but during the assignment I learnt a whole lot about this topic (also thanks to this forum). In the big Java world of multi-threading applications I'm still a greenhorn.
I'm sad to here someone in the family has deceased.
The purpose of this certification is (like I already indicated) is to proof you have the set of skills a true developer needs to have. I guess you have other expectations of help on this forum (asking your question and getting code that you can directly copy/paste into your application), but that's not how it works and certainly not in this forum (you can't simply share actual code snippets of your solution). So everybody on this forum (I'm not the only one) gives hints, tips, pointers,... and it's up to you to do something with the given advice.
I gave you a few posts back a route you could take for debugging your Data class with the help of Roberto's DataClassTest. You said you did some debugging, but did you do what I suggested?
Ixus See wrote:I suspect there is something to do with delete and update on record 1 over 1000 times each...
SCJA, OCPJP, OCMJD
Roel De Nijs wrote:That's weird and completely against my expectations. But we don't give up
Replace the startTests() method with this one:
This code will start 1000 threads, each thread will read record 1. You should be able to run that one without any problem. If this one throws the same exception, that would be
Ixus See wrote:i added System.gc() at the end of every function in DataClassTest
Ixus See wrote:If I increase to 3000, I will get out of memory: unable to create new native thread on the Main. I highly suspect this is due to the cache I am using to store all the records.. imaigne the amount of records there is..
Ixus See wrote:can someone explain to me the purpose or running delete1 and update1, both of them will throw RNFE at lock();
Ixus See wrote:which part of the instruction says I must use 1.6?
Roel De Nijs wrote:
Ixus See wrote:which part of the instruction says I must use 1.6?
Read the Target Platform and Execution section of your instructions.
Regarding your code (I had to remove it, because we try to prevent posts with actual code, even something as small and easy as the read-method): that looks just fine. No real comments on that one. So it's strange that you can't run the test with a counter of 100000. Maybe it's something related to Win7, I'll try to run my program on my laptop this evening and post back the results of this test.
Ixus See wrote:anyway Can i safely say that this problem is related to java/eclipse or whatsoever and has nothing to do with the assignment and my codes should be fine?
Water proof donuts! Eat them while reading this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|