mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V2.2 to HEAD
8371: Merged V2.1 to V2.2 8307: Next round of fixes for session management. 8309: Fixed AR-1891: Long MLText strings fail in Oracle 8313: Fix for case where existing MLText entry is null 8319: Follow-up fix for NPE where StringValue is null when persisting 8331: Fix for AR-1696: Long text in an aspect property causes an exception git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8496 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
*/
|
||||
package org.alfresco.repo.domain.hibernate;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
@@ -36,7 +35,6 @@ import org.alfresco.util.resource.MethodResourceManager;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.engine.CollectionKey;
|
||||
import org.hibernate.engine.EntityKey;
|
||||
import org.hibernate.stat.SessionStatistics;
|
||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||
@@ -151,8 +149,20 @@ public class SessionSizeResourceManager extends HibernateDaoSupport implements M
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear the session now.
|
||||
*
|
||||
* @param session
|
||||
*/
|
||||
public static void clear(Session session)
|
||||
{
|
||||
SessionStatistics stats = session.getStatistics();
|
||||
selectivelyClear(session, stats);
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void selectivelyClear(Session session, SessionStatistics stats)
|
||||
private static void selectivelyClear(Session session, SessionStatistics stats)
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
|
Reference in New Issue
Block a user