Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Please final review before submit

Posts: 5
  • Mark post as helpful
  • send pies
  • 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
Posts: 5
  • Mark post as helpful
  • send pies
  • 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.
An elephant? An actual elephant. Into the apartment. How is the floor still here. Hold this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic