Monthly Archives: January 2013

Generate OpenJPA metamodel classes with maven, maven compiler alternative


It is often better to enhance your entities at build times and it generally simply needs to add -Aopenjpa.metamodel=true  to maven compiler compilerArguments and openjpa to the classpath of the plugin but it has two main drawbacks:

  1. if you need to use other processors you can’t manage it correctly
  2. it simply doesn’t work with maven compiler plugin 3.0

Of course there is an interesting alternative.

Continue reading

Arquillian OpenEJB: deploy and forget archives


Arquillian is great but when testing always on the same app, in a single thread in embedded mode it is a pain to deploy the app for each class.

You can create your own extension as shown by Aslask (https://gist.github.com/3975179) but you need to code it.

If you need the arquillian features that’s probably the best way to go but if you just want to deploy the app OpenEJB has a hack too (probably easier).

Continue reading

TomEE Maven Plugin: finer configuration for updates


TomEE maven plugin offers you a way to update file from your maven project to the deployed application. It offers a way to reload the deployed application if a file is updated in the configured update interval. That’s fine but on real projects you want to reload it only if it is a class and not a simple resource (css, js…).

That’s why some more features were added for next version (1.5.2).

Continue reading

TomEE/OpenEJB JAXRS refactoring


Until TomEE 1.5.1 JAXRS deployment policy was to map a servlet by endpoint.

This had two drawbacks:

  • you had to put @Path at class level for all JAXRS classes
  • The entry point for a request was the servlet router (Tomcat) and not the JAXRS one so the routing wasn’t as fine as possible with JAXRS

The advantage was each endpoint were configurable separately.

Continue reading