Question

Is there a way to use ejb 2.x project as a jar into Java EE 6 project?

I am using Rational Application Developer as IDE. I can add ejb 2.x project as a Java EE Utility jar. And manually add a reference to application.xml after than when i deployed to server the ejb jar automatically started by server.

I want to create a new project compatible with Java EE 6 (without application.xml, without web.xml, using annotation). However I have to use ejb 2.x project as a jar. My question is that How I can accomplish this task.

Thank you in advance for your answers

Was it helpful?

Solution

You can use EJB 2.1 and 3.x in parallel, we also have that in an application which is quite some years old and still not completely migrated.

For the old parts, you still need the same setup with all the deployment descriptors, as @bkail pointed out.

But if possible, I would strongly recommend not to mix up things if you have the chance to create a modern JavaEE 6 based application. Better try to interface with the old parts which are still needed and keep it as a separate application and use old EJBs or introduce a temporary interface between old and new application until it is migrated.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top