From hise-commits-return-71-apmail-incubator-hise-commits-archive=incubator.apache.org@incubator.apache.org Wed Feb 24 13:19:28 2010 Return-Path: Delivered-To: apmail-incubator-hise-commits-archive@minotaur.apache.org Received: (qmail 76380 invoked from network); 24 Feb 2010 13:19:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Feb 2010 13:19:28 -0000 Received: (qmail 5627 invoked by uid 500); 24 Feb 2010 13:19:28 -0000 Delivered-To: apmail-incubator-hise-commits-archive@incubator.apache.org Received: (qmail 5613 invoked by uid 500); 24 Feb 2010 13:19:28 -0000 Mailing-List: contact hise-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hise-dev@incubator.apache.org Delivered-To: mailing list hise-commits@incubator.apache.org Received: (qmail 5602 invoked by uid 99); 24 Feb 2010 13:19:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Feb 2010 13:19:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Feb 2010 13:19:28 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 78108238897D; Wed, 24 Feb 2010 13:19:08 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: hise-commits@incubator.apache.org From: rr@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100224131908.78108238897D@eris.apache.org> 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