Thanks a lot
Originally posted by Pep Menval:
Sun spec wants de lock/unlock methods to be public, right? so it means they have to be called from outside the class. And I do it so. But, isn't a nonsense to call them from everywhere instead of calling them, say, from modify' Data class?
Originally posted by Pep Menval:
About the lock(-1), when is it requiered. I call it before adding a new record and before shuting the server down, is that correct?
Originally posted by Pep Menval:
On the other hand, I have declared my HashSet holding locks as static, to be shared among every client, because they run in diferent VM, not just threads. Is that correct?
Originally posted by Pep Menval:
Besidesm the HashSet holds the record Integer as a key and this as the value. What do you think?
Originally posted by Pep Menval:
Finally, what about parameters passing to main. Do you feel it can count? My gui is pretty good and allows to open a remote/local connection at any time. But perhaps sun expects some paraments passing?
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Thanks a lot
The way I implementent my server was through a Factory serving NEW remote instances upon every request
should the HashMap be syncronized itself. I don't think so cause it is handled in a synchronized block
By the way, when resubmitting my assignment, do you know if I have to add a new text file explaining the changes I made, or just as usual?
By the way you made your last comment about parameter passing
Originally posted by Pep Menval:
By the way you made your last comment about parameter passing, seems to me that you have a class that can be run as server or as client according to command line paramenter. Is it so.
Originally posted by Pep Menval:
I have diferent classes, server and client. How do you find this aproach? In this case are command line arguments still recommended?
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |