vendredi 30 octobre 2015

testing ejb in spring or guice

There's a legacy ejb application and I wan't to write and test jpa queries and maybe services. The arquillian seems to be a great choice. But it's not working as in tutorial ;) I cannot test my simple ejb bean only because it depends on the other bean and so on and so forth.
To summarize I've to manually prepare ear with all the dependencies taken from pom. I have some problems yet and the deployment takes to long to test ad hoc my persistance layer.

So I've an idea to create new project for test purpose only where I can use spring or guice and test persistance or even service layer. It should be feasible. I think I've to add custom support for @EJB, @Stateless annotations.
- is there a project or extension that support such functionality, in fact running ejb without container ?
- what's di framework is better for this purpose ? I know spring but guice is used in the project
- do you think it make sense ? I'd like to add some integration tests

Aucun commentaire:

Enregistrer un commentaire