diff --git a/ebean-api/src/main/java/io/ebean/DB.java b/ebean-api/src/main/java/io/ebean/DB.java
index f20bcb740..b2490232b 100644
--- a/ebean-api/src/main/java/io/ebean/DB.java
+++ b/ebean-api/src/main/java/io/ebean/DB.java
@@ -267,15 +267,21 @@ public final class DB {
}
/**
+ * Deprecated for removal migrate using try-with-resources and commit on the transaction itself.
+ *
* Commit the current transaction.
*/
+ @Deprecated(forRemoval = true)
public static void commitTransaction() {
getDefault().commitTransaction();
}
/**
+ * Deprecated for removal migrate to using try-with-resources and rollback on the transaction itself.
+ *
* Rollback the current transaction.
*/
+ @Deprecated(forRemoval = true)
public static void rollbackTransaction() {
getDefault().rollbackTransaction();
}
diff --git a/ebean-api/src/main/java/io/ebean/Database.java b/ebean-api/src/main/java/io/ebean/Database.java
index 21fb37d05..7c394c396 100644
--- a/ebean-api/src/main/java/io/ebean/Database.java
+++ b/ebean-api/src/main/java/io/ebean/Database.java
@@ -650,13 +650,19 @@ public interface Database {
void flush();
/**
+ * Deprecated for removal migrate using try-with-resources and commit on the transaction itself.
+ *
* Commit the current transaction.
*/
+ @Deprecated(forRemoval = true)
void commitTransaction();
/**
+ * Deprecated for removal migrate to using try-with-resources and rollback on the transaction itself.
+ *
* Rollback the current transaction.
*/
+ @Deprecated(forRemoval = true)
void rollbackTransaction();
/**
diff --git a/ebean-api/src/main/java/io/ebean/ExpressionList.java b/ebean-api/src/main/java/io/ebean/ExpressionList.java
index 59d24512c..9db4faecf 100644
--- a/ebean-api/src/main/java/io/ebean/ExpressionList.java
+++ b/ebean-api/src/main/java/io/ebean/ExpressionList.java
@@ -56,7 +56,7 @@ public interface ExpressionList {
/**
* Deprecated migrate to {@link #orderBy(String)}
*/
- @Deprecated(since = "13.19")
+ @Deprecated(since = "13.19", forRemoval = true)
default ExpressionList order(String orderByClause) {
return orderBy(orderByClause);
}
@@ -74,7 +74,7 @@ public interface ExpressionList {
/**
* Deprecated migrate to orderBy().
*/
- @Deprecated
+ @Deprecated(forRemoval = true)
default OrderBy order() {
return orderBy();
}
diff --git a/ebean-api/src/main/java/io/ebean/Query.java b/ebean-api/src/main/java/io/ebean/Query.java
index c595b2749..f6d7bda47 100644
--- a/ebean-api/src/main/java/io/ebean/Query.java
+++ b/ebean-api/src/main/java/io/ebean/Query.java
@@ -1398,7 +1398,7 @@ public interface Query extends CancelableQuery {
/**
* Deprecated migrate to orderBy().
*/
- @Deprecated(since = "13.19")
+ @Deprecated(since = "13.19", forRemoval = true)
default Query order(String orderByClause) {
return orderBy(orderByClause);
}
@@ -1417,7 +1417,7 @@ public interface Query extends CancelableQuery {
/**
* Deprecated migrate to orderBy().
*/
- @Deprecated(since = "13.19")
+ @Deprecated(since = "13.19", forRemoval = true)
default OrderBy order() {
return orderBy();
}
@@ -1430,7 +1430,7 @@ public interface Query extends CancelableQuery {
/**
* Deprecated migrate to setOrderBy().
*/
- @Deprecated(since = "13.19")
+ @Deprecated(since = "13.19", forRemoval = true)
default Query setOrder(OrderBy orderBy) {
return setOrderBy(orderBy);
}
diff --git a/ebean-api/src/main/java/io/ebean/config/DatabaseConfig.java b/ebean-api/src/main/java/io/ebean/config/DatabaseConfig.java
index 8abaf3d13..de7d20ba5 100644
--- a/ebean-api/src/main/java/io/ebean/config/DatabaseConfig.java
+++ b/ebean-api/src/main/java/io/ebean/config/DatabaseConfig.java
@@ -2376,7 +2376,7 @@ public class DatabaseConfig {
* Sorry if returning Set rather than List breaks code but it feels safer to
* do that than a subtle change to return a shallow copy which you will not detect.
*/
- @Deprecated
+ @Deprecated(forRemoval = true)
public Set> getClasses() {
return classes;
}
@@ -3389,7 +3389,7 @@ public class DatabaseConfig {
/**
* Deprecated - migrate to isLoadModuleInfo().
*/
- @Deprecated
+ @Deprecated(forRemoval = true)
public boolean isAutoLoadModuleInfo() {
return loadModuleInfo;
}
diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/core/BeanRequest.java b/ebean-core/src/main/java/io/ebeaninternal/server/core/BeanRequest.java
index b8224bc23..b59d72726 100644
--- a/ebean-core/src/main/java/io/ebeaninternal/server/core/BeanRequest.java
+++ b/ebean-core/src/main/java/io/ebeaninternal/server/core/BeanRequest.java
@@ -48,7 +48,7 @@ public abstract class BeanRequest {
*/
public void commitTransIfRequired() {
if (createdTransaction) {
- server.commitTransaction();
+ transaction.commit();
}
}
diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/core/ObtainedTransactionImplicit.java b/ebean-core/src/main/java/io/ebeaninternal/server/core/ObtainedTransactionImplicit.java
index c4e06d434..760ec35c9 100644
--- a/ebean-core/src/main/java/io/ebeaninternal/server/core/ObtainedTransactionImplicit.java
+++ b/ebean-core/src/main/java/io/ebeaninternal/server/core/ObtainedTransactionImplicit.java
@@ -23,7 +23,7 @@ final class ObtainedTransactionImplicit extends ObtainedTransaction {
@Override
public void commitIfCreated() {
- server.commitTransaction();
+ transaction.commit();
}
@Override