Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB 2.1 and 3.0 in the same application  RSS feed

 
Ismael Upright
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Suppose that you have a ready legacy application written with EJB 2.1. Your task is to write an additional module for this application, but you want to do this in EJB 3.0.

Is it possible to do that?


Additional question: is it possible to change EJB 2.1 libraries to EJB 3.0 libraries and make the project written in EJB 2.1 still working?
 
Travis Dixon
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am attempting a similar thing.

According to the ejb3 simplified spec ejb2 clients should be able to access ejb3 components using the old ejb2 access method.

looking at http://www.jboss.org/file-access/default/members/jbossejb3/freezone/docs/tutorial/1.0.8/html/EJB2.1_and_EJB3_references.html it appears that you need to have the ejb-ref specified in your ejb-jar.xml which still needs to be an ejb 2 doc-type.

I still haven't had any ejb3 love yet. I'm running on WAS 6.1 with the ejb3 feature pack installed and patched. When I start my app at the moment it's complaining about the old ejb binding names being ambiguous. I suspect it's trying to treat them as ejb3's now instead of ejb2's, which is not desirable (I want to slowly convert my ejb2's to ejb3's not big bang).

So far I've also discovered that I needed to update my web.xml's doctype, and I've discovered that there is a newer ejb3 doctype for applicaiton.xml but it's supposed to be optional, and I'm not sure whether that should be the old type, the new type or some sort of mix.

I'm pretty disappointed with my google fu on this one, I would have expected the conversion to be a fairly common task which would have lots of clearly written tutorials, this does not seem to be the case at all
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!