• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

whoo hooo - 145/155 thanks for the help

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was actually expecting 150+, but no complaints.
Took the written exam 3/1, recieved the results 3/5. Suprisingly quick.
Score: 145
General Considerations(maximum = 58): 55
Documentation(maximum = 20): 20
GUI(maximum = 24): 21
Server(maximum = 53): 49
 
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Congrats!!! Vin.
Tell us some tips. Give us guidance how to prepare ?
 
vin miller
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.
My primary references were the Java API and Sun's Java Tutorial.
I did a lot more than required to make the best of the experience, which might have negatively afftected my score.
Some of my bigger decisions:
Chose RMI
modified Data instead of extending it
modified the signatures of lock, unlock, and modify
implemented a lock queue and a timer for each lock
used security managers for rmi instead of java.policy
used a menubar and toolbar for GUI
Be sure to test rmi in network and http mode. I found that the jvm handles permissions for each differently.
Also, trim the number of seats request, i.e. '5 ', so it will pass validation. I forgot to do that.
 
Ranch Hand
Posts: 688
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Congrats Man!!!
 
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Congratulations!
BTW, what do you mean by "pass validation" Do they have some kind of automated tests?
Again Congratulations!
Skip
 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Congradulation vin !

It's a great Win !!!
Rgds,
Shan
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Vin,
since you have used RMI let me ask you this. Did you set up some webserver so that stub files are dynamically downloaded at runtime or did you just include the stub files and remote interface in the client's classpath. I was just planning to include them in the client's classpath.
Also can you elaborate a little what you mean by http mode
Thanks
Deb
[This message has been edited by Debajyoti Pathak (edited March 07, 2001).]
 
vin miller
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Skip -
By validation I mean having the GUI validate the input before it is processed. Not required, but a good idea.
Deb -
I designed my server to be used through a LAN connection, using a LAN address for the codebase i.e. //host/ . I also have an apache web server running on NT and one on Linux. I decided to test my server by using a http://host/ codebase. Stub was dynamically downloaded in both cases. For some reason, the permissions in my security manager were not enough when using a http codebase - access was denied to the class loader. I had to include a policy file in my distribution incase Sun tested in both modes. SocketPermission for port 80 in the policy file took care of it, although that permission was already in my security manager. weird.
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Congrats vin!
1) How did you handle Local and Network mode?
2) How did you DatabaseException and Remote Exceptions?

joey
 
Debajyoti Pathak
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Vin. Enjoy your success!!
 
vin miller
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
joey,
I used an adapter class to instantiate either Data (local) or the RMI client.
Where appropriate, I passed DatabaseException all the way to the GUI to notify the user. I handled all remote exceptions in the RMI client, and threw new exceptions when necessary.
 
joey phillip
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Vin,
Thanks for your answer!!!
In my design, I have Remote interface (DataBase) and remote server (RemoteServer) which implements all the Database interface method by simply calling Data class methods directly.
My Data client has two constructors, one creates a instance of the DataBase interface without calling lookup, and the another constructor use lookup to create the DataBase instance.
So I am using the same interface(Remote interface - Database)
for both local and network mode.is this a proper design.

Also in this design i am confused where should i keep the DataBase interface since i am using the same interface for both modes.
I will really appreciate your help

joey

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Vin,
I have an elementary question on lock/unlock.
As almost all methods in the Data class are synchronized, calling any of these synchronized method would put a lock on the Data instance. The lock would be released once the synchronized method has returned(which is equivalent to unlock). Then why use the methods lock() and unlock() specifically. And even if one uses lock() and unlock() what kind of coding will be written.
Further, say, lock() has been written. What is the need of unlock(). I suppose, once the code of lock() has executed the instance is automatically gets unlocked.
I fear I am missing something. Please explain in as much detail as possible.
TIA in advance.
 
vin miller
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Joey -
My design was somewhat similar. I kept my interface with my rmi code because that's where it seemd appropriate to me. However, you can put it anywhere you want so long as it is accessible at compile time.
Dhirendra -
One reason you would need lock and unlock is if the actual locking occurs in a separate class. Also, if you were to rely on synchronization, I think it would lock the entire databse instead of just one record, causing all other requests to wait - even if they are going after a different record.
I think the whole idea behind this record locking is to allow the client to make transactions. To support this, a lock would have to exist long enough for the client to do what it has to. Since the server cannot determine this, it is left up to the client to call unlock when it is done. Although I don't think it's necessary for the scope of this assignment, I used a timer to get rid of a lock if the client didn't.
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vin,
I am almost done with my assignment and working on the final documentation. In what format are we supposed to provide our user documentation. Is it html or plain text file.
Also, are we supposed to put screen image and all.

Could you offer your suggestions.
thanks
 
vin miller
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ajit,
I used ascii text format for the readme, gui doc, server doc, and design doc. The only documentation that I was in any other format was the javadoc.
 
Ajit Kumar
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Vin
reply
    Bookmark Topic Watch Topic
  • New Topic