简体   繁体   中英

Does WildFly 25 use jakarta.* api or are the javax.* apis still compatible

I've updated my project from java 11 to 17 and accordingly I had to update my wildfly version from 15 to 25 because the war of java17 is not compatible with wildfly 15. here my question is if I have to migrate my javax to jakarta because the wildfly now supports the Jakarta EE 8 after wildfly 17 release. So is it really compulsory to move to jakarta from javax or there is a workaround for this.

Jakarta EE 8 stil uses the javax.* package. It's essentially exactly the same as Java EE 8, it was only the brand name that has changed. Jakarta EE 9 was the first to use the jakarta.* package. Jakarta EE 10 continues this trend.

Note that WildFly comes as "WildFly" and "WildFly Preview".

WildFly versions 21 - 26 are Jakarta EE 8.
WildFly Preview versions 22 - 26 are Jakarta EE 9.
WildFly and WildFly Preview version 27 is Jakarta EE 10.

In your specific case, you apparently have a Java EE 8 application. So as long as you have picked "WildFly 25" and thus not "WildFly Preview 25", then you're fine. A quick way to verify is to blindly deploy your javax.* targeted WAR to the server and check if it doesn't throw any NoClassDefFoundError errors on javax.* classes during runtime.

By the way, the latest WildFly version supporting Jakarta EE 8 is 26, and this is the one currently still actively maintained (at the time of writing, 26.1.3 was released only 9 days ago, and 25.x is not anymore maintained more than a year), so I strongly recommend to upgrade a step further from WildFly 25 to WildFly 26.

That said, you should really migrate to jakarta.* as next step because javax.* is clearly a dead end.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM