java ee - EJB 2.1 and EJB 3.1 components in the same application -
so migrating project written in ejb 2.1 ejb 3.1 in parts. start with, have picked 1 ejb , incorporating 3.1 changes in it, without touching other exisitng 2.1 beans. apart other ejb 3.1 changes, changed version of existing ejb-jar.xml version="3.1" without changing it, ejb 3.1 beans not binding.
however, after version has been changed 3.1, ejb beans written in 2.1 cannot looked , exception :
"javax.naming.namenotfoundexception: name "ejb/ejb/gov/michigan/access/business/services/abtransactionmanagedejblocalhome" not found in context "local:"".
is possible have both 2.1 & 3.1 components in application? if yes, configurations have make support it? have read lot of material online , tried lot of stuffs, nothing seems work.
the answer first question clear: yes, can use them within 1 application. have ourselves application quite years old , still has parts written in j2ee , newer ones in java ee, both within 1 ear file.
concerning exception, can't is, looks using wrong context lookup. sadly, container specific, maybe helps container specific documentation on how lookup. jboss you'll find example here.
Comments
Post a Comment