This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
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.
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.
SCJP 5.0<br />SCJD working on it
Joined: Dec 01, 2005
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.
Joined: Sep 17, 2007
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 ]