Search code examples
javajakarta-eeejbejb-3.1ejb-2.x

EJB 2.1 Vs EJB 3.1


Just wanted to know can i directly run the code which EJB code (adhering to 2.1 specs) in a EJB 3.1 container of an application server?In an application server, are there different versions of the EJB container one adhering to EJB 3.1 specs and another to 2.1 specs.?

TIA.


Solution

  • EJB 3.1 container should support 2.1 applications out of the box. This is explained in EJB 3.1 specification with following words:

    Existing EJB 3.0 and earlier applications must be supported to run unchanged in EJB 3.1 containers. All EJB 3.1 implementations must support EJB 1.1, EJB 2.0, EJB 2.1, and EJB 3.0 deployment descriptors for applications writen to earlier versions of the Enterprise JavaBeans specfication.

    Of course there is always some differences (features/bugs/different ways to understand specification) in implementations