[java-opensaml] branch maint-4 updated: JJDBC-3, OSJ-342 Add deprecations
Rod Widdowson
rdw at steadingsoftware.com
Mon Jun 6 12:44:44 UTC 2022
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch maint-4
in repository java-opensaml.
View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=0794a29231339a915a1e944168cc0973e52832d6
The following commit(s) were added to refs/heads/maint-4 by this push:
new 0794a2923 JJDBC-3, OSJ-342 Add deprecations
0794a2923 is described below
commit 0794a29231339a915a1e944168cc0973e52832d6
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon Jun 6 13:42:23 2022 +0100
JJDBC-3, OSJ-342 Add deprecations
https://shibboleth.atlassian.net/browse/JJDBC-3
https://shibboleth.atlassian.net/browse/OSJ-342
Deprecate the JPA Storage service in V4
Deprecate the setTransactionRetry method in favor of setTransactionRetries
---
.../org/opensaml/storage/impl/JPAStorageService.java | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/JPAStorageService.java b/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/JPAStorageService.java
index bcb4c1e76..25eedf857 100644
--- a/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/JPAStorageService.java
+++ b/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/JPAStorageService.java
@@ -41,6 +41,8 @@ import net.shibboleth.utilities.java.support.annotation.constraint.Positive;
import net.shibboleth.utilities.java.support.collection.Pair;
import net.shibboleth.utilities.java.support.component.ComponentSupport;
import net.shibboleth.utilities.java.support.logic.Constraint;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.ObjectType;
import org.opensaml.storage.AbstractStorageService;
import org.opensaml.storage.StorageCapabilitiesEx;
@@ -69,6 +71,7 @@ public class JPAStorageService extends AbstractStorageService implements Storage
* @param factory entity manager factory
*/
public JPAStorageService(@Nonnull final EntityManagerFactory factory) {
+ DeprecationSupport.warn(ObjectType.CLASS, "JPAStorageService", null, "JDBCStorageService");
entityManagerFactory = Constraint.isNotNull(factory, "EntityManagerFactory cannot be null");
setContextSize(JPAStorageRecord.CONTEXT_SIZE);
@@ -90,13 +93,26 @@ public class JPAStorageService extends AbstractStorageService implements Storage
* Sets the number of times a transaction will be retried (default is 3).
*
* @param retry number of transaction retries
+ * @Deprecated
*/
public void setTransactionRetry(final int retry) {
+ DeprecationSupport.warn(ObjectType.PROPERTY , "transactionRetry", null, "transactionRetries");
ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
- transactionRetry =
- (int) Constraint.isGreaterThanOrEqual(0, retry,
+ transactionRetry = Constraint.isGreaterThanOrEqual(0, retry,
"Transaction retry must be greater than or equal to zero");
}
+ /**
+ * Sets the number of times a transaction will be retried (default is 3).
+ *
+ * @param retry number of transaction retries
+ * @Deprecated
+ */
+ public void setTransactionRetries(final int retry) {
+ ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
+ transactionRetry = Constraint.isGreaterThanOrEqual(0, retry,
+ "Transaction retries must be greater than or equal to zero");
+ }
+
/** {@inheritDoc} */
public boolean isServerSide() {
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list