Sun Certified Enterprise Architect (Part I)<br />Sun Certified Java Developer<br />Sun Certified Java Programmer
Sun Certified Enterprise Architect (Part I)<br />Sun Certified Java Developer<br />Sun Certified Java Programmer
Data: Implements DataInterface. Implements criteriaFind(), but not lock() and unlock().
I'm deciding on using a Client ID and looking a mechanism to get an unique identified of every connection.
Regards,<br />Seb<br /> <br />SCJP 1.4
What would be the more "elegant" or, just ......
Regards,<br />Seb<br /> <br />SCJP 1.4
Originally posted by Seb Mathe:
Isn't it said in your assignement that your Data class must implements the provided interface (which, in my assignment, declares the lock & unlock methods).
Originally posted by Seb Mathe:
It's an interesting question... Does your lock method return something like a cookie ?
Sun Certified Enterprise Architect (Part I)<br />Sun Certified Java Developer<br />Sun Certified Java Programmer
Originally posted by Seb Mathe:
I think an other solution would be to have 2 implementation of your Service interface : a local one and a remote one...
And if there a lot of redundant code between the 2 classes, you can have an abstract implementation too.
Sun Certified Enterprise Architect (Part I)<br />Sun Certified Java Developer<br />Sun Certified Java Programmer
Regards,<br />Seb<br /> <br />SCJP 1.4
Plus, what about making the FBNServices class abstract, include all service implemented...
Regards,<br />Seb<br /> <br />SCJP 1.4
Originally posted by Seb Mathe:
Concerning the Data class, take care that Sun seems to do automated tests on it -> if you leave the lock/unlock method empty, it may result an automatic failure. (Imagine they have a test wich call your Data lock method, then try to deleted the record lock previously... )
Please confirm that you have at least something like "Your data access class must be called "Data.java", must be in a package called "suncertify.db", and must implement the following interface:..."
If so, you'll have to deal with the client Id... (read "Data client" Id)
Sun Certified Enterprise Architect (Part I)<br />Sun Certified Java Developer<br />Sun Certified Java Programmer
Originally posted by Seb Mathe:
That's what I was thinking about... Plus : maintain the existence of an interface. (Your service consumer just needs to know the interface, no ?)
Sun Certified Enterprise Architect (Part I)<br />Sun Certified Java Developer<br />Sun Certified Java Programmer
Regards,<br />Seb<br /> <br />SCJP 1.4
The thing to remember here is that it is not your code that you need to worry about. Unlike the newer assignments, FBNS specifies that you have to code with the expectation of future enhancements. It is possible that some future enhancement by some other programmer might result in code that tries to unlock a record it has not locked - and your server must guard against this.The only requirement is "If an attempt is made to unlock a record that has not been locked by this connection, then no action is be taken". Since I call lock(),[book logic],unlock() in the client side I think it won't be necessary to track the connection, but I'm still analyzing this.
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
That's a very big dog. I think I want to go home now and hug this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|