Skip to content

Commit a4d680f

Browse files
committed
Added logs
1 parent c48d220 commit a4d680f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src-java/kilda-persistence-hibernate/src/main/java/org/openkilda/persistence/hibernate/repositories/HibernateGenericRepository.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@
2525
import org.openkilda.persistence.repositories.Repository;
2626
import org.openkilda.persistence.tx.TransactionManager;
2727

28+
import lombok.extern.slf4j.Slf4j;
2829
import org.hibernate.Session;
2930
import org.hibernate.SessionFactory;
3031

32+
@Slf4j
3133
public abstract class HibernateGenericRepository<M extends CompositeDataEntity<V>, V, H extends V>
3234
implements Repository<M> {
3335
protected final HibernatePersistenceImplementation implementation;
@@ -54,7 +56,7 @@ public void add(M model) {
5456
@Override
5557
public void remove(M model) {
5658
V view = model.getData();
57-
if (! (view instanceof EntityBase)) {
59+
if (!(view instanceof EntityBase)) {
5860
throw new IllegalArgumentException(
5961
"Can't make not persistent entity " + model + ", because it is not persisted now");
6062
}
@@ -87,6 +89,7 @@ protected Session getSession() {
8789

8890
protected TransactionManager getTransactionManager() {
8991
PersistenceManager manager = PersistenceContextManager.INSTANCE.getPersistenceManager();
92+
log.info("CHUPIN HibernateGenericRepository.getTransactionManager. PersistenceManager: {}", manager);
9093
return manager.getTransactionManager(implementation.getType());
9194
}
9295

0 commit comments

Comments
 (0)