mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Remove deprecated database.commitTransaction(), migrate to transaction.commit()
Remove the deprecated methods: - DB.commitTransaction() - DB.rollbackTransaction() - DB.endTransaction() - database.commitTransaction() - database.rollbackTransaction() - database.endTransaction() Migrate to using try-with-resources and transaction.commit(), transaction.rollback()
This commit is contained in:
@@ -86,6 +86,11 @@ public interface SpiEbeanServer extends SpiServer, ExtendedServer, BeanCollectio
|
||||
*/
|
||||
SpiTransactionManager transactionManager();
|
||||
|
||||
/**
|
||||
* End the current transaction if it is active.
|
||||
*/
|
||||
void endTransaction();
|
||||
|
||||
/**
|
||||
* Return all the descriptors.
|
||||
*/
|
||||
|
||||
@@ -756,16 +756,6 @@ public final class DefaultServer implements SpiServer, SpiEbeanServer {
|
||||
currentTransaction().flush();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void commitTransaction() {
|
||||
currentTransaction().commit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void rollbackTransaction() {
|
||||
currentTransaction().rollback();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endTransaction() {
|
||||
Transaction transaction = transactionManager.inScope();
|
||||
|
||||
Reference in New Issue
Block a user