Skip to content

Commit

Permalink
Upgrades JPA to 3.1 (#6684)
Browse files Browse the repository at this point in the history
* Upgrades JPA to 3.1

Signed-off-by: Laird Nelson <[email protected]>

* Squashable commit; interim work

Signed-off-by: Laird Nelson <[email protected]>

---------

Signed-off-by: Laird Nelson <[email protected]>
  • Loading branch information
ljnelson authored Apr 25, 2023
1 parent 6bfa369 commit 71103a9
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
Copyright (c) 2019, 2022 Oracle and/or its affiliates.
Copyright (c) 2019, 2023 Oracle and/or its affiliates.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -18,8 +18,8 @@
-->
<persistence xmlns="https://jakarta.ee/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd"
version="3.0">
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_1.xsd"
version="3.1">

<persistence-unit name="{{pu-name}}" transaction-type="JTA">
<jta-data-source>{{ds-name}}</jta-data-source>
Expand Down
2 changes: 1 addition & 1 deletion dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<version.lib.jakarta.jms-api>3.0.0</version.lib.jakarta.jms-api>
<version.lib.jakarta.jsonb-api>3.0.0</version.lib.jakarta.jsonb-api>
<version.lib.jakarta.jsonp-api>2.1.1</version.lib.jakarta.jsonp-api>
<version.lib.jakarta.persistence-api>3.0.0</version.lib.jakarta.persistence-api>
<version.lib.jakarta.persistence-api>3.1.0</version.lib.jakarta.persistence-api>
<version.lib.jakarta.transaction-api>2.0.0</version.lib.jakarta.transaction-api>
<version.lib.jakarta.validation-api>3.0.0</version.lib.jakarta.validation-api>
<version.lib.jakarta.websockets-api>2.1.0</version.lib.jakarta.websockets-api>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2019, 2022 Oracle and/or its affiliates.
Copyright (c) 2019, 2023 Oracle and/or its affiliates.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -19,8 +19,8 @@
<persistence xmlns="https://jakarta.ee/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence
https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd"
version="3.0">
https://jakarta.ee/xml/ns/persistence/persistence_3_1.xsd"
version="3.1">
<persistence-unit name="test" transaction-type="JTA">
<jta-data-source>test</jta-data-source>
<class>io.helidon.examples.integrations.cdi.jpa.Greeting</class>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2020, 2022 Oracle and/or its affiliates.
Copyright (c) 2020, 2023 Oracle and/or its affiliates.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -19,8 +19,8 @@
<persistence xmlns="https://jakarta.ee/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence
https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd"
version="3.0">
https://jakarta.ee/xml/ns/persistence/persistence_3_1.xsd"
version="3.1">
<persistence-unit name="test" transaction-type="JTA">
<jta-data-source>test</jta-data-source>
<class>io.helidon.examples.integrations.cdi.pokemon.Pokemon</class>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2019, 2022 Oracle and/or its affiliates.
Copyright (c) 2019, 2023 Oracle and/or its affiliates.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -19,8 +19,8 @@
<persistence xmlns="https://jakarta.ee/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence
https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd"
version="3.0">
https://jakarta.ee/xml/ns/persistence/persistence_3_1.xsd"
version="3.1">
<persistence-unit name="test" transaction-type="JTA">
<description>A persistence unit for use by unit tests.</description>
<jta-data-source>test</jta-data-source>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2021 Oracle and/or its affiliates.
* Copyright (c) 2019, 2023 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -245,7 +245,7 @@ public PersistenceUnitInfoBean(final String persistenceUnitName,
*
* @param persistenceXMLSchemaVersion a {@link String}
* representation of the version of JPA being supported; may be
* {@code null} in which case "{@code 2.2}" will be used instead
* {@code null} in which case "{@code 3.1}" will be used instead
*
* @param persistenceProviderClassName the fully-qualified class
* name of a {@link PersistenceProvider} implementation; may be
Expand Down Expand Up @@ -402,7 +402,7 @@ public PersistenceUnitInfoBean(final String persistenceUnitName,
*
* @param persistenceXMLSchemaVersion a {@link String}
* representation of the version of JPA being supported; may be
* {@code null} in which case "{@code 2.2}" will be used instead
* {@code null} in which case "{@code 3.1}" will be used instead
*
* @param persistenceProviderClassName the fully-qualified class
* name of a {@link PersistenceProvider} implementation; may be
Expand Down Expand Up @@ -535,7 +535,7 @@ public PersistenceUnitInfoBean(final String persistenceUnitName,
this.persistenceUnitName = persistenceUnitName;
this.persistenceUnitRootUrl = persistenceUnitRootUrl;
this.persistenceProviderClassName = persistenceProviderClassName;
this.persistenceXMLSchemaVersion = persistenceXMLSchemaVersion == null ? "2.2" : persistenceXMLSchemaVersion;
this.persistenceXMLSchemaVersion = persistenceXMLSchemaVersion == null ? "3.1" : persistenceXMLSchemaVersion;
this.originalClassLoader = classLoader;
this.classLoader = classLoader;
this.tempClassLoaderSupplier = tempClassLoaderSupplier;
Expand Down Expand Up @@ -1075,7 +1075,7 @@ public String toString() {
final PersistenceUnitInfoBean returnValue =
new PersistenceUnitInfoBean(name,
rootUrl,
"2.2",
"3.1",
persistenceUnit.getProvider(),
classLoader,
tempClassLoaderSupplier,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2019, 2022 Oracle and/or its affiliates.
Copyright (c) 2019, 2023 Oracle and/or its affiliates.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -19,8 +19,8 @@
<persistence xmlns="https://jakarta.ee/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence
https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd"
version="3.0">
https://jakarta.ee/xml/ns/persistence/persistence_3_1.xsd"
version="3.1">

<persistence-unit name="test" transaction-type="JTA">
<description>A persistence unit for use by unit tests.</description>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2020, 2022 Oracle and/or its affiliates.
Copyright (c) 2020, 2023 Oracle and/or its affiliates.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -19,8 +19,8 @@
<persistence xmlns="https://jakarta.ee/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence
https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd"
version="3.0">
https://jakarta.ee/xml/ns/persistence/persistence_3_1.xsd"
version="3.1">
<persistence-unit name="test" transaction-type="JTA">
<class>io.helidon.tests.integration.jpa.model.City</class>
<class>io.helidon.tests.integration.jpa.model.Stadium</class>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2020, 2022 Oracle and/or its affiliates.
Copyright (c) 2020, 2023 Oracle and/or its affiliates.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -19,8 +19,8 @@
<persistence xmlns="https://jakarta.ee/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence
https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd"
version="3.0">
https://jakarta.ee/xml/ns/persistence/persistence_3_1.xsd"
version="3.1">
<persistence-unit name="test" transaction-type="JTA">
<class>io.helidon.tests.integration.jpa.model.Type</class>
<class>io.helidon.tests.integration.jpa.model.Trainer</class>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2020, 2022 Oracle and/or its affiliates.
Copyright (c) 2020, 2023 Oracle and/or its affiliates.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -19,8 +19,8 @@
<persistence xmlns="https://jakarta.ee/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence
https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd"
version="3.0">
https://jakarta.ee/xml/ns/persistence/persistence_3_1.xsd"
version="3.1">
<persistence-unit name="test" transaction-type="JTA">
<jta-data-source>test</jta-data-source>
<class>io.helidon.tests.integration.nativeimage.mp2.GreetingEntity</class>
Expand Down

0 comments on commit 71103a9

Please sign in to comment.