EJB2 vs EJB3

EJB2

a. heavyweight programming model
b. direct use of the Java Naming Directory Interface (JNDI)
c. a verbose XML deployment descriptor.

EJB3

a. metadata annotations
b. dependency injection
c. minimal deployment descriptors, and .