From 70325702de9d109f87e3eb28e91b53a36fcdb51e Mon Sep 17 00:00:00 2001
From: Laird Nelson
This field's value is {@code true} by default.
+ *This field's value is {@code false} by default.
+ * + * @see PersistenceExtension */ private final boolean enabled; @@ -309,7 +315,7 @@ public JpaExtension() { if (LOGGER.isLoggable(Level.FINER)) { LOGGER.entering(cn, mn); } - this.enabled = Boolean.parseBoolean(System.getProperty(this.getClass().getName() + ".enabled", "true")); + this.enabled = Boolean.parseBoolean(System.getProperty(this.getClass().getName() + ".enabled", "false")); if (LOGGER.isLoggable(Level.FINE) && !this.enabled) { LOGGER.logp(Level.FINE, cn, mn, "jpaExtensionDisabled", this.getClass().getName()); } @@ -812,7 +818,7 @@ private void afterBeanDiscovery(@Observes @Priority(LIBRARY_AFTER) AfterBeanDiscovery event, BeanManager beanManager) - throws IOException, JAXBException, ReflectiveOperationException, XMLStreamException { + throws IOException, JAXBException, ReflectiveOperationException, URISyntaxException, XMLStreamException { String cn = JpaExtension.class.getName(); String mn = "afterBeanDiscovery"; if (LOGGER.isLoggable(Level.FINER)) { @@ -1357,7 +1363,7 @@ private void processPersistenceXmls(AfterBeanDiscovery event, EnumerationIn such a case, the injection point will be effectively rewritten such that it will appear to the CDI
* container as though there were a value specified for the {@link PersistenceContext#unitName() unitName}
- * element—namely this field's value. Additionally, a bean identical to the existing solitary {@link
- * PersistenceUnitInfo}-typed bean will be added with this field's value as the {@linkplain Named#value() value of
- * its Named
qualifier}, thus serving as a kind of alias for the "real" bean.
Named
qualifier}, thus serving as a kind of alias for
+ * the "real" bean.
*
*
*
* @see JpaExtension
+ *
+ * @deprecated This is an internal class used by the now-deprecated {@link JpaExtension} class. Its replacement is an
+ * internal detail of the {@link PersistenceExtension} class.
*/
+@Deprecated(since = "4.0")
@Vetoed
class CdiTransactionScopedEntityManager extends DelegatingEntityManager {
diff --git a/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/ClearingQuery.java b/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/ClearingQuery.java
index 6ac39fc2578..27d054531c7 100644
--- a/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/ClearingQuery.java
+++ b/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/ClearingQuery.java
@@ -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.
@@ -21,6 +21,7 @@
import jakarta.persistence.EntityManager;
import jakarta.persistence.Query;
+@Deprecated(since = "4.0")
final class ClearingQuery extends DelegatingQuery {
private final EntityManager entityManager;
diff --git a/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/ClearingStoredProcedureQuery.java b/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/ClearingStoredProcedureQuery.java
index 8077a080c7a..7f903b97140 100644
--- a/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/ClearingStoredProcedureQuery.java
+++ b/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/ClearingStoredProcedureQuery.java
@@ -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.
@@ -21,6 +21,7 @@
import jakarta.persistence.EntityManager;
import jakarta.persistence.StoredProcedureQuery;
+@Deprecated(since = "4.0")
final class ClearingStoredProcedureQuery extends DelegatingStoredProcedureQuery {
private final EntityManager entityManager;
diff --git a/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/ClearingTypedQuery.java b/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/ClearingTypedQuery.java
index f3658fc8d06..7218e8d37a6 100644
--- a/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/ClearingTypedQuery.java
+++ b/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/ClearingTypedQuery.java
@@ -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.
@@ -21,6 +21,7 @@
import jakarta.persistence.EntityManager;
import jakarta.persistence.TypedQuery;
+@Deprecated(since = "4.0")
final class ClearingTypedQueryThis qualifier must not be combined with {@link Extended}, * {@link CdiTransactionScoped} or {@link NonTransactional}.
+ * + * @deprecated This is an internal class used only by the now-deprecated {@link JpaExtension} class. */ +@Deprecated(since = "4.0") @Qualifier @Retention(RetentionPolicy.RUNTIME) @Target({}) // can only be programmatically added diff --git a/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/JpaTransactionScopedEntityManager.java b/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/JpaTransactionScopedEntityManager.java index e26f499fb81..4e52e9afb34 100644 --- a/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/JpaTransactionScopedEntityManager.java +++ b/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/JpaTransactionScopedEntityManager.java @@ -57,7 +57,10 @@ * *As with all {@link EntityManager} implementations, instances of * this class are not safe for concurrent use by multiple threads.
+ * + * @deprecated This is an internal class used only by the now-deprecated {@link JpaExtension} class. */ +@Deprecated(since = "4.0") @Vetoed final class JpaTransactionScopedEntityManager extends DelegatingEntityManager { diff --git a/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/JtaDataSourceProvider.java b/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/JtaDataSourceProvider.java index 7656815cc89..d2ea58cf26f 100644 --- a/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/JtaDataSourceProvider.java +++ b/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/JtaDataSourceProvider.java @@ -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. @@ -46,6 +46,7 @@ import jakarta.transaction.TransactionSynchronizationRegistry; @ApplicationScoped +@Deprecated(since = "4.0") class JtaDataSourceProvider implements PersistenceUnitInfoBean.DataSourceProvider { diff --git a/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/JtaTransactionSupport.java b/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/JtaTransactionSupport.java index 7ce0355214f..f0be504555c 100644 --- a/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/JtaTransactionSupport.java +++ b/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/JtaTransactionSupport.java @@ -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. @@ -41,8 +41,11 @@ * @see TransactionSupport * * @see NoTransactionSupport + * + * @deprecated This is an internal class used only by the now-deprecated {@link JpaExtension} class. */ @ApplicationScoped +@Deprecated(since = "4.0") class JtaTransactionSupport implements TransactionSupport { diff --git a/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/Messages.java b/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/Messages.java index e047697eb0e..eb5ee4a36a0 100644 --- a/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/Messages.java +++ b/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/Messages.java @@ -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. @@ -18,6 +18,7 @@ import java.text.MessageFormat; import java.util.ResourceBundle; +@Deprecated(since = "4.0") final class Messages { private static final ResourceBundle MESSAGES = ResourceBundle.getBundle(Messages.class.getName()); diff --git a/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/NoTransactionSupport.java b/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/NoTransactionSupport.java index e87ecfe729c..6bbbb863ff1 100644 --- a/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/NoTransactionSupport.java +++ b/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/NoTransactionSupport.java @@ -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. @@ -31,8 +31,11 @@ * @see TransactionSupport * * @see JtaTransactionSupport + * + * @deprecated This is an internal class used only by the now-deprecated {@link JpaExtension} class. */ @ApplicationScoped +@Deprecated(since = "4.0") final class NoTransactionSupport implements TransactionSupport { diff --git a/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/NonTransactional.java b/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/NonTransactional.java index 2c639124ebf..d47008c38b0 100644 --- a/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/NonTransactional.java +++ b/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/NonTransactional.java @@ -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. @@ -29,7 +29,10 @@ *This qualifier must not be combined with {@link * CdiTransactionScoped}, {@link Extended} or {@code * JpaTransactionScoped}.
+ * + * @deprecated This is an internal class used only by the now-deprecated {@link JpaExtension} class. */ +@Deprecated(since = "4.0") @Qualifier @Retention(RetentionPolicy.RUNTIME) @Target({}) // can only be programmatically added diff --git a/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/NonTransactionalEntityManager.java b/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/NonTransactionalEntityManager.java index 6516b8352ca..68e374cd0b8 100644 --- a/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/NonTransactionalEntityManager.java +++ b/integrations/cdi/jpa-cdi/src/main/java/io/helidon/integrations/cdi/jpa/NonTransactionalEntityManager.java @@ -44,7 +44,7 @@ * #acquireDelegate()} method and only under appropriate * circumstances. * - *This class is added as a synthetic bean by the {@link + *
This class is added as a synthetic bean by the (now-deprecated) {@link * JpaExtension} class.
* *This is necessary because the empty string ({@code ""}) as the value of the {@link Named#value()} element can - * have special + * have special * semantics, so cannot be used to designate an unnamed or otherwise default persistence unit.
* *The value of this field is subject to change without prior notice at any point. In general the mechanics
@@ -313,6 +313,7 @@ private This method never returns {@code null}. This method never returns {@code null}. This method never returns {@code null}. This method never returns {@code null}.