hakish
hakish

Reputation: 4048

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.

Upvotes: 2

Views: 1412

Answers (2)

Mikko Maunu
Mikko Maunu

Reputation: 42074

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

Upvotes: 4

awsbz77
awsbz77

Reputation: 649

I believe you should be able to run EJB 2.1 code in EJB 3.1 containers. Most of the containers are backward compatible.

Upvotes: 1

Related Questions