mike acre

Ranch Hand
+ Follow
since Sep 23, 2003
Merit badge: grant badges
For More
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 mike acre

Originally posted by Inuka Vincit:
... or call the TableChanged method of the Jtable if your data in the table is stored some other way.

No, this is called by the Swing code after a table change the only way you should use this is if you extend JTable and override it. Though this is definitely not a good approach.
Despite my ignorance of this fact, it is perhaps a good idea to explicitly extend the length from a self documenting perspective.
Put it this way, it is very bad practice not to.
Yes, throw a general exception and chain the specific exception within it.
You can do the same with RemoteExceptions by wrapping the Remote object in an adapter client side and extracting the RemoteException and rethrowing a general 'transport' exception.

Originally posted by Anton Golovin:

Hi, Yanxin.

I do think the mystery of 44/80 has been solved: it is given when someone does not check for record still existing after the waiting to unlock - in the lock method.

With all due respect, I think missing this aspect is almost unforgivable.
The signature of most if not all lock methods throws RecordNotFoundException. You only have to have a quick think for the reasons not found and cover those bases.

Originally posted by Steve Taiwan:
Dear Zhou.

I am in thin client camp.
As a j2ee designer, i think 3 tier makes more sense, dosne't it?
If I fail due to 3 thier, I will feel disappointed at sun very much.

You won't - guaranteed.
I wanted to make a few of my classes package private, but decided against it. All my top level classes/interfaces were public because of the must requirement: 'You must provide Javadocs for all classes'. Since it is usual to provide only public/protected Javadocs this swung it for me.

Starter : Runner is customary
Yes that is quite possible, but most of us don't care.
What is important is that when it comes to acting on information provided by a read - ie booking a record or whatever your assignment does during an update, then the checks are made to make sure the record is as expected.

If you just want the latest version of records then you do a new search.
There is no way round this since the results will always be out of date the instant you obtain them.

However, rereading what you put, you should also ensure that all seek followed by read operations are synchronised (ie atomic).
You seem to be missing something fundamental.

You must lock the record as the very first thing you do in lock().
Otherwise someone else may grab the lock and change the record.
It does not matter if the record is valid or not, you only have a number or two in a Collection to represent the record, it does not matter if that record is invalid. What does matter is that the record is locked while you make your checks.

Any other approach will be over synchronised.

The code I have seen posted is unnecessarily complex.

Ignore me if you will, since I only got 44/80 for locking myself, but I am quite sure of this aspect, I have noted where I think I made an oversight.
Method 2 Pro: You can call it when throwing an exception would not be exceptional behaviour.

In my case this made it the reason to go for method 2

Originally posted by Anton Golovin:
This thread should be very useful to current test-takers: we have located the common mistake about the locking mechanism. It is in the lock method and comes after the record to lock comes unlocked and is available for locking. Then, before locking, one should check if the record still exists, as the previous thread might have deleted it. Hope this helps people who have not turned their assignment in, and also those who failed but could pass with their locking getting more points.

Actually a better method is to lock the resource instantly on entry to the lock method whether it exists or not and catch exceptions to unlock if things aren't well.

Also I would advise against posting entire lock/unlock methods whether correct or not - this violates the well documented policies of the site.
It won't get you any extra credit.

Originally posted by Anton Golovin:
Mike, as someone who has concurrently did his assignment as you did yours, I offer my heartfelt congratulations on your successful completion of the certification.

How long did it take you to get it back? The reason I ask is that the assignment I submitted went to the assessor today, and I am trying to get a handle on the waiting


Thanks Anton.
It took pretty much the full 4 weeks after submission. But some get it back in a few days. Just keep checking, don't bother outside office hours, and don't forget the + 7 hrs over GMT. I checked mine yesterday at 18:00GMT and again at 21:00GMT when it appeared.
19 years ago

Originally posted by Robert Chisholm:
Do you have any idea why the General Considerations score is so low?

What was your choices.txt file like?

choices.txt was 5500 words long
split in to headings:

overall design, thin client design, rmi vs raw sockets, rmi network design, exception handleing, database search impl, transfer object design,
property config, database tier design, cacheing, Various exception choices eg IOException, record locking, validation, GUI design, business behaviours.
19 years ago