This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

RMI - How do i use the interface DB provided by sun  RSS feed

 
Derick Potgieter
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I`m done with my whole program for a local database side. I wrote
the program so that is uses a proxy class that will return or a local instance of the database or a remote instance via RMI.

The code should all be right. but..

The interface provided by sun does`nt throw RemoteException, so i cant use it in my DBImpl class.



DB is the interface class provided. this is the best solution i could come up with, but now in my DBImpl class i cant throw RemoteException on the methods i have to implement.

Does anyone have any ideas or is there another approuch to this??

Thanks a mil!!
Derick
 
Phil Harron
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Derik,

There are a lot of threads already on this subject. One idea seems to be creating a new interface, with exactly matches the methods in DBMain interface provided by Sun, and changing the method signatures to throw IO/Remote Exception. have a look here -here
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!