Recieved the certificate yesterday. Didn't know I passed until I recieved the certificate because I never recieved an email and wasn't hawking the My Cert site. So I can't give a breakdown of the score but it turned out to be 147. Would like to thank Mark and this site for contributing to this success. I'll check back here for a few days to answer any questions for anyone who needs advice. Just to preempt any questions I'll supply a summary of my application: I built an MDI - not SDI interface - because I wanted to experience it. I made the Data Class a remote object and left it as such for the local class as well as the server side class. I did not extend the Data class as I did not see it appropriate since message signatures where not altered and the fact that anyone using this class should implement the locking/unlocking going forward. Think about it, if a current application does not use locking and future applications do database integrity will not be provided. Also, the new methods should be considered an enhancement that any existing application could use. I may have lost points on the interface because I didn't bother with much of the esthetics of tabbing with key strokes, ie, needed the mouse to put cursor in a field to recieve focus. Used RMI. The written exam is just a formality. I finished this in about 20 min. It is just a recap of the written documentation which you will provide in the readme.txt file. Platform was Solaris 8/intel. Provided a script which started the server and another which started the client - nothing fancy. No user id to lock the db - it's not needed - if you understand threading you will know this is true. Never actually tested this app across a network and never tested it on any other platform. You don't need to test on alternate platforms - that is why you state the platform on which you built. Don't waste your time. Don't waste your time on anything - unless you want to - on anything other than what the spec states. I will be pursuing the Architect certification sometime soon. Currently working with Application servers as these technologies are the future for any IT system whether it be web based or client/server. GG [ February 14, 2002: Message edited by: Gregory Garrison ] [ February 14, 2002: Message edited by: Gregory Garrison ] [ February 14, 2002: Message edited by: Gregory Garrison ]
Gregory Hearty Congratulations! So what's your next plan ? I had a question about the script. ----------------------------------------------- Provided a script which started the server and another which started the client - nothing fancy ------------------------------------------------- So, did you provide another script for the "Local mode" ? Regards Suchak Jani
Suchak - I edited this after your post so see above. No, my app allowed switching between DB's while in the interface. The engine starts from a script, bootstraps itself to the registry and is a remote object as well. It provides a method which accepts a db path and returns the Dataclass Interface/object. When a DB change is required a different path is supplied. To switch to local you just empty the variable which connects to your engine and initialize the db variable to your local db class. If you switch from local to remote you re-obtain a connection to rmi get the engine object, call the method to obtain a remote database object again. The specs don't require this. This is just the way it turned out. If you think about it, you don't need a script to start a local db session. The spec states that in local mode you should not have socket connections. You can always have a local session/instance variable connecting to the local db.
Anurag - as stated above, if you write the readme.txt file you are fine. The exact same questions that are asked for in the readme.txt are on the essay. Memorize what you have written for readme.txt and write it on the essay.
Suchak - If you really want to do something with this stuff you really need to be able to use application servers and portals - Websphere/WebLogic/JBoss, etc. This is the future of IT systems. From there the rest will come, Ie, servlets, jsp, beans, patterns, etc.
Duh - Must be this cold medicine I'm on! Here are the results: Grade: P Score: 147 Comment: This report shows the total points that could have been awarded in each section and the actual number of points you were awarded. This is provided to give you per-section feedback on your strengths. The maximum possible # of points is 155; the minimum to pass is 124. General Considerations(maximum = 58): 54 Documentation(maximum = 20): 20 GUI(maximum = 24): 20 Server(maximum = 53): 53 So, like I said above, I didn't implement any tabbing/focus features in the GUI. so this may explain the 54 on the GUI. I made the Essay short and sweet so this may explain the General Considerations. I'm happy to see that my Server implementation was accepted well.
No user id to lock the db - it's not needed - if you understand threading you will know this is true.
Hi Gregory, I kind of understand threading (but I guess not well enought ). When I was doing my testing, I was able top successfully unlock a record that I had not locked. Basically I created 6 threads that would book some seats on the same flight. I think started 3 of those threads and created a new object that called the lock method directly (since it was accessable in my Data client per Sun's specification). The new object was able to unlock a record that it had not locked. So, I ended up using the thread id (or whatever you call it) to keep track of things. Not sure if that is the best design, but it seems to be working okay and I don't have to change the signature of the methods. If you have any insight (or links) let me know. I've looked at threads, but I think I just need more experience using them. thanks, Dave.
Congratulations! That's a great score. I am on the verge of uploading my assignment and I have made many of the same choices as you so I am very encouraged. However, I ran into a problem with the registry while I was doing the final testing. My server code starts up a registry and everything worked fine, both local and remote, until I decide to put in a check to see if there is already a registry running on the machine. I figured I cannot assume that there will be none (or can I, do you think?). My check uses LocateRegistry.getRegistry(Registry.REGISTRY_PORT) to see if there is one before I actually create it. Since this always returns a stub even if there is no actual registry (documented buggy behaviour), I called the list() method on it to make sure that it is really there. If it is, I use it, if list throws exception I create my own. This seems to work, and I can "rebind" my server object to it. However, suddenly on the client side it says this object is not bound. It almost seems like the "outside" registry is somehow remote itself... or something like that. I'm not using dynamic class loading, I have included the stub classes on the client side. Have you (or anyone else out there) encountered this. I would really, really appreciate any help. Diane firstname.lastname@example.org
David - all locking should be done within the Data class. This provide encapsulation. You perform your locking by checking for a record number or -1 - the whole database - within the Data class. Thats what the lock/unlock methods are for. If you confine yourself to the Data class you will eventually figure out that you don't need id's. As once said around here, id's are the poor-man's locking scheme.
Diane - I think you OverKilled this aspect. First, if the registry is started then by putting a registry call in an initialization script won't have any affect on the engine being executed. A second instance initialization of a registry trying to load will simply print the usual garbage "registry already loaded" or something like that. Your script will then move onto loading the engine. I'm sure of this on Unix. I'm not sure if a Windowzz .bat file would halt but I'm sure there would be some way around it. Anyway, I did assume that there were no other registries running. I basically thought about what I would do if I were grading a project and my assumptions saved me a lot of time. I didn't even provide tabbing in my GUI. I figured I was well set with what I had built that some points off for tabbing wasn't a big issue. So don't get so hung-up on the little things. I figured that the worst case scenario is I would fail, fix the problems, pay the $ and try again. In the end, if you keep trying you'll eventually pass because they'll get tired of looking at your project. [ February 14, 2002: Message edited by: Gregory Garrison ]
hi, Gregory, thanks for the quick reply. yes, I think you're right...trying to anticipate a second registry is overkill. What I did finally was just set up the server so that it can create a registry on any port. The server has a GUI and the user is prompted to enter the port they want. The textField for this is intially set to 1099, but if there is a registry already started outside of the server process that is using this port, the user will get a JVM_bind error - I could find no way around this. So, in my README.txt I simple say to enter any free port greater than 1024 that is not already in use. It works, but hope they don't take points off. I'm working on Windows 2000, btw. Thanks again. Diane
Donald - Took the written on the 28th of Jan. Received the paper monday. It may have been posted online sooner. I just never looked. I was expecting an email but never received one. When did you take the written? [ February 14, 2002: Message edited by: Gregory Garrison ]
Congratulations Gregory. I see that you pass your db name over to to the server for remote data creation. Is that right? I mean are you doing something like remoteFactory.getConnection("c:\db.db")? Once again congratulations.
Never be satisfied with anything less than the best and you will surely pass the test...
Gregory, I am currently in the process of writing the user guide for the client and server. How much detail are we to provide in those guides? For the client user guide, did you just document how to search for flights and how to book a flight? What about the server? Just how to start and stop? Also, did you provide a directory in your submission with all of your compiled code and then also the server and client jar files? Thanks in advance, Todd
Mark Im my readme, I had what they wanted fromt he specs. List of all the files locations,and briegf description of the file, on the top I had directions for starting client in local and remote mode and server.
Mark, The link you provided didn't help me any. I did a search on user guide and found nothing of interest except discussions on JEditorPane. I am just trying to decide what to write for the "user documentation for the database server and the client gui". Did you write a separate HTML user manual for the client and database server, or does the spec just re-iterate the fact that we need to write in the README how to start and stop the server and client? Confused, Todd
MDI is multiple document interface. SDI is single document interface. Word is an MDI because you can have multiple word documents open at the same time. An SDI will only have the one screen open at a time or only the topmost screen can be used, until it is closed. Something like that As far as the user documentation, I did create an HTML page for both and created a menu option in the client and server to display the user documentation. You don't have to go to that extreme, you can create the two documents as text files. they describe how to use your system. Just like a user manual would. Mark
Originally posted by Gregory Garrison: No user id to lock the db - it's not needed - if you understand threading you will know this is true.
Hello all, this is a topic that has been vexing me, and I would appreciate any responses. I am using RMI to export Data object. From the client side, let's say I make 3 method calls: lock(3), modify(...), unlock(3). However, when I examine these requests from the server side, I find that each of the 3 remote method invocation was handled by a different thread even though they came from the same client. I noticed in the RMI spec that there's no guarantee that the same thread will handle all requests from a particular client. So if a lock request comes in on handler thread 1, and the unlock comes in on handler thread 3, the server has no way of telling whether its from the same client or not. Greg, are you saying that you weren't required to address this issue with RMI? I would appreciate any suggestions anyone might have.
Diane - Just realized that if you start a windows .bat file call with "start rmiregistry" it spawns a seperate thread, like a Unix script. So if the call fails the script will continue on to load the engine.
Rob i agree with u, i was also waiting for this discussion. Greg how did u achive this? Mark and Peter your comments will be appreciated on this topic. and if we need client ID how to get that without changing the signaturs of lock() and unlock(). I know there is unique VM id, but i'm not able to trap it in code. next option i see is session fundas.. let me know what u guyz say amit
Ok - Without trying to actually give away the answer, because it's really quite simple, if you track your record/db locking information in the Data class as a static variable all threads access the same variable/data - remember that from the SCJP exam? So by synchronizing on this variable all outside threads are blocked until the current thread releases. [ February 15, 2002: Message edited by: Gregory Garrison ]
Greg, I'm sure I speak for many people here that your insight and responses are greatly appreciated, and I don't want you to give anything away as that would degrade the meaningfulness of the certification. I understand completely what you mean by a static reference to a group of locks, and in fact, if one uses UnicastRemoteObject, I wonder if they even need to be designated static because a single instance is used to service all client requests, but I digress... If you have a moment, consider this scenario: a client X requests a lock on row 3. The handler thread synchronizes and wait()s. Now lets say that client X does all his modifications to row 3 and then calls unlock for row 3, which executes a notify() on that same lock object. Now presuming that lock, modify and unlock were called as 3 seperate function calls, RMI could very well have used 3 different handler threads to handle each method invocation. That means the thread calling wait() could be different from the thread calling notify(), resulting in an IllegalStateException or the like, even if all 3 method invocations came from the same client. Now this can be handled by encapsulating the lock() and unlock() in the modify() method, but then it seems like bad judgment to expose the lock() and unlock() methods in the remote interface, becasuse they can't be guaranteed to function correctly via RMI. As we say in my office, please tell me I'm smoking crack. Thanks, Rob
I think it's perfectly legal to include the lock and unlock methods in the remote interface. We are to expose the public methods of the Data class which is where lock() and unlock() are usually added. There's more to the story than that, but by using a UnicastRemoteObject not bound in the registry, you can guarantee the uniqueness of each client and handle the lock and unlock logic (part of it requiring client uniqueness) there. Just a thought. Todd Harney
sunglasses are a type of coolness prosthetic. Check out the sunglasses on this tiny ad:
a bit of art, as a gift, the permaculture playing cards