dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33174
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16914: Reverted R 16912
------------------------------------------------------------
revno: 16914
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-10-01 16:49:20 +0200
message:
Reverted R 16912
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dbms/DbmsManager.java
dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/dbms/HibernateDbmsManager.java
dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java
dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisTest.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dbms/DbmsManager.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dbms/DbmsManager.java 2014-10-01 14:39:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dbms/DbmsManager.java 2014-10-01 14:49:20 +0000
@@ -38,8 +38,6 @@
void emptyDatabase();
- void flushSession();
-
void clearSession();
void emptyTable( String table );
=== modified file 'dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/dbms/HibernateDbmsManager.java'
--- dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/dbms/HibernateDbmsManager.java 2014-10-01 14:39:00 +0000
+++ dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/dbms/HibernateDbmsManager.java 2014-10-01 14:49:20 +0000
@@ -211,11 +211,6 @@
log.debug( "Cleared Hibernate cache" );
}
- public void flushSession()
- {
- sessionFactory.getCurrentSession().flush();
- }
-
public void clearSession()
{
sessionFactory.getCurrentSession().clear();
=== modified file 'dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java'
--- dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java 2014-10-01 14:39:00 +0000
+++ dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java 2014-10-01 14:49:20 +0000
@@ -81,7 +81,6 @@
import org.hisp.dhis.datavalue.DataValue;
import org.hisp.dhis.datavalue.DataValueAuditService;
import org.hisp.dhis.datavalue.DataValueService;
-import org.hisp.dhis.dbms.DbmsManager;
import org.hisp.dhis.expression.Expression;
import org.hisp.dhis.expression.ExpressionService;
import org.hisp.dhis.expression.Operator;
@@ -131,7 +130,6 @@
import org.hisp.dhis.validation.ValidationRuleService;
import org.springframework.aop.framework.Advised;
import org.springframework.aop.support.AopUtils;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority;
@@ -219,9 +217,6 @@
protected IdentifiableObjectManager identifiableObjectManager;
- @Autowired
- protected DbmsManager dbmsManager;
-
static
{
Calendar calendar = Calendar.getInstance();
@@ -1629,9 +1624,6 @@
Authentication authentication = new UsernamePasswordAuthenticationToken( userDetails, "", authorities );
SecurityContextHolder.getContext().setAuthentication( authentication );
- dbmsManager.flushSession();
- dbmsManager.clearSession();
-
return user;
}
=== modified file 'dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisTest.java'
--- dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisTest.java 2014-10-01 14:39:00 +0000
+++ dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisTest.java 2014-10-01 14:49:20 +0000
@@ -32,9 +32,11 @@
import org.hibernate.Session;
import org.hibernate.SessionFactory;
+import org.hisp.dhis.dbms.DbmsManager;
import org.junit.After;
import org.junit.Before;
import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.orm.hibernate4.SessionFactoryUtils;
@@ -54,6 +56,9 @@
public abstract class DhisTest
extends DhisConvenienceTest implements ApplicationContextAware
{
+ @Autowired
+ protected DbmsManager dbmsManager;
+
// -------------------------------------------------------------------------
// ApplicationContextAware implementation
// -------------------------------------------------------------------------