incubator-hise-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r.@apache.org
Subject svn commit: r915779 - in /incubator/hise/trunk/hise-services/src/main/java/org/apache/hise: Test.java TestImpl.java
Date Wed, 24 Feb 2010 13:19:08 GMT
Author: rr
Date: Wed Feb 24 13:19:08 2010
New Revision: 915779

URL: http://svn.apache.org/viewvc?rev=915779&view=rev
Log:
Added test service for itest

Added:
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/Test.java   (with props)
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/TestImpl.java   (with
props)

Added: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/Test.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/Test.java?rev=915779&view=auto
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/Test.java (added)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/Test.java Wed Feb 24
13:19:08 2010
@@ -0,0 +1,8 @@
+package org.apache.hise;
+
+import javax.jws.WebService;
+
+@WebService
+public interface Test {
+    void cleanup() throws Exception;
+}

Propchange: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/Test.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/TestImpl.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/TestImpl.java?rev=915779&view=auto
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/TestImpl.java (added)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/TestImpl.java Wed Feb
24 13:19:08 2010
@@ -0,0 +1,38 @@
+package org.apache.hise;
+
+import javax.jws.WebService;
+
+import org.apache.hise.dao.HISEDao;
+import org.apache.hise.dao.Job;
+import org.apache.hise.dao.Task;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.TransactionStatus;
+import org.springframework.transaction.support.TransactionCallback;
+import org.springframework.transaction.support.TransactionTemplate;
+
+@WebService(endpointInterface = "org.apache.hise.Test")
+public class TestImpl implements Test {
+    
+    private HISEDao hiseDao;
+    private PlatformTransactionManager transactionManager;
+    
+    public void setHiseDao(HISEDao hiseDao) {
+        this.hiseDao = hiseDao;
+    }
+    
+    public void setTransactionManager(PlatformTransactionManager transactionManager) {
+        this.transactionManager = transactionManager;
+    }
+
+    public void cleanup() throws Exception {
+        TransactionTemplate tt = new TransactionTemplate(transactionManager);
+        tt.execute(new TransactionCallback() {
+            public Object doInTransaction(TransactionStatus status) {
+//                hiseDao.clearAllRecords(OrgEntity.class);
+                hiseDao.clearAllRecords(Task.class);
+                hiseDao.clearAllRecords(Job.class);
+                return null;
+            }
+        });
+    }
+}

Propchange: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/TestImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message