Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Location of the LocalDataAccess and RemoteDataAccess classes

 
Amit Kr Kumar
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers
In which package should the LocalDataAccess and RemoteDataAccess classes should reside. I think FBNLocalDataAccess should remain in client package while FBNRemoteDataAccess should be in server package
Pls comment
Amit
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is an interesting question. In mine both of these where in the db package. But after much thought I think it should be otherwise. So maybe the Local should be in client and the Remote in the server package.
What does everyone else think?
Mark
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm curious to see what everyone thinks about this. Assuming the DataAccess item here is the interface with all the public methods of Data, I'd say put its derivatives in db. My server package (thusfar) is just the Factory and LockManager.
 
Eduard Jodas
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have:
- db:
Sun's classes + LockManager + other utility classes
- db.net:
My database server classes -> ConnectionFactory + Connection + launcher + other utils
- db.driver:
My database client classes -> DataAccess + DataAccessLocal + DataAccessRemote + utils
I like to keep the number of classes per package short
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I thought about this again last night, and I am back to them being in the db package. They are about db.
Mark
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Been noodling about this as well. Even the remote flavor of Data interface has little to do with the act of serving up something.
Do you think that the connection factory is the only resident of the server package?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes ConnectionFactory, and ConnectionFactoryEngine, the actual object that is registered in the registry. Oh and ServerGUI, if you have a GUI for the server. would be in the server package.
Mark
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, the implementations of Remote would be ConnectionFactory and RemoteDataAccess; and the extensions of UnicastRemoteObject would be ConnectionFactoryEngine and RemoteDataAccessImpl?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic