What are the differences between EJB 1.1 and EJB 2.0?

Alessandro A. Garbagnati

There are many differences, all of them should give different type of advantages among the previous 1.1 version.

  • New CMP Model. It is based on a new contract called the abstract persistence schema, that will allow to the container to handle the persistence automatically at runtime.
  • EJB Query Language. It is a sql-based language that will allow the new persistence schema to implement and execute finder methods.
  • Local interfaces. These are beans that can be used locally, that means by the same Java Virtual Machines, so they do not requires to be wrapped like remote beans, and arguments between those interfaces are passed directly.
  • ejbHome methods. Entity beans can declare ejbHome methods that perform operations related to the EJB component but that are not specific to a bean instance.
  • Message Driven Beans (MDB). Is a completely new enterprise bean type, that is designed specifically to handle incoming JMS messages.
I hope I haven't forgotten anything...