1) Interfaces: To define a bean, you had to declare a Local
interface and a Remote
interface (if you were writting bean MyEJB
, they had to be MyEJBLocal
and MyEJBRemote
; MyEJB
would implement both). With that, the compiler generated some derived class implementing the methods, such methods would just connect to the EJB server to retrieve a bean and execute its methods.
I am not so sure about 2, since we had so many performance issues that we ended implementing JDBC logic in the Session beans (I know, I know)...