• 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

Please final review before submit

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Finally, i lost my job and do have to time to focus my certification project.
After reads lots of posts in this form, i got 99% answers from this form. 1% for copy and paste.-

My FBN app has 4 packages, db, client, service and server.
In suncertify.db package:
public Interface DBInterface: It is the main interface which has all the public methods of Data.
public Interface DBRemoteInterface extends Remote, DBInterface.
public Class Data Add criteriaFind() method to data class.
public Class DBLocalImpl: This class wrap the Data and implements DBInterface.
public Class DBRemoteImpl: This class wrap the Data and implements DBRemoteInterface,Unreference
In suncertify.service package:
This package has two classes, ConnectionFactory and DataFacade.
public class DataFacade use facade pattern to get the data, it acts as the model role. After it get the data, it will notify all the register views to upate itself.(obsever and observable pattern)
public class ConnectionFactory use factory pattern to get the object reference depends on local or remote mode.
In suncertify.sever:
The factory will binding to registry, and factory will generate unique DBRemoteImpl object for rmic call.
And it aslo implements the unreference ,so it will clean up the dead or crush clients.
There aslo has LockManager to master the lock mechansiam. It is totally sepearte with FBN application. It can lock mutiple database.
To this part, especailly thanks to Mark, Max, Peter and Andrew and Enguenue etc, i get lots of idea regarding the locking.
In suncertify.client:
Contains views. the most important part is in the views there has the "hook" method for controller, thanks to mark again.
Any comments is appreciate.
 
Guo RedBean
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Add one more thing Error handling:

In general, i use chain Exception between these layers.
In the DB layer, it throws DatabaseException,IOException to its caller.
DBLocalImpl re throw these two Exception to its caller.
DBRemoteImpl catch DatabaseException,IOException and throw RemoteException.
In service layer, the DataFacade class catch these Exception and throw GUIException to controller.
In view layer, the controller only catch GUIException and display the message to the client.
So, the view tier only know GUIException, it don't know what happened at the back end. And the business tier know how to handle different exception.
 
reply
    Bookmark Topic Watch Topic
  • New Topic