I was wondering why do we need separate Remote and Local intefaces for EJB 3.0 Session beans. I guess most of the time they would both be defining the same contract. Why can
The notion of "location transparency" is a dangerous anti-pattern. Your design absolutely needs to know if it's making a local call or a remote call, for many reasons (error handling and performance being the most obvious).
Remote EJB interfaces are distinct from their local counterparts because the exception signature needs to be different to accomodate the networking-related errors that can only occur on a remote call. Saddling the remote-handling baggage to the Local interface (as was the case in EJB 1) makes the code horrible. EJB 2 introduced separate Local interfaces to simplify programming for EJBs that were always local.