This week's book giveaway is in the Testing forum. We're giving away four copies of Data Structures the Fun Way: An Amusing Adventure with Coffee-Filled Examples and have Jeremy Kubica on-line! See this thread for details.
Thanks for all the help here on this site. I took the written exam on June 26th, so it took exactly three weeks to get my results. I read somewhere that alot of Sun people were on vacation the week of July 4th, so I think that explains the delay. Test: Sun Certified Developer for the Java 2 Platform (310-027) Date Taken: 2001-07-17 08:31:49.920 Grade: P Score: 137 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): 50 Documentation(maximum = 20): 20 GUI(maximum = 24): 21 Server(maximum = 53): 46
CONGRATULATIONS!! I have a doubt on how to execute jar files. Using java commands to start server, we define the codebase and policy files using -D option, how can we set these properties in executable jar files? In all the posts, I see the commands java -jar server.jar, nobody mentioned these -D options. Can you please tell me how to do this? Thanks.
Luna - I required the tester to extract the files and not run directly from the jar file. So I didn't have to know that. Adithya - I included the original jar file from Sun in my main jar file. I put instructions for both windows and unix in my README.txt file. I did not have any Unix machine to test on, so I am not even really sure if they were entirely correct.
Design choices: I used RMI. I did not track the client id or modify the lock unlock signatures. I used a syncronized HashMap to hold the locks. Each lock consisted of the record number and the time the lock should timeout. I used a TimerTask object to periodically clean up any stale locks. I provided the stub file on the client side and did not use activation or automatic downloading. My GUI used the CardLayout and my screens were "wizard" style. My screens were (1) Startup (2) Select airports (3) Show matching flights and allow for number of seats selection (4) Display thank you for a sucessful booking. My client only required the policy file on startup. All other parameters were asked in a window when the app starts. My thoughts were that the client.jar file could be distributed as a standalone application, never requiring a server. So for that reason I included a copy of the db in both the client and the server jar files.
Emmanuel - Javadoc is a requirement. Here is how I ran it:
The link parameter allows all of the links to be generated for classes in the standard JDK. I did not use the -private option to show the private variables and classes. My packages.txt file had a list of all my classes:
Some classes were in packages, others were not. The ones that are .java are not in a package.
Jayakumar - I just got back from my company's mid-year review and there is a big demand for java developers with J2EE experience, so I think that I will be going for SCEA next. Kalyani - I had separate client and server jar files contained in my main jar file. Here were my intentions: the client and server jar files are used for installation only. So they do not contain any source files or documentation, only the files to run them. So if there were any shared classes, they were placed in both jar files. And since the client COULD run as a standalone application, I placed the db.db file in BOTH jars. The main jar file contained all source code and documentation for the entire project as well as the client.jar and server.jar. I did not make the jar files executabls. My instructions required the tester to extract them first. I also copied the stub classes to the client.jar and did not provide any method or instructions for auto downloading of the stub class.
My GUI used the CardLayout and my screens were "wizard" style. My screens were (1) Startup (2) Select airports (3) Show matching flights and allow for number of seats selection (4) Display thank you for a sucessful booking. On page 3 I displayed my JTable and a listbox for number of seats selection (1-20 seats). I did not want to write any validation routines so I didn't use any text boxes on any form. The buttons on each page: 1)connect 2)search flights 3)search again, book flight 4)new search. Try to make the lock the shortest time amount possible. Do not lock the record unless you are modifying the record immediately. This would cause other clients to hang. My FlightServices class provided a BookFlight() method which followed the 1)lock 2)read 3)modify 4)unlock pattern. So with a decent connection to the server, this sequence should occur in less than a second. [This message has been edited by Rick Fortier (edited July 18, 2001).]
Timer - I tested with a timer of 20 seconds. And I had some nonGui test clients I used to hit the server repeatedly. Then I create a rogue applications which did only a lock and then died, and watched to make sure that my TimerTask logic worked properly. I made the value available for change at runtime using an OPTIONAL parameter. -Dsuncertify.FBNServer.FBNServer.LockTimeout=20. Since all of my testing was on a local LAN, 20 seconds is adequate. If I moved it to the internet, then a longer time would be warranted. IDE - I only used TextPad editor and batch files to compile. I had batch files to compile to source, to create the javadoc and to build the jar files. During the last couple of days before I uploaded, I had a master batch file which would call all of them in order so that if I made a change to a class, then all of the documentation would get updated and then the new class would get updated in the jar files too.
arvindpopli , Welcome to javaranch. PROPER NAMES ARE NOW REQUIRED Please look carefully at official naming policy at javaranch & reregister yourself with proper first & last name. Please adhere to official naming policy & help maintain the decorum of the forum. Waiting for your posts with proper first & last name. Once you have reregister , please let us know about that & then your previous account will be disabled. Regards.
hello hope you remember me couple of doubts 1.how did you implement timeout.(By timeout i mean wheather you went for network connection timeout or lock/unlock time out) (kindly explain the way you used your timeout technique). 2.which look and feel are we suppose to use in our project thanks in advance if possible mail me at given id. Pooja vij email at:email@example.com
Timeout - I did not do anything about the user's connection timing out. Maybe I should, but when the connection dies, wouldn't RMI kill the thread and any resources it was using? I implemented my timeout in the lock mechanism. When I inserted the lock into my HashMap I inserted the record number and a time in the future when the lock would expire (so many seconds from 1970). I used a TimerTask object to wake up periodically and look for any locks which had expired before the current time and I would remove them. Look and feel - There are no specific requirements other than using Swing and the JTable (I used AbstractTableModel). I think I used the Metal L&F. Some people put all of the functionality on one page. I chose to use a "wizard" style l&f. I implemented this using the CardLayout and then each card used the GridBagLayout. I had 4 pages 1) ask for connection information 2) ask for cities 3) select flight and num of seats 4) display booking confirmation message (and then OK on #4 went to #2)
Congrats , i am into java from last 1 year .After learning java i want to do a project in java . Since u have cleared the java Developer Exam can u fwd ur project to me so that i can also do the project and gain some valuable exp , which would be very hand for me in future . Hoping for a positive response . My Mail id is firstname.lastname@example.org