1

We have Java EE 8 EAR made up of different modules/projects. It is currently running on WildFly 19.0.0 Final however we're thinking to move it on the latest WildFly (Jakarta EE). If I understand correctly from version 21.0.0 WildFly is 100% Jakarta EE Full & Web distribution and should we want to move to jakarta ee all we have to do is to change the dependency javaee-api to jakarta.jakartaee-api and update all our imports from javax.* to jakarta.* Is that correct?

  1. Can we run our application as-is on WildFly >= 21.0.0 or is it compulsory for us to recompile it with jakarta dependencies?

  2. Because some of the sub-projects are legacy (i.e. they have javax.* imports) Is it possible to build a single EAR where some sub-projects have javax.* imports whereas others have jakarta.* imports?

In general what's the best way to deal with a scenario where some sub-projects of our EAR are legacy (i.e. they have javax.* imports) whereas other can be migrated to jakarta dependencies & imports?

Thanks

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555

1 Answers1

3

WildFly 21 is JakartEE 8 compliant which is basically the same as JavaEE 8 except for the Intellectual Property so you don't have to change anything. This will be the case also for WildFly 22. As far as I know the idea is to provide 2 different distributions like what was done with JavaEE 8.

WildFly provides a JakartaEE 9 preview with WildFly 22 Alpha but that is a different distribution. That last part can 'transform' your bytecode provided you use managed deployment otherwise you would have to rebuild your project with the new packages.

ehsavoie
  • 3,126
  • 1
  • 16
  • 14
  • So are you saying that I'm still ok for WildFly 21.0.0 but I'll have to amend dependencies & import from WildFly 22 onwards? Still what should I do when some parts of my EAR are legacy and cannot be migrated to jakarta imports ? – Marco Del Percio Nov 19 '20 at 10:54
  • 1
    No I'm saying that until you use the JakartaEE9 distribution of WildFly (called preview for now) you don't have to do anything. WildFly 22 should provide both. Also iirc WildFLy provides a way to automagically convert your application. You should read https://www.wildfly.org/news/2020/11/12/Jakarta-EE-9-with-WildFly-Preview/ – ehsavoie Nov 19 '20 at 14:39
  • Wow so in preview mode we can carry on as it is with all the legacy the javax.* imports & java-ee8-api dependencies and the managed deployment will auto-magically update all of it at deployment time to use jakarta?? – Marco Del Percio Nov 20 '20 at 14:24
  • yes but you need to provide an archive and deploy it with the cli iirc. this is an alpha so paint is not fully dry ;) – ehsavoie Nov 21 '20 at 20:21