=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2009-10-02 17:35:53 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2009-10-10 15:35:01 +0000
@@ -529,7 +529,7 @@
-
+
@@ -547,6 +547,10 @@
+
+
+
+
=== modified file 'dhis-2/dhis-services/dhis-service-jdbc/pom.xml'
--- dhis-2/dhis-services/dhis-service-jdbc/pom.xml 2009-09-06 15:51:11 +0000
+++ dhis-2/dhis-services/dhis-service-jdbc/pom.xml 2009-10-10 15:35:01 +0000
@@ -26,6 +26,14 @@
quick
+ org.aspectj
+ aspectjrt
+
+
+ org.aspectj
+ aspectjweaver
+
+
org.hisp.dhis
dhis-support-hibernate
=== added file 'dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/StatementInterceptor.java'
--- dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/StatementInterceptor.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-services/dhis-service-jdbc/src/main/java/org/hisp/dhis/jdbc/StatementInterceptor.java 2009-10-10 15:35:01 +0000
@@ -0,0 +1,77 @@
+package org.hisp.dhis.jdbc;
+
+/*
+ * Copyright (c) 2004-2007, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import org.amplecode.quick.StatementManager;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.hisp.dhis.system.deletion.DeletionManager;
+import org.aspectj.lang.ProceedingJoinPoint;
+
+/**
+ * @author Lars Helge Overland
+ * @version $Id$
+ */
+public class StatementInterceptor
+{
+ private static final Log log = LogFactory.getLog( StatementInterceptor.class );
+
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ private StatementManager statementManager;
+
+ public void setStatementManager( StatementManager statementManager )
+ {
+ this.statementManager = statementManager;
+ }
+
+ public Object intercept( ProceedingJoinPoint joinPoint )
+ throws Throwable
+ {
+ Object object = null;
+
+ statementManager.initialise();
+
+ log.info( "Initialising statement manager" );
+
+ try
+ {
+ object = joinPoint.proceed();
+ }
+ finally
+ {
+ statementManager.destroy();
+
+ log.info( "Destroying statement manager" );
+ }
+
+ return object;
+ }
+}
=== modified file 'dhis-2/dhis-services/dhis-service-jdbc/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-jdbc/src/main/resources/META-INF/dhis/beans.xml 2009-06-14 19:43:19 +0000
+++ dhis-2/dhis-services/dhis-service-jdbc/src/main/resources/META-INF/dhis/beans.xml 2009-10-10 15:35:01 +0000
@@ -18,7 +18,7 @@
-
+
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml 2009-08-29 06:56:46 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml 2009-10-10 15:35:01 +0000
@@ -229,17 +229,6 @@
-
-
-
-
-
-
- .*\.ChartService\.getJFreeChart.*
-
-
-
-
-
+
@@ -322,6 +311,10 @@
+
+
+
+
-
+
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DeletionInterceptor.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DeletionInterceptor.java 2009-07-07 10:27:18 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DeletionInterceptor.java 2009-10-10 15:35:01 +0000
@@ -46,10 +46,6 @@
this.deletionManager = deletionManager;
}
- // ----------------------------------------------------------------------
- // MethodInterceptor Implementation
- // ----------------------------------------------------------------------
-
public void intercept( JoinPoint joinPoint )
{
if ( joinPoint.getArgs() != null && joinPoint.getArgs().length > 0 )
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/RunValidationAction.java'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/RunValidationAction.java 2009-09-25 21:45:01 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/RunValidationAction.java 2009-10-10 15:35:01 +0000
@@ -93,13 +93,6 @@
this.organisationUnitService = organisationUnitService;
}
- private StatementManager statementManager;
-
- public void setStatementManager( StatementManager statementManager )
- {
- this.statementManager = statementManager;
- }
-
// -------------------------------------------------------------------------
// Input/output
// -------------------------------------------------------------------------
@@ -169,8 +162,6 @@
sources = organisationUnits;
}
- statementManager.initialise();
-
if ( validationRuleGroupId == -1 )
{
log.info( "Validating all rules" );
@@ -188,8 +179,6 @@
format.parseDate( startDate ), format.parseDate( endDate ), sources, group ) );
}
- statementManager.destroy();
-
Collections.sort( validationResults, new ValidationResultComparator() );
SessionUtils.setSessionVar( KEY_VALIDATIONRESULT, validationResults );
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/META-INF/dhis/beans.xml 2009-10-10 14:26:24 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/META-INF/dhis/beans.xml 2009-10-10 15:35:01 +0000
@@ -201,9 +201,6 @@
-
-
-