Hi all, I was looking the other day at some of the Tomcat code base and saw they introduced the ability to hot convert javax based applications to jakarta. It allows for running both javax and jakarta based applications.
It's pretty simple. They added a new deployment directory named webapp-javaee/ where you can drop javax wars. In the Host config you can configure the directory if needed. In essence, before deployment happens, they trigger a thread that fires up the Migration tool to convert the war to jakarta, and moves the result to the regular webapp/ directory. It's similar to doing it with a shade plugin, or Eclipse transformer or any other tool at build time and dropping the converted war directory. It brings a bit of flexibility though if you need to collocate 2 services in the same instance and one is on javax and the other on jakarta. It also kinda give us a better view on when we could probably discontinue TomEE 8.x Long story short, it does not work for TomEE because it only converts what Tomcat supports (JSP, EL, Servlet, WebSockets, etc). So I did patch the Migration tool so it does it for the full EE platform and added some exclusions to avoid converting the entire world. And I did a small quick and dirty hack on our Arquillian adaptor so we can do it on the fly as well before the application gets deployed. It allows for example to write tests using jakarta namespace to test javax applications. See PR https://github.com/apache/tomee/pull/944 Not sure if it's useful or not. It was just some hacking. If it is, we need also to cover our Maven plugin. -- Jean-Louis Monteiro http://twitter.com/jlouismonteiro http://www.tomitribe.com
