On Feb 17, 2012, at 10:03 AM, Charles Moulliard wrote: > Hi, > > Is there a maven plugin to use OpenEJB in embedded more like we can do with > Glassfish > > <groupId>org.glassfish</groupId> > <artifactId>maven-embedded-glassfish-plugin</artifactId> > <version>3.1.1</version> > > If this is not the case, what do you suggest/recommend to create a Boostrap > class to launch OpenEJB and deploy a WAR ?
Romain has one started here: http://svn.apache.org/repos/asf/openejb/trunk/maven-plugins/tomee-maven-plugin/ That will do the server start and war deployment. Not yet released and I don't think there are snapshots deployed for it either. If you don't need the .war support, then EJBContainer API is a great way to bootstrap something in a vm. Here are two examples that do it: http://openejb.apache.org/examples-trunk/cdi-request-scope/README.html http://openejb.apache.org/examples-trunk/cdi-application-scope/README.html That API can now also boot TomEE Embedded if you specify "EJBContainer.PROVIDER" to "tomee-embedded". There's also the Arquillian adapter which can allow you to test the same code in all flavors of TomEE and plain OpenEJB. Here's an example pom. http://svn.apache.org/repos/asf/openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-tests/pom.xml There's a profile for each server setup. One for glassfish-embedded too, though that one stopped working for some reason. It was nice to have in there for the occasional sanity check. -David
