• 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

RemoteException Problem

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all my name is Ushie and i'm working on the B & S assignment.

In my assignment, the methods in the interface dont throw RemotException and when i implement my remote interface in my RMI server code i need to throw RemoteException. In the book i'm reading, i'm adviced not to throw any extra Exceptions not given in the interface. How do i goabout this?

Please can someone help me, is there a way to walk around this problem? Thanks so much in advance.
 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I too have the same assigment. I havent yet reached the stage of creating the remote object but the way I understand it is as follows/

You might need to create another interface, call it Service for eg.
and in this Service you might have your business methods for eg, book, searchexactname, searchexactlocation, searchnameandlocation,...etc to support your GUI features.
This service interface should extend remote and should be implemented by some class.

The service interface implementor should make use of DBAccess interface methods. So your remoteexceptions go in service interface.

This is just my simplistic understanding. I havent gone into the details yet. Others can provide more or correct me if I am wrong.
 
Eric Ushie
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mary, On face value, i think i found my solution in your response - i stand corrected only if someone else comes up with a point that makes your approach to contravene the assignment instructions, or a better approach, otherwise, you're the bomb!

thanks so much.
 
Mary John
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

recently had a thought on the reply that I posted here.
In the reply I gave I assumed that the "only" solution was a
so called "thin client". so here is what I gave previously.

GUI----> RMI------> Business Services---------> DBAccess-----> Data File

But the other solution was "fat client" as mentioned in the ever so
long "should lock methods be callable by client" .

GUI----> Business Services---> RMI---> RemoteDBAccess-->DBAccess-----Data File



I personally prefer the thin client solution. I have BS 2.2.1. There doesnt seem to much discussion these days on which to follow, because I guess both are equally acceptable(has its own pros, cons, and assignment instruction have statements here and there that seem to prefer both ways )

Denny's DVD book has the fat client solution, and some other posts
by Ken Krebs, Kaspar Thommen etc followed the thin client solution(which I
also prefer)

what have others done /doing recently for their assignment?
[ April 25, 2008: Message edited by: Mary John ]
 
Amateurs built google. Professionals built the titanic. We can't find the guy that built this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic