This week's book giveaway is in the General Computing forum.
We're giving away four copies of Learning Regular Expressions and have Ben Forta on-line!
See this thread for details.
Win a copy of Learning Regular Expressions this week in the General Computing 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 ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

About Non-Networked Mode  RSS feed

 
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, everyone!
A friend of mine told me the great forum, so I come here! I got some problems and need some help. I try to use the following way to do my B&S assignment.




The above diagram belongs to local section. In order to return to clients the same connection object(either in local or in remote mode), the methods in DataInterface which are similar to those in DBMain throw RemoteException and RecordNotFoundException so that in the server side the RemoteData class could implement the DataInterface.

If I go in this way, would I break one of the rules in my instruction since I make the DataInterface throws RemoteException? The instruction states that Non-Networked mode must use the database and GUI from the networked form, but must not use the network server code at all.
I am not sure this solution is one of the simpler approaches cos it is a bit more complex.

Welcome any comments!
Regards, Alisa Cape
[ August 10, 2005: Message edited by: Ailsa Cape ]
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you are good here. I think the thing you would want to avoid is having a UI class that was using or extending a server side class which implemented UnicastRemoteObject (hope I got that right or I will be embarrassed!), because that object is going to be generating stubs, which do use networking code.
 
author and jackaroo
Marshal Commander
Posts: 12218
279
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ailsa,

Welcome to JavaRanch and this forum.

Like Lara, I think you should be fine with this.

Regards, Andrew
 
Ailsa Cape
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you,Lara and Andrew! You convinced me that my design is acceptable and confirmed my belief that I can go along this way.

Regards, Ailsa Cape
 
Ailsa Cape
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,Andrew

It seems happy along the way I'm going. I was suddenly stumped by a new question.

The update method in the interface of DataInterface can throw RecordNotFound and RemoteException. In the client side,

Even if the database is an instance of the class LocalData in runtime, the compiler forces me to report RemoteException when using "database.update();". It is easy to comply with the compiler's reminder,but do I break the requirement in my instructions,"Architectuarlly, the Non-Networked Mode must use the database and GUI from the networked form, but must not use the network server code at all"?

Thanks in advance!
Regards, Ailsa Cape
[ August 20, 2005: Message edited by: Ailsa Cape ]
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Posts: 12218
279
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ailsa,

I think you will be fine - your GUI may have exception handlers for network problems however they won't be used. Similarly you wont be starting your network server or trying to connect over the network.

Regards, Andrew
 
Ailsa Cape
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for so quick response! You answers are always helpful.

Regards, Ailsa Cape
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!