We have an old project written with EJB 2.1. Now we need to extend the project with the new requirements. But i don’t want to use the old complicated EJB 2 again.
Is it possible to use EJB3.1/JPA in an existing project written with EJB 2.1.
P.S. Application Server is WebSphere
Yes, it is possible to reference EJB 3 from EJB 2. The older EJB applications can be deployed as is on EJB3.0 container since pre-EJB3.0 APIs are available in EJB3.0. Check these links out for detailed information:
http://www.coderanch.com/t/321218/EJB-JEE/java/EJB-call-EJB
https://community.jboss.org/wiki/ReferenceEJB3BeansFromEJB2Beans
A clean migration from EJB 2 to EJB 3 would be a better design choice though.