From 01def4be4aa0aa965629d9912bb00f81a256780f Mon Sep 17 00:00:00 2001 From: Benjamin Phillippe Date: Tue, 4 Feb 2014 10:24:11 -0600 Subject: [PATCH] Issue #2769 Removed aggressive Hibernate session flushes Change-Id: Idaeb3ecf0a62cc586ed34525260034cd89e96216 Former-commit-id: 1691c5a3ff435b35830142d198f6e97072584860 [formerly 1691c5a3ff435b35830142d198f6e97072584860 [formerly 0440395a596d13bf8b4f1dda4857c185c6c8afa5]] Former-commit-id: fc589ed84d00bc5bbe6095f53c7ed03b7daff74b Former-commit-id: cdaa7e32b44cc84daa2233fe6b3213290f6f3de6 --- .../edex/registry/ebxml/services/RegistryGarbageCollector.java | 2 +- .../ebxml/services/notification/NotificationListenerImpl.java | 2 +- .../services/notification/RegistrySubscriptionManager.java | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/RegistryGarbageCollector.java b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/RegistryGarbageCollector.java index 2311f42187..59d4bbef74 100644 --- a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/RegistryGarbageCollector.java +++ b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/RegistryGarbageCollector.java @@ -53,6 +53,7 @@ import com.raytheon.uf.edex.registry.ebxml.exception.EbxmlRegistryException; * 7/11/2013 1707 bphillip Initial implementation * 7/29/2013 2191 bphillip Added executors to remove orphaned slots and expired events * 1/15/2014 2613 bphillip Added Hibernate flush() call + * 2/4/2014 2769 bphillip Removed flush and clear call * * * @author bphillip @@ -163,7 +164,6 @@ public class RegistryGarbageCollector { @Override public void runWithTransaction() { eventDao.delete(event); - eventDao.flushAndClearSession(); } } } diff --git a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/notification/NotificationListenerImpl.java b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/notification/NotificationListenerImpl.java index 10895c79a8..bdcce18f84 100644 --- a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/notification/NotificationListenerImpl.java +++ b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/notification/NotificationListenerImpl.java @@ -93,6 +93,7 @@ import com.raytheon.uf.edex.registry.ebxml.util.EbxmlObjectUtil; * 12/2/2013 1829 bphillip Added getIdsFrom action method and changed how slots are added to objects * 1/15/2014 2613 bphillip Added batching of notification update queries to reduce number of web service calls * 01/21/2014 2613 bphillip Added home slot to remove objects request so delete events are properly handled + * 2/4/2014 2769 bphillip Removed flush and clear call * * * @@ -214,7 +215,6 @@ public class NotificationListenerImpl implements NotificationListener { } } - registryDao.flushAndClearSession(); statusHandler.info("Processing notification id [" + notification.getId() + "] completed in " + (TimeUtil.currentTimeMillis() - startTime) + " ms"); diff --git a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/notification/RegistrySubscriptionManager.java b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/notification/RegistrySubscriptionManager.java index 07c6bc51d8..19e5f059dd 100644 --- a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/notification/RegistrySubscriptionManager.java +++ b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/notification/RegistrySubscriptionManager.java @@ -82,6 +82,7 @@ import com.raytheon.uf.edex.registry.ebxml.util.EbxmlObjectUtil; * 12/9/2013 2613 bphillip Setting last run time of subscription now occurs before notification is sent * 1/15/2014 2613 bphillip Added Hibernate flush and clear after subscription processing * 01/21/2014 2613 bphillip Changed how last run time is updated for replication subscriptions + * 2/4/2014 2769 bphillip Removed flush and clear call * * * @author bphillip @@ -406,8 +407,6 @@ public class RegistrySubscriptionManager implements statusHandler.error( "Errors occurred while processing subscription [" + subscriptionName + "]", e); - } finally { - subscriptionDao.flushAndClearSession(); } }