This week's book giveaway is in the Security forum.
We're giving away four copies of Penetration Testing Basics and have Ric Messier on-line!
See this thread for details.
Win a copy of Penetration Testing Basics this week in the Security forum!
    Bookmark Topic Watch Topic
  • New Topic

java.rmi.Remote and java.lang.Comparable

Jason Ferguson
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Report post to moderator
Okay, I'm using java.rmi.Remote and have created interfaces IAccount and ITransaction (with appropriate implementations).

However, the rule for any class implementing Remote is that all methods have to throw RemoteException. This means that the class cannot implement Comparable, because compareTo() in Comparable does not throw RemoteException.

What I'm trying to do is obtain an Account instance, which will contain a Collection of transactions. I'll then create my Transaction(s), then add it to the Collection, which I would like to be a TreeSet. I can't use a TreeSet if I can't implement Comparable.

Anyone have any ideas?
    Bookmark Topic Watch Topic
  • New Topic