• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Submitting this weekend: Comments Please

 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all!
I am planning on submitting my assignment this weekend, and would enjoy any comments y'all might have.
I decided to modify the existing Data class since it did not require any changes that were specific to the FBN application. I wrote a generic search function criteriaFind() within this Data class, and left lock() and unlock() as NOP's since I use a seperate LockManager class. (hence there was no need to subclass)
A DBConnection interface provides client access to the Data class, and as per the requirements it contains all the public methods of the Data class. This DBConnection interface is implemented by two classes, LocalDBConnectionImpl and RemoteDBConnectionImpl; which act as Data Access Objects (DAO). Each DAO contains a reference to a Data class, a LockManager class, and the client that is using the connection. The DAO delegates each method call to the appropriate class. The DBConnection interface acts as a Facade since it hides the Local vs. Remote network complexity.
Clients retrieve DBConnections via a DBConnectionFactory, which either creates and returns a local DBConnection, or connects to the RMI registry to access the DBConnectionManager, which hands out Remote DBConnections to the caller. The DBConnectionManager returns a DBConnection to each caller, and assigns the DBConnection a unique Client object, such that the DAO can notify the LockManager which client is locking the record.
The LockManager uses a simple HashSet to store the locked records, along with the client who locked it. The client ID is retreived from the DBConnection object, which has a reference to the client who created it (initialized by the DBConnectionManager).
The client UI is all written in Swing, and accesses the DAO via a buisness deleagte class. This class handles the locking, unlocking, and other low level DB functions, and surfaces a clean interface to the UI classes. This Business Delegate also wrappers the returned DataInfo objects into FlightInfo Value Objects (VO). The FlightInfo VO provides nice methods like getFlightOrigin(), etc, thereby allowing the client to be agnostic of the underlying DB structure.
The client UI has some very simple online help to assist the user.
I have a README.txt file that contains:

And a DESIGN_CHOICES.txt file that contains:

I have gone through every class and documented it using javadoc style comments, and generated the javadoc html files.
I created a TestSuite class that launches hundreds of client Threads to test the concurrency of the database; everything seems fine, even when using multiple JVM's.
I think I am ready to submit this bad boy!
Any comments?
I look forward to joining the ranks of the SCJD community
--Dave.
 
Ranch Hand
Posts: 3404
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You seem to have been really thorough. Can't see anything wrong. Are you prepared for the essay exam ? Can you justify your design choices ?
You haven't specifically mentioned the Model-View-Controller pattern in your GUI design .
Good luck .
 
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


java -classpath $ROOT\lib\client.jar;$ROOT\lib\server.jar suncertify.ui.FlyByNightClient


Thi seems a bit convoluted to me. If you already have client.jar and server.jar, why not start your client this way:
java -jar client.jar
Eugene.
 
Yeah, but how did the squirrel get in there? Was it because of the tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic