How to understand What JPA version I'm using in EJB? Is JPA built-in EJB?
Regards
With a Java EE 5 container, you get JPA 1.0 (specified in the JSR 220 - Enterprise JavaBeans, Version 3.0). With a Java EE 6 container, you get JPA 2.0 (specified in the JSR 317: Java Persistence 2.0 which is now dedicated).
Jakarta Persistence 3.0 The JPA was renamed as Jakarta Persistence in 2019 and version 3.0 was released in 2020.
Right-click the file and click Upgrade document version. The persistence. xml file is upgraded to either version 2.0 or 2.1. Confirm the upgrade by opening the file in the Persistence XML editor and check that the version that displays is the one that you want.
JPA uses a version field in your entities to detect concurrent modifications to the same datastore record. When the JPA runtime detects an attempt to concurrently modify the same record, it throws an exception to the transaction attempting to commit last.
With a Java EE 5 container, you get JPA 1.0 (specified in the JSR 220 - Enterprise JavaBeans, Version 3.0).
With a Java EE 6 container, you get JPA 2.0 (specified in the JSR 317: Java Persistence 2.0 which is now dedicated).
And if you are providing your own JPA implementation, well, it depends on the implementation and the version you provide :)
Here are some JPA 2.0 implementations and their respective versions:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With