Support Gnome Foundation

Δευτέρα 20 Ιουλίου 2009

OpenEJB 3.1 JBoss Embedded and EJB 3.0 unit testing

The past month i have been trying to create a framework for testing EJB 3.0 out of container.The result was that i spent most of my time testing the embedded version of
various Java application servers such as JBoss GlassFish OpenEJB etc.The major drawback in such a procedure is that the nature of EJB doesn't make them suitable for
out of container testing.
I tried alot the jboss embedded and ejb3 embedded projects from jboss.Apart from the
fact that these are in beta version still it was alot of buggy code.I download and patch some stuff and finally made it to work but with no luck in deploying successfully ejbs. After talking with the various contributors @ JBoss i stopped experimenting with jboss products and turned to openejb.
I manage very easily to integrate openejb in the maven build cycle and deploy most of
my ejbs.I configure it to work with oracle and hibernate,simulating as close as i can the production environment.All it took some maven dependencies and smart configuration in the project. Finally for testing purposes instead of junit i selected testNG which i think is far much better than junit.So the final configuration i think is a win situation for EJB 3 integration testing is:
  • Hibernate
  • OpenEJB 3.0
  • EJB 3.0
These 3 seem to cooperate / coordinate really good.

I will return with details on how to define pom.xml dependencies.

1 σχόλιο:

Sumith είπε...

What is the location of Jboss log? I couldn't see a catalina.out file under its installation directory. I have a Java hosting account with OC (https://www.onlinecares.com), and I'm getting internal server error while deploying the application. Which log file I need to check to track down the exact problem?