Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Kent Hamilton   on Dec 02 In Java Category.

  
Question Answered By: Maria Miller   on Dec 02

Another Problem:
you shouldn't expose xxxxxImp classes remotely.
you probably have something like this:
public interface BankManager{
public void deduct(int account_id,int amount);
}

public class BankManagerImp implements BankManager{
public void deduct(int account_id,int amount){
// some implementation code
}
}

u usually want to expose the interface(BankManager) on rmi  and not
BankManagerImp.
the imp class does stuff like talking to DB(hibernate, jdbc, jpa,etc) and should
run on the container...
implementing serializable will make the first error go away, but u'll probably
run into other problems.

Share: