incubator-hise-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r.@apache.org
Subject svn commit: r959359 [1/3] - in /incubator/hise/branches/0.2.x-experimental: ./ hise-bundle/ hise-bundle/src/main/resources/META-INF/spring/ hise-distro/src/distro/examples/war/claimsHandling/ hise-services/ hise-services/src/main/java/org/apache/hise/a...
Date Wed, 30 Jun 2010 16:06:38 GMT
Author: rr
Date: Wed Jun 30 16:06:35 2010
New Revision: 959359

URL: http://svn.apache.org/viewvc?rev=959359&view=rev
Log:
HISE-37: Spring refactoring (big thanks to Aaron Anderson\!)

Added:
    incubator/hise/branches/0.2.x-experimental/hise-bundle/src/main/resources/META-INF/spring/hise-osgi.xml
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/HISEDaoImpl.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/Transactional.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/HISESchedulerImpl.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/JobExecutor.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/JobTask.java
    incubator/hise/branches/0.2.x-experimental/hise-spring/
    incubator/hise/branches/0.2.x-experimental/hise-spring/pom.xml
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/main/
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/main/java/
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/main/java/org/
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/main/java/org/apache/
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/main/java/org/apache/hise/
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/main/java/org/apache/hise/dao/
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/main/java/org/apache/hise/dao/Transactional.java
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/main/java/org/apache/hise/dao/vendor/
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/main/java/org/apache/hise/dao/vendor/OpenJpaVendorAdapter.java
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/main/resources/
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/main/resources/hise.xml
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/java/
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/java/org/
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/java/org/apache/
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/java/org/apache/hise/
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/java/org/apache/hise/ClientTest.java
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/java/org/apache/hise/CompilerTest.java
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/java/org/apache/hise/DaoTest.java
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/java/org/apache/hise/HISEEngineTest.java
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/java/org/apache/hise/MessageTest.java
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/java/org/apache/hise/MockHiseDao.java
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/java/org/apache/hise/MockTask.java
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/java/org/apache/hise/MockTaskOperationsImpl.java
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/java/org/apache/hise/RegexpTemplateEngineTest.java
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/java/org/apache/hise/SchedulerTest.java
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/java/org/apache/hise/TaskCreationHelper.java
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/java/org/apache/hise/TaskEvaluatorTest.java
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/java/org/apache/hise/TaskOperationsTest.java
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/java/org/apache/hise/TaskTest.java
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/java/org/apache/hise/TaskXmlUtilsTest.java
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/resources/
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/resources/ExampleTasks.wsdl
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/resources/approveHeader.xml
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/resources/dao.xml
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/resources/duplicateTaskDef.xml
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/resources/epr.xml
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/resources/epr2.xml
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/resources/log4j.xml
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/resources/outcome.xml
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/resources/outcome2.xml
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/resources/suspendUntil.xml
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/resources/taskEvaluator.xml
    incubator/hise/branches/0.2.x-experimental/hise-spring/src/test/resources/testHtd1.xml
    incubator/hise/branches/0.2.x-experimental/hise-web/nb-configuration.xml
    incubator/hise/branches/0.2.x-experimental/hise-web/profiles.xml
Removed:
    incubator/hise/branches/0.2.x-experimental/hise-bundle/src/main/resources/META-INF/spring/hise.xml
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/vendor/OpenJpaVendorAdapter.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/jaxws/TransactionHandler.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/java/org/apache/hise/ClientTest.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/java/org/apache/hise/CompilerTest.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/java/org/apache/hise/DaoTest.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/java/org/apache/hise/HISEEngineTest.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/java/org/apache/hise/MessageTest.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/java/org/apache/hise/MockHiseDao.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/java/org/apache/hise/MockTask.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/java/org/apache/hise/MockTaskOperationsImpl.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/java/org/apache/hise/RegexpTemplateEngineTest.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/java/org/apache/hise/SchedulerTest.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/java/org/apache/hise/TaskCreationHelper.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/java/org/apache/hise/TaskEvaluatorTest.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/java/org/apache/hise/TaskOperationsTest.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/java/org/apache/hise/TaskTest.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/java/org/apache/hise/TaskXmlUtilsTest.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/resources/approveHeader.xml
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/resources/dao.xml
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/resources/duplicateTaskDef.xml
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/resources/epr.xml
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/resources/epr2.xml
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/resources/log4j.xml
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/resources/outcome.xml
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/resources/outcome2.xml
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/resources/suspendUntil.xml
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/resources/taskEvaluator.xml
    incubator/hise/branches/0.2.x-experimental/hise-services/src/test/resources/testHtd1.xml
    incubator/hise/branches/0.2.x-experimental/hise-web/src/main/resources/hise-cxf.xml
Modified:
    incubator/hise/branches/0.2.x-experimental/hise-bundle/pom.xml
    incubator/hise/branches/0.2.x-experimental/hise-distro/src/distro/examples/war/claimsHandling/claimsHandling-hise-dd.xml
    incubator/hise/branches/0.2.x-experimental/hise-services/pom.xml
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/api/HISEEngine.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/HISEDao.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/JpaBase.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/Task.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/DefaultHISEUserDetails.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/HISEEngineImpl.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/HISEPasswordCallback.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/HISEScheduler.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSClient.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSService.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsImpl.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/store/HISEDD.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/store/HISEDeployer.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/store/HumanInteractionsCompiler.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/store/TaskDD.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/lang/TaskDefinition.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/runtime/DeadlineController.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/runtime/Task.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/runtime/TaskEvaluator.java
    incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/utils/XQueryEvaluator.java
    incubator/hise/branches/0.2.x-experimental/hise-test-example-osgi/pom.xml
    incubator/hise/branches/0.2.x-experimental/hise-test-example-osgi/src/main/java/org/apache/hise/test/SampleUsers.java
    incubator/hise/branches/0.2.x-experimental/hise-test-example/src/main/resources/testHtd1-hise-dd.xml
    incubator/hise/branches/0.2.x-experimental/hise-web/pom.xml
    incubator/hise/branches/0.2.x-experimental/hise-web/src/main/resources/hise-ds.xml
    incubator/hise/branches/0.2.x-experimental/hise-web/src/main/webapp/WEB-INF/web.xml
    incubator/hise/branches/0.2.x-experimental/hise-web/src/test/resources/hise-test.xml
    incubator/hise/branches/0.2.x-experimental/pom.xml

Modified: incubator/hise/branches/0.2.x-experimental/hise-bundle/pom.xml
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-bundle/pom.xml?rev=959359&r1=959358&r2=959359&view=diff
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-bundle/pom.xml (original)
+++ incubator/hise/branches/0.2.x-experimental/hise-bundle/pom.xml Wed Jun 30 16:06:35 2010
@@ -77,12 +77,7 @@ org.springframework.osgi.service.importe
     <dependencies>
         <dependency>
             <groupId>org.apache.hise</groupId>
-            <artifactId>hise-wsdl</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.hise</groupId>
-            <artifactId>hise-services</artifactId>
+            <artifactId>hise-spring</artifactId>
             <version>${project.version}</version>
         </dependency>
     </dependencies>

Added: incubator/hise/branches/0.2.x-experimental/hise-bundle/src/main/resources/META-INF/spring/hise-osgi.xml
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-bundle/src/main/resources/META-INF/spring/hise-osgi.xml?rev=959359&view=auto
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-bundle/src/main/resources/META-INF/spring/hise-osgi.xml (added)
+++ incubator/hise/branches/0.2.x-experimental/hise-bundle/src/main/resources/META-INF/spring/hise-osgi.xml Wed Jun 30 16:06:35 2010
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+  <!--
+    ~ Licensed to the Apache Software Foundation (ASF) under one ~ or more contributor license agreements. See the NOTICE file ~ distributed with this work for additional information ~ regarding copyright ownership. The ASF licenses this file ~ to you under the Apache License, Version 2.0 (the ~ "License"); you may not use this file except in compliance ~ with the License. You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, ~ software distributed under the License is distributed on an ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~ KIND, either express or implied. See the License for the ~ specific
+    language governing permissions and limitations ~ under the License.
+  -->
+<beans xmlns="http://www.springframework.org/schema/beans" 
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+       xmlns:context="http://www.springframework.org/schema/context" 
+       xmlns:util="http://www.springframework.org/schema/util" 
+       xmlns:http-conf="http://cxf.apache.org/transports/http/configuration" 
+       xmlns:tx="http://www.springframework.org/schema/tx" 
+       xmlns:jaxws="http://cxf.apache.org/jaxws" 
+       xmlns:cxf="http://cxf.apache.org/core" 
+       xmlns:htd="http://www.example.org/WS-HT" 
+       xmlns:htda="http://www.example.org/WS-HT/api" 
+       xmlns:htdt="http://www.example.org/WS-HT/api/xsd" 
+       xmlns:htdaw="http://www.example.org/WS-HT/api/wsdl" 
+       xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
+       xmlns:osgi="http://www.springframework.org/schema/osgi"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.0.xsd
+       http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd
+       http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+       http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
+       http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
+       http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd">
+
+<!--
+  <import resource="classpath:META-INF/cxf/cxf.xml"/>
+  <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
+  <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
+-->
+    <import resource="classpath:hise.xml" />
+    <import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
+    <import resource="classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml" />
+
+     <osgi:service id="hiseEngineOsgi" ref="hiseEngine" interface="org.apache.hise.api.HISEEngine" />
+     <osgi:service id="transactionManagerOsgi" interface="org.springframework.transaction.PlatformTransactionManager" ref="transactionManager"/>
+
+</beans>

Modified: incubator/hise/branches/0.2.x-experimental/hise-distro/src/distro/examples/war/claimsHandling/claimsHandling-hise-dd.xml
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-distro/src/distro/examples/war/claimsHandling/claimsHandling-hise-dd.xml?rev=959359&r1=959358&r2=959359&view=diff
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-distro/src/distro/examples/war/claimsHandling/claimsHandling-hise-dd.xml (original)
+++ incubator/hise/branches/0.2.x-experimental/hise-distro/src/distro/examples/war/claimsHandling/claimsHandling-hise-dd.xml Wed Jun 30 16:06:35 2010
@@ -7,7 +7,7 @@
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
        http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
        ">
-  <bean class="org.apache.hise.engine.store.HISEDeployer" init-method="init">
+  <bean class="org.apache.hise.engine.store.HISEDeployer">
     <property name="hiseEngine" ref="hiseEngine"/>
     <property name="deploymentInfo">
       <bean class="org.apache.hise.engine.store.HISEDD">

Modified: incubator/hise/branches/0.2.x-experimental/hise-services/pom.xml
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-services/pom.xml?rev=959359&r1=959358&r2=959359&view=diff
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-services/pom.xml (original)
+++ incubator/hise/branches/0.2.x-experimental/hise-services/pom.xml Wed Jun 30 16:06:35 2010
@@ -16,7 +16,7 @@
   ~ KIND, either express or implied.  See the License for the
   ~ specific language governing permissions and limitations
   ~ under the License.
-  -->
+-->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
@@ -30,6 +30,18 @@
     <version>0.2.0-SNAPSHOT</version>
     <build>
         <plugins>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <excludes>
+                        <exclude>org/apache/hise/dao/Transactional.class</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+
+
             <plugin>
                 <artifactId>maven-dependency-plugin</artifactId>
                 <executions>
@@ -46,36 +58,36 @@
                 </executions>
             </plugin>
 
-      <plugin>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>openjpa-enhancer</id>
-            <phase>process-classes</phase>
-            <goals>
-              <goal>run</goal>
-            </goals>
-            <configuration>
-              <tasks>
-                <property name="maven.runtime.classpath" refid="maven.compile.classpath"/>
-                <path id="classpath">
-		   <pathelement path="${maven.runtime.classpath}"/>
-		</path>
-		<taskdef name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask" classpathref="classpath"/>
-                <openjpac>
-		    <fileset dir="${basedir}/src/main">
-                <include name="org/apache/hise/dao/*.java" />
-		    </fileset>
-		    <classpath>
-		     <pathelement location="${basedir}/target/classes"/>
-		     <pathelement path="${maven.runtime.classpath}"/>
-		    </classpath>
-		 </openjpac>
-              </tasks>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
+            <plugin>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>openjpa-enhancer</id>
+                        <phase>process-classes</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <tasks>
+                                <property name="maven.runtime.classpath" refid="maven.compile.classpath"/>
+                                <path id="classpath">
+                                    <pathelement path="${maven.runtime.classpath}"/>
+                                </path>
+                                <taskdef name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask" classpathref="classpath"/>
+                                <openjpac>
+                                    <fileset dir="${basedir}/src/main">
+                                        <include name="org/apache/hise/dao/*.java" />
+                                    </fileset>
+                                    <classpath>
+                                        <pathelement location="${basedir}/target/classes"/>
+                                        <pathelement path="${maven.runtime.classpath}"/>
+                                    </classpath>
+                                </openjpac>
+                            </tasks>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
     <profiles>
@@ -123,6 +135,17 @@
     </profiles>
     <dependencies>
         <dependency>
+            <groupId>javax.inject</groupId>
+            <artifactId>javax.inject</artifactId>
+            <version>1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jpa_3.0_spec</artifactId>
+            <version>1.1.1</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-log4j12</artifactId>
             <version>1.5.2</version>
@@ -173,156 +196,81 @@
             <version>2.1</version>
         </dependency>
         <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-context</artifactId>
-            <version>${spring.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-core</artifactId>
-            <version>${spring.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-tx</artifactId>
-            <version>${spring.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-aop</artifactId>
-            <version>${spring.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-aspects</artifactId>
-            <version>${spring.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-jdbc</artifactId>
-            <version>${spring.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-orm</artifactId>
-            <version>${spring.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-beans</artifactId>
-            <version>${spring.version}</version>
-        </dependency>
-        <dependency>
             <groupId>com.sun.xml.bind</groupId>
             <artifactId>jaxb-impl</artifactId>
             <version>2.1.9</version>
             <scope>runtime</scope>
         </dependency>
         <dependency>
-            <groupId>jdepend</groupId>
-            <artifactId>jdepend</artifactId>
-            <version>2.9.1</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
             <groupId>javax.xml.soap</groupId>
             <artifactId>saaj-api</artifactId>
             <version>1.3</version>
         </dependency>
         <dependency>
-        	<groupId>xerces</groupId>
-        	<artifactId>xercesImpl</artifactId>
-        	<version>2.9.0</version>
-        </dependency>
-        <!-- 
-        <dependency>
-        	<groupId>org.apache.ws.security</groupId>
-        	<artifactId>wss4j</artifactId>
-        	<version>1.5.4</version>
+            <groupId>xerces</groupId>
+            <artifactId>xercesImpl</artifactId>
+            <version>2.9.0</version>
+        </dependency>
+        <!--
+        <dependency>
+                <groupId>org.apache.ws.security</groupId>
+                <artifactId>wss4j</artifactId>
+                <version>1.5.4</version>
         </dependency>
          -->
+         
         <dependency>
-          <groupId>org.apache.cxf</groupId>
-          <artifactId>cxf-rt-ws-security</artifactId>
-          <version>${cxf.version}</version>
-        </dependency>
-        <dependency>
-          <groupId>org.apache.cxf</groupId>
-          <artifactId>cxf-rt-frontend-jaxws</artifactId>
-          <version>${cxf.version}</version>
-        </dependency>
-        <dependency>
-        	<groupId>net.sf.saxon</groupId>
-        	<artifactId>saxon</artifactId>
-        	<version>9.1.0.8</version>
-        </dependency>
-        <dependency>
-        	<groupId>net.sf.saxon</groupId>
-        	<artifactId>saxon-dom</artifactId>
-        	<version>9.1.0.8</version>
-        </dependency>
-        <dependency>
-          <groupId>net.sf.saxon</groupId>
-          <artifactId>saxon-xpath</artifactId>
-          <version>9.1.0.8</version>
-        </dependency>
-        <dependency>
-          <groupId>net.sf.saxon</groupId>
-          <artifactId>saxon-xqj</artifactId>
-          <version>9.1.0.8</version>
-        </dependency>
-        <dependency>
-        	<groupId>xerces</groupId>
-        	<artifactId>xercesImpl</artifactId>
-        	<version>2.9.1</version>
-        	<type>jar</type>
-        	<scope>compile</scope>
-        </dependency>
-        <dependency>
-        	<groupId>org.apache.openjpa</groupId>
-        	<artifactId>openjpa</artifactId>
-        	<version>1.2.1</version>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-ws-security</artifactId>
+            <version>${cxf.version}</version>
         </dependency>
-        
+        <!--
         <dependency>
-            <groupId>com.h2database</groupId>
-            <artifactId>h2</artifactId>
-            <version>1.1.108</version>
-            <scope>test</scope>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-jaxws</artifactId>
+            <version>${cxf.version}</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>asm</artifactId>
+                    <groupId>asm</groupId>
+                </exclusion>
+            </exclusions>
         </dependency>
+        -->
         <dependency>
-            <groupId>javax.annotation</groupId>
-            <artifactId>jsr250-api</artifactId>
-            <version>1.0</version>
-            <scope>test</scope>
+            <groupId>net.sf.saxon</groupId>
+            <artifactId>saxon</artifactId>
+            <version>9.1.0.8</version>
         </dependency>
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
+            <groupId>net.sf.saxon</groupId>
+            <artifactId>saxon-dom</artifactId>
+            <version>9.1.0.8</version>
         </dependency>
         <dependency>
-            <groupId>org.jmock</groupId>
-            <artifactId>jmock</artifactId>
-            <scope>test</scope>
+            <groupId>net.sf.saxon</groupId>
+            <artifactId>saxon-xpath</artifactId>
+            <version>9.1.0.8</version>
         </dependency>
         <dependency>
-            <groupId>org.jmock</groupId>
-            <artifactId>jmock-legacy</artifactId>
-            <scope>test</scope>
+            <groupId>net.sf.saxon</groupId>
+            <artifactId>saxon-xqj</artifactId>
+            <version>9.1.0.8</version>
         </dependency>
         <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-test</artifactId>
-            <version>${spring.version}</version>
-            <scope>test</scope>
+            <groupId>xerces</groupId>
+            <artifactId>xercesImpl</artifactId>
+            <version>2.9.1</version>
+            <type>jar</type>
+            <scope>compile</scope>
         </dependency>
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-            <version>${log4j.version}</version>
-            <scope>test</scope>
+            <groupId>org.apache.openjpa</groupId>
+            <artifactId>openjpa</artifactId>
+            <version>1.2.1</version>
+            <scope>compile</scope>
         </dependency>
-        
+
     </dependencies>
 </project>
+

Modified: incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/api/HISEEngine.java
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/api/HISEEngine.java?rev=959359&r1=959358&r2=959359&view=diff
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/api/HISEEngine.java (original)
+++ incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/api/HISEEngine.java Wed Jun 30 16:06:35 2010
@@ -20,6 +20,6 @@ public interface HISEEngine {
     void registerTask(TaskInfo ti);
 
     Node receive(Handler handler, QName portType, String operation, Element body, Node requestHeader);
-
+    
     HISEDao getHiseDao();
 }

Modified: incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/HISEDao.java
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/HISEDao.java?rev=959359&r1=959358&r2=959359&view=diff
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/HISEDao.java (original)
+++ incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/HISEDao.java Wed Jun 30 16:06:35 2010
@@ -22,119 +22,32 @@ package org.apache.hise.dao;
 import java.util.Date;
 import java.util.List;
 
-import javax.persistence.EntityManager;
-import javax.persistence.PersistenceException;
-import javax.persistence.Query;
-
-import org.apache.commons.lang.Validate;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.hise.dao.JpaQueryBuilder.JQBParam;
-import org.springframework.orm.jpa.JpaCallback;
-import org.springframework.orm.jpa.support.JpaDaoSupport;
+
 
 /**
  * DAO.
  * 
  */
-public class HISEDao extends JpaDaoSupport {
-
-    private static final Log log = LogFactory.getLog(HISEDao.class);
+public interface HISEDao {
 
-    public OrgEntity getOrgEntity(final String name) {
-        return (OrgEntity) getJpaTemplate().execute(new JpaCallback() {
-            public Object doInJpa(EntityManager em) throws PersistenceException {
-                Query query = em.createQuery("FROM OrgEntity o WHERE o.name = :name");
-                query.setParameter("name", name);
-                return query.getSingleResult();
-            }
-        });
-    }
+   
+    public OrgEntity getOrgEntity(final String name);
     
     /**
      * Returns tasks presented to user based on TaskQuery criteria.
      * @param query
      * @return
      */
-    public List<Task> getUserTasks(final TaskQuery query) {
-        
-        Validate.notNull(query);
-        
-        switch (query.getGenericHumanRole()) {
-        case ACTUALOWNER:
-            return (List<Task>) getJpaTemplate().executeFind(new JpaCallback() {
-                public Object doInJpa(EntityManager em) throws PersistenceException {
-                    
-                    Validate.notNull(em);
-                    
-                    return em.createQuery("select distinct t from Task t where t.actualOwner = :user order by t.id")
-                    .setParameter("user", query.getUser())
-                    .setMaxResults(query.getMaxTasks())
-                    .getResultList();
-                }
-            });
-
-        case POTENTIALOWNERS:
-        case BUSINESSADMINISTRATORS:
-        case EXCLUDEDOWNERS:
-            return (List<Task>) getJpaTemplate().executeFind(new JpaCallback() {
-                public Object doInJpa(EntityManager em) throws PersistenceException {
-                    
-                    Validate.notNull(em);
-                    
-                    return new JpaQueryBuilder().buildQuery(em, 
-                            new Object[] {
-                            "select distinct t from Task t, TaskOrgEntity e where e.task = t and (e.name = :user and e.type = :constUser",
-                            new JQBParam("user", query.getUser()),
-                            new JQBParam("constUser", TaskOrgEntity.OrgEntityType.USER),
-                            new JQBParam("groups", query.getUserGroups(), 
-                                new Object[] {
-                                    " or e.name in (:groups) and e.type = :constGroup", 
-                                    new JQBParam("constGroup", TaskOrgEntity.OrgEntityType.GROUP)
-                                }),
-                            ") and e.genericHumanRole = :role order by t.id",
-                            new JQBParam("role", query.getGenericHumanRole())
-                    })
-                    .setMaxResults(query.getMaxTasks())
-                    .getResultList();
-                }
-            });
-            
-        default:
-            throw new IllegalStateException("generic human role not supported");
-        }
-    }
+    public List<Task> getUserTasks(final TaskQuery query);
     
-    public List<Job> listJobs(final Date until, final int maxResult) {
-        return (List<Job>) getJpaTemplate().executeFind(new JpaCallback() {
-            public Object doInJpa(EntityManager em) throws PersistenceException {
-                return em.createQuery("select j from Job j where j.fire < :until order by j.fire")
-                .setParameter("until", until)
-                .setMaxResults(maxResult)
-                .getResultList();
-            }
-        });
-    }
-
-    public <T> T find(Class<T> what, Object id) {
-        return getJpaTemplate().find(what, id);
-    }
+    public List<Job> listJobs(final Date until, final int maxResult);
+
+    public <T extends JpaBase> T find(Class<T> what, Object id);
     
-    public void remove(Object o) {
-        getJpaTemplate().remove(o);
-        getJpaTemplate().flush();
-    }
-
-    public void persist(Object o) {
-        getJpaTemplate().persist(o);
-        getJpaTemplate().flush();
-    }
+    public <T extends JpaBase>void remove(T o);
+
+    public <T extends JpaBase> void persist(T o);
     
-    public <T> void clearAllRecords(Class<T> clazz) {
-        log.debug("select t from " + clazz.getName());
-        for (Object o : getJpaTemplate().find("select t from " + clazz.getName() + " t")) {
-            getJpaTemplate().remove(o);
-        }
-    }
+    public <T extends JpaBase> void clearAllRecords(Class<T> clazz);
 
 }

Added: incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/HISEDaoImpl.java
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/HISEDaoImpl.java?rev=959359&view=auto
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/HISEDaoImpl.java (added)
+++ incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/HISEDaoImpl.java Wed Jun 30 16:06:35 2010
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hise.dao;
+
+import java.util.Date;
+import java.util.List;
+
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.persistence.Query;
+
+import org.apache.commons.lang.Validate;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hise.dao.JpaQueryBuilder.JQBParam;
+
+/**
+ * DAO.
+ * 
+ */
+@Transactional
+public class HISEDaoImpl implements HISEDao {
+
+    private static final Log log = LogFactory.getLog(HISEDaoImpl.class);
+
+    @PersistenceContext(name="org.apache.hise")
+    public EntityManager em;
+
+    public OrgEntity getOrgEntity(final String name) {
+                Query query = em.createQuery("FROM OrgEntity o WHERE o.name = :name");
+                query.setParameter("name", name);
+                return (OrgEntity)query.getSingleResult();
+    }
+    
+    /**
+     * Returns tasks presented to user based on TaskQuery criteria.
+     * @param query
+     * @return
+     */
+    public List<Task> getUserTasks(final TaskQuery query) {
+        
+        Validate.notNull(query);
+        
+        switch (query.getGenericHumanRole()) {
+        case ACTUALOWNER:
+            return (List<Task>)em.createQuery("select distinct t from Task t where t.actualOwner = :user order by t.id")
+                    .setParameter("user", query.getUser())
+                    .setMaxResults(query.getMaxTasks())
+                    .getResultList();
+            
+        case POTENTIALOWNERS:
+        case BUSINESSADMINISTRATORS:
+        case EXCLUDEDOWNERS:
+            return (List<Task>) new JpaQueryBuilder().buildQuery(em, 
+                            new Object[] {
+                            "select distinct t from Task t, TaskOrgEntity e where e.task = t and (e.name = :user and e.type = :constUser",
+                            new JQBParam("user", query.getUser()),
+                            new JQBParam("constUser", TaskOrgEntity.OrgEntityType.USER),
+                            new JQBParam("groups", query.getUserGroups(), 
+                                new Object[] {
+                                    " or e.name in (:groups) and e.type = :constGroup", 
+                                    new JQBParam("constGroup", TaskOrgEntity.OrgEntityType.GROUP)
+                                }),
+                            ") and e.genericHumanRole = :role order by t.id",
+                            new JQBParam("role", query.getGenericHumanRole())
+                    })
+                    .setMaxResults(query.getMaxTasks())
+                    .getResultList();
+            
+        default:
+            throw new IllegalStateException("generic human role not supported");
+        }
+    }
+    
+    public List<Job> listJobs(final Date until, final int maxResult) {
+        return (List<Job>) em.createQuery("select j from Job j where j.fire < :until order by j.fire")
+                .setParameter("until", until)
+                .setMaxResults(maxResult)
+                .getResultList();
+    }
+
+    public <T extends JpaBase> T find(Class<T> what, Object id) {
+        return em.find(what, id);
+    }
+    
+    public <T extends JpaBase> void remove(T o) {
+        em.remove(o);
+        em.flush();
+    }
+
+    public <T extends JpaBase> void persist(T o) {
+        em.persist(o);
+        em.flush();
+    }
+    
+    public <T extends JpaBase> void clearAllRecords(Class<T> clazz) {
+        log.debug("select t from " + clazz.getName());
+        for (Object o : em.createQuery("select t from " + clazz.getName() + " t").getResultList()) {
+            em.remove(o);
+        }
+    }
+
+}

Modified: incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/JpaBase.java
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/JpaBase.java?rev=959359&r1=959358&r2=959359&view=diff
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/JpaBase.java (original)
+++ incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/JpaBase.java Wed Jun 30 16:06:35 2010
@@ -27,9 +27,7 @@ import javax.persistence.MappedSuperclas
 
 import org.apache.commons.lang.builder.HashCodeBuilder;
 import org.apache.commons.lang.builder.ToStringBuilder;
-import org.springframework.beans.factory.annotation.Configurable;
 
-@Configurable
 @MappedSuperclass
 public abstract class JpaBase {
 

Modified: incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/Task.java
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/Task.java?rev=959359&r1=959358&r2=959359&view=diff
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/Task.java (original)
+++ incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/Task.java Wed Jun 30 16:06:35 2010
@@ -46,7 +46,6 @@ import javax.xml.namespace.QName;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.springframework.beans.factory.annotation.Configurable;
 
 
 /**
@@ -59,7 +58,6 @@ import org.springframework.beans.factory
  */
 @Entity
 @Table(name = "TASK")
-@Configurable(preConstruction = true)
 public class Task extends JpaBase {
 
     private final Log log = LogFactory.getLog(Task.class);

Added: incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/Transactional.java
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/Transactional.java?rev=959359&view=auto
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/Transactional.java (added)
+++ incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/dao/Transactional.java Wed Jun 30 16:06:35 2010
@@ -0,0 +1,26 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.apache.hise.dao;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * This is a place holder annotation that will not be packaged in the final
+ * distribution. It is expected that this annotation will be annotated with
+ * container specific metadata indicating that any class or method annotated
+ * with this annotation should be be invoked in a transactional context. In
+ * Spring this would involve adding the @Transactional Spring annotation below
+ *
+ *
+ */
+@Target({ElementType.TYPE,ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Transactional {
+
+}

Modified: incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/DefaultHISEUserDetails.java
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/DefaultHISEUserDetails.java?rev=959359&r1=959358&r2=959359&view=diff
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/DefaultHISEUserDetails.java (original)
+++ incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/DefaultHISEUserDetails.java Wed Jun 30 16:06:35 2010
@@ -21,6 +21,7 @@ package org.apache.hise.engine;
 
 import java.util.ArrayList;
 import java.util.Collection;
+import javax.inject.Inject;
 
 import org.apache.commons.lang.Validate;
 import org.apache.hise.api.HISEUserDetails;
@@ -32,6 +33,7 @@ import org.apache.hise.dao.TaskOrgEntity
  * Default implementation serves user details from HISE DAO
  */
 public class DefaultHISEUserDetails implements HISEUserDetails {
+    @Inject
     private HISEDao hiseDao;
     
     public void setHiseDao(HISEDao hiseDao) {

Modified: incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/HISEEngineImpl.java
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/HISEEngineImpl.java?rev=959359&r1=959358&r2=959359&view=diff
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/HISEEngineImpl.java (original)
+++ incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/HISEEngineImpl.java Wed Jun 30 16:06:35 2010
@@ -40,6 +40,7 @@ import javax.xml.namespace.QName;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import javax.inject.Inject;
 
 public class HISEEngineImpl implements HISEEngine {
 
@@ -48,9 +49,11 @@ public class HISEEngineImpl implements H
     public final Map<String, QName> tasksMap = new HashMap<String, QName>();
     public final Map<QName, TaskInfo> tasks = new HashMap<QName, TaskInfo>();
 
+    @Inject
     private HISEDao hiseDao;
+    @Inject
     private HISEUserDetails hiseUserDetails;
-    
+    @Inject
     private HISEScheduler hiseScheduler;
     
     public HISEDao getHiseDao() {
@@ -84,7 +87,7 @@ public class HISEEngineImpl implements H
     }
     
     public static String tasksKey(Handler handler, QName portType, String operation) {
-        return "" + System.identityHashCode(handler) + ";" + getCanonicalQName(portType) + ";" + operation; 
+        return "" + handler.getId() + ";" + getCanonicalQName(portType) + ";" + operation;
     }
 
     public void registerTask(TaskInfo ti) {
@@ -132,9 +135,9 @@ public class HISEEngineImpl implements H
         TaskDefinition def = getTaskDefinition(taskName);
         Task t;
         if (def.isNotification()) {
-            t = Task.createNotification(this, getTaskDefinition(taskName), createdBy, DOMUtils.getFirstElement(body), requestHeader);
+            t = Task.createNotification(this, getTaskDefinition(taskName), createdBy, body, requestHeader);
         } else {
-            t = Task.create(this, getTaskDefinition(taskName), createdBy, DOMUtils.getFirstElement(body), requestHeader);
+            t = Task.create(this, getTaskDefinition(taskName), createdBy, body, requestHeader);
         }
         return t.getTaskEvaluator().evaluateApproveResponseHeader();
     }

Modified: incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/HISEPasswordCallback.java
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/HISEPasswordCallback.java?rev=959359&r1=959358&r2=959359&view=diff
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/HISEPasswordCallback.java (original)
+++ incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/HISEPasswordCallback.java Wed Jun 30 16:06:35 2010
@@ -20,6 +20,7 @@
 package org.apache.hise.engine;
 
 import java.io.IOException;
+import javax.inject.Inject;
 
 import javax.security.auth.callback.Callback;
 import javax.security.auth.callback.CallbackHandler;
@@ -33,7 +34,7 @@ import org.apache.ws.security.WSPassword
  * @author Rafał Rusin
  */
 public class HISEPasswordCallback implements CallbackHandler {
-    
+    @Inject
     private HISEUserDetails hiseUserDetails;
     
     public void setHiseUserDetails(HISEUserDetails hiseUserDetails) {

Modified: incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/HISEScheduler.java
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/HISEScheduler.java?rev=959359&r1=959358&r2=959359&view=diff
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/HISEScheduler.java (original)
+++ incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/HISEScheduler.java Wed Jun 30 16:06:35 2010
@@ -16,109 +16,19 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package org.apache.hise.engine;
 
-import java.util.Calendar;
 import java.util.Date;
-import java.util.List;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.TimeUnit;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 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;
 
 /**
  * 
  * @author Rafał Rusin
  */
-public class HISEScheduler {
-    
-    private static final Log log = LogFactory.getLog(HISEScheduler.class);
-    
-    private HISEEngineImpl hiseEngine;
-    private ScheduledExecutorService executor;
-    private PlatformTransactionManager transactionManager;
-    
-    public void setTransactionManager(PlatformTransactionManager transactionManager) {
-        this.transactionManager = transactionManager;
-    }
-
-    private class CheckJobs implements Runnable {
-
-        public void run() {
-            final Date currentEventDateTime = Calendar.getInstance().getTime();
-            log.debug("scheduler CheckJobs at " + currentEventDateTime);
-            try {
-                TransactionTemplate tt = new TransactionTemplate(transactionManager);
-                List<Job> jobs = (List<Job>) tt.execute(new TransactionCallback() {
-                    public Object doInTransaction(TransactionStatus ts) {
-                        return hiseEngine.getHiseDao().listJobs(currentEventDateTime, 50);
-                    }
-                });
-                
-                log.debug("dequeued jobs: " + jobs);
-    
-                for (Job j : jobs) {
-                    try {
-                        final Long j2 = j.getId();
-                        tt.execute(new TransactionCallback() {
-    
-                            public Object doInTransaction(TransactionStatus ts) {
-                                Job j3 = hiseEngine.getHiseDao().find(Job.class, j2); 
-                                if (j3 == null) {
-                                    log.debug("Skipping job " + j3 + " - it's no longer id DB");
-                                } else {
-                                    log.debug("Executing job " + j3);
-                                    hiseEngine.executeJob(j3);
-                                    hiseEngine.getHiseDao().remove(j3);
-                                }
-                                return null;
-                            }
-                            
-                        });
-                    } catch (Throwable t) {
-                        log.warn("Job execution failed " + j, t);
-                    }
-                }
-            } catch (Throwable t) {
-                log.warn("CheckJobs failed", t);
-            }
-        }
-    }
-    
-    public void init() {
-        executor = Executors.newSingleThreadScheduledExecutor();
-        executor.scheduleWithFixedDelay(new CheckJobs(), 1000, 1000, TimeUnit.MILLISECONDS);
-    }
-    
-    
-    public HISEEngineImpl getHiseEngine() {
-        return hiseEngine;
-    }
+public interface HISEScheduler {
 
-    public void setHiseEngine(HISEEngineImpl hiseEngine) {
-        this.hiseEngine = hiseEngine;
-    }
-    
-    public Job createJob(Date when, String action, Task task) {
-        Job job = new Job();
-        job.setFire(when);
-        job.setTask(task);
-        job.setAction(action);
-        hiseEngine.getHiseDao().persist(job);
-        return job;
-    }
-    
+    public Job createJob(Date when, String action, Task task);
 
-    public void destroy() {
-        executor.shutdown();
-    }
 }

Added: incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/HISESchedulerImpl.java
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/HISESchedulerImpl.java?rev=959359&view=auto
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/HISESchedulerImpl.java (added)
+++ incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/HISESchedulerImpl.java Wed Jun 30 16:06:35 2010
@@ -0,0 +1,144 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.hise.engine;
+
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.inject.Inject;
+import javax.inject.Provider;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hise.dao.HISEDao;
+import org.apache.hise.dao.Job;
+import org.apache.hise.dao.Task;
+import org.apache.hise.dao.Transactional;
+
+/**
+ * 
+ * @author Rafał Rusin
+ */
+public class HISESchedulerImpl implements HISEScheduler {
+
+    private static final Log log = LogFactory.getLog(HISESchedulerImpl.class);
+    @Inject
+    private JobExecutor jobExecutor;
+    private ScheduledExecutorService executor;
+
+    public static interface JobExecutor extends Runnable {
+        public Job createJob(Date when, String action, Task task);
+    }
+
+    @Transactional
+    public static class JobExecutorImpl implements JobExecutor {
+
+        @Inject
+        private HISEDao hiseDao;
+        @Inject
+        private Provider<JobTask> jobTaskBuilder;
+
+        public void run() {
+            final Date currentEventDateTime = Calendar.getInstance().getTime();
+            HISESchedulerImpl.log.debug("scheduler CheckJobs at " + currentEventDateTime);
+            try {
+                List<Job> jobs = hiseDao.listJobs(currentEventDateTime, 50);
+                HISESchedulerImpl.log.debug("dequeued jobs: " + jobs);
+                for (Job j : jobs) {
+                    try {
+                        final Long j2 = j.getId();
+                        JobTask task = jobTaskBuilder.get();
+                        task.execute(j2);
+                    } catch (Throwable t) {
+                        HISESchedulerImpl.log.warn("Job execution failed " + j, t);
+                    }
+                }
+            } catch (Throwable t) {
+                HISESchedulerImpl.log.warn("CheckJobs failed", t);
+            }
+        }
+
+        public Job createJob(Date when, String action, Task task) {
+            Job job = new Job();
+            job.setFire(when);
+            job.setTask(task);
+            job.setAction(action);
+            hiseDao.persist(job);
+            return job;
+        }
+
+        public void setHiseDao(HISEDao hiseDao) {
+            this.hiseDao = hiseDao;
+        }
+
+        public void setJobTaskBuilder(Provider<JobTask> jobTaskBuilder) {
+            this.jobTaskBuilder = jobTaskBuilder;
+        }
+    }
+
+    public static interface JobTask {
+        public void execute(Long jobId);
+    }
+
+    @Transactional
+    public static class JobTaskImpl implements JobTask {
+
+        @Inject
+        private HISEEngineImpl hiseEngine;
+
+        public void execute(Long jobId) {
+            Job j3 = hiseEngine.getHiseDao().find(Job.class, jobId);
+            if (j3 == null) {
+                HISESchedulerImpl.log.debug("Skipping job " + j3 + " - it\'s no longer id DB");
+            } else {
+                HISESchedulerImpl.log.debug("Executing job " + j3);
+                hiseEngine.executeJob(j3);
+                hiseEngine.getHiseDao().remove(j3);
+            }
+        }
+
+        public void setHiseEngine(HISEEngineImpl hiseEngine) {
+            this.hiseEngine = hiseEngine;
+        }
+    }
+
+    @PostConstruct
+    public void init() {
+        executor = Executors.newSingleThreadScheduledExecutor();
+        executor.scheduleWithFixedDelay(jobExecutor, 1000, 1000, TimeUnit.MILLISECONDS);
+    }
+
+    public void setJobExecutor(JobExecutor jobExecutor) {
+        this.jobExecutor = jobExecutor;
+    }
+
+    public Job createJob(Date when, String action, Task task) {
+        return jobExecutor.createJob(when, action, task);
+    }
+
+    @PreDestroy
+    public void destroy() {
+        executor.shutdown();
+    }
+}

Added: incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/JobExecutor.java
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/JobExecutor.java?rev=959359&view=auto
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/JobExecutor.java (added)
+++ incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/JobExecutor.java Wed Jun 30 16:06:35 2010
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hise.engine;
+
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Provider;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hise.dao.HISEDao;
+import org.apache.hise.dao.Job;
+import org.apache.hise.dao.Task;
+import org.apache.hise.dao.Transactional;
+
+

Added: incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/JobTask.java
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/JobTask.java?rev=959359&view=auto
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/JobTask.java (added)
+++ incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/JobTask.java Wed Jun 30 16:06:35 2010
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hise.engine;
+
+import javax.inject.Inject;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hise.dao.Job;
+import org.apache.hise.dao.Transactional;
+

Modified: incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSClient.java
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSClient.java?rev=959359&r1=959358&r2=959359&view=diff
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSClient.java (original)
+++ incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSClient.java Wed Jun 30 16:06:35 2010
@@ -22,7 +22,6 @@ package org.apache.hise.engine.jaxws;
 import org.apache.commons.lang.Validate;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.cxf.jaxws.spi.ProviderImpl;
 import org.apache.hise.api.Sender;
 import org.apache.hise.utils.XQueryEvaluator;
 import org.w3c.dom.Document;
@@ -34,9 +33,10 @@ import javax.xml.soap.SOAPException;
 import javax.xml.soap.SOAPMessage;
 import javax.xml.ws.Dispatch;
 import javax.xml.ws.Service;
-import javax.xml.ws.spi.ServiceDelegate;
 import java.net.URL;
 import java.util.Iterator;
+import javax.annotation.PostConstruct;
+import org.apache.hise.dao.Transactional;
 
 
 public class HISEJaxWSClient implements Sender {
@@ -48,15 +48,15 @@ public class HISEJaxWSClient implements 
     URL wsdlDocumentLocation;
     QName serviceName;
     
-    private ServiceDelegate destinationService;
+    private Service destinationService;
     private QName destinationPort;
     private XQueryEvaluator evaluator = new XQueryEvaluator();
-    
+
+    @PostConstruct
     public void init() throws Exception {
+        evaluator.declareNamespace("wsa", "http://www.w3.org/2005/08/addressing");
         messageFactory = MessageFactory.newInstance();
-        javax.xml.ws.spi.Provider provider = new ProviderImpl();
-        destinationService = provider.createServiceDelegate(wsdlDocumentLocation, serviceName, Service.class);
-//        destinationService = Service.create(wsdlDocumentLocation, serviceName);
+        destinationService = Service.create(wsdlDocumentLocation, serviceName);
         destinationPort = null;
         {
             Iterator<QName> it = destinationService.getPorts();
@@ -78,9 +78,10 @@ public class HISEJaxWSClient implements 
     }
 
     public String getAddressFromEpr(Node epr) {
-        return (String) evaluator.evaluateExpression("declare namespace wsa=\"http://www.w3.org/2005/08/addressing\"; string(wsa:EndpointReference/wsa:Address)", epr).get(0);
+        return (String) evaluator.evaluateExpression("string(wsa:EndpointReference/wsa:Address)", epr).get(0);
     }
 
+    @Transactional
     public Node invoke(Node message, Node epr) {
         try {            
             

Modified: incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSService.java
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSService.java?rev=959359&r1=959358&r2=959359&view=diff
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSService.java (original)
+++ incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSService.java Wed Jun 30 16:06:35 2010
@@ -19,60 +19,45 @@
 
 package org.apache.hise.engine.jaxws;
 
-import javax.annotation.Resource;
-import javax.persistence.EntityManager;
-import javax.persistence.PersistenceException;
-import javax.xml.namespace.QName;
-import javax.xml.soap.MessageFactory;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.ws.Provider;
-import javax.xml.ws.Service;
-import javax.xml.ws.ServiceMode;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.WebServiceProvider;
-import javax.xml.ws.handler.MessageContext;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hise.api.HISEEngine;
 import org.apache.hise.api.Handler;
-import org.apache.hise.engine.HISEEngineImpl;
-import org.springframework.orm.jpa.JpaCallback;
-import org.springframework.orm.jpa.JpaTemplate;
-import org.springframework.orm.jpa.JpaTransactionManager;
-import org.springframework.transaction.PlatformTransactionManager;
-import org.springframework.transaction.TransactionStatus;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.transaction.support.TransactionCallback;
-import org.springframework.transaction.support.TransactionTemplate;
+import org.apache.hise.utils.DOMUtils;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
+import javax.annotation.Resource;
+import javax.inject.Inject;
+import javax.xml.namespace.QName;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.*;
+import javax.xml.ws.handler.MessageContext;
+import org.apache.hise.dao.Transactional;
+
 @WebServiceProvider
 @ServiceMode(value = Service.Mode.MESSAGE)
 public class HISEJaxWSService implements Provider<SOAPMessage>, Handler {
 
     private static Log __log = LogFactory.getLog(HISEJaxWSService.class);
 
+    @Inject
     private HISEEngine hiseEngine;
+    @Resource
     private WebServiceContext context;
-    private PlatformTransactionManager transactionManager;
     private MessageFactory messageFactory;
-    private TransactionTemplate transactionTemplate;
     
     private String id;
 
     public HISEJaxWSService() throws Exception {
         messageFactory = MessageFactory.newInstance();
     }
-
-    public void init() {
-        transactionTemplate = new TransactionTemplate(transactionManager);
-    }
     
 	public String getId() {
-		return id;
+                return String.valueOf(System.identityHashCode(this));
+		//return id;
 	}
 
 //	public void setId(String id) {
@@ -87,18 +72,12 @@ public class HISEJaxWSService implements
         return context;
     }
 
-    public void setTransactionManager(PlatformTransactionManager transactionManager) {
-        this.transactionManager = transactionManager;
-    }
-
-    @Resource
     public void setContext(WebServiceContext context) {
         this.context = context;
     }
 
+    @Transactional
     public SOAPMessage invoke(final SOAPMessage request) {
-        return (SOAPMessage) transactionTemplate.execute(new TransactionCallback() {
-            public Object doInTransaction(TransactionStatus arg0) {
                 try {
                     // TransactionStatus tx = transactionManager.getTransaction(new DefaultTransactionDefinition());
 //                    assert transactionManager.isValidateExistingTransaction();
@@ -121,7 +100,5 @@ public class HISEJaxWSService implements
                 } catch (Exception e) {
                     throw new RuntimeException("Error during receiving message ", e);
                 }
-            }
-        });
     }
 }

Modified: incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsImpl.java
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsImpl.java?rev=959359&r1=959358&r2=959359&view=diff
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsImpl.java (original)
+++ incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsImpl.java Wed Jun 30 16:06:35 2010
@@ -24,6 +24,8 @@ import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
+import javax.annotation.Resource;
+import javax.inject.Inject;
 
 import javax.jws.WebService;
 import javax.xml.datatype.Duration;
@@ -35,6 +37,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hise.dao.GenericHumanRole;
 import org.apache.hise.dao.TaskQuery;
+import org.apache.hise.dao.Transactional;
 import org.apache.hise.engine.HISEEngineImpl;
 
 import org.apache.hise.engine.wsdl.IllegalAccessFault;
@@ -60,7 +63,6 @@ import org.apache.hise.lang.xsd.htdt.TTi
 import org.apache.hise.runtime.HiseIllegalAccessException;
 import org.apache.hise.runtime.HiseIllegalStateException;
 import org.apache.hise.runtime.Task;
-import org.springframework.transaction.annotation.Transactional;
 import org.w3c.dom.Node;
 
 /**
@@ -82,18 +84,14 @@ public class TaskOperationsImpl implemen
     
     private static final Log log = LogFactory.getLog(TaskOperationsImpl.class);
 
-    private HISEEngineImpl hiseEngine;
+    @Inject
+    HISEEngineImpl hiseEngine;
 
-    private WebServiceContext context;
+    @Resource
+    WebServiceContext context;
 
-    /**
-     * Sets up {@link WebServiceContext} used to lookup authenticated user
-     * performing operations.
-     * 
-     * @throws Exception
-     */
-    public void init() throws Exception {
-        context = (WebServiceContext) Class.forName("org.apache.cxf.jaxws.context.WebServiceContextImpl").newInstance();
+    public void setWebServiceContext(WebServiceContext context) {
+       this.context = context;
     }
 
     protected String getUserString() {

Modified: incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/store/HISEDD.java
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/store/HISEDD.java?rev=959359&r1=959358&r2=959359&view=diff
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/store/HISEDD.java (original)
+++ incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/store/HISEDD.java Wed Jun 30 16:06:35 2010
@@ -19,14 +19,17 @@
 
 package org.apache.hise.engine.store;
 
+import java.net.URL;
 import java.util.List;
-
-import org.springframework.core.io.Resource;
+import javax.annotation.Resource;
+import javax.inject.Inject;
 
 public class HISEDD {
 
+    @Inject
     private List<TaskDD> tasksDI;
-    private Resource humanInteractionsResource;
+    @Resource
+    private URL humanInteractionsResource;
 
     public List<TaskDD> getTasksDI() {
         return tasksDI;
@@ -36,11 +39,11 @@ public class HISEDD {
         this.tasksDI = tasksDI;
     }
 
-    public Resource getHumanInteractionsResource() {
+    public URL getHumanInteractionsResource() {
         return humanInteractionsResource;
     }
 
-    public void setHumanInteractionsResource(Resource humanInteractionsResource) {
+    public void setHumanInteractionsResource(URL humanInteractionsResource) {
         this.humanInteractionsResource = humanInteractionsResource;
     }
 }

Modified: incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/store/HISEDeployer.java
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/store/HISEDeployer.java?rev=959359&r1=959358&r2=959359&view=diff
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/store/HISEDeployer.java (original)
+++ incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/store/HISEDeployer.java Wed Jun 30 16:06:35 2010
@@ -19,20 +19,24 @@
 
 package org.apache.hise.engine.store;
 
+import javax.annotation.PostConstruct;
+import javax.inject.Inject;
 import org.apache.commons.lang.Validate;
 import org.apache.hise.api.HISEEngine;
-import org.apache.hise.engine.HISEEngineImpl;
 import org.apache.hise.lang.HumanInteractions;
 import org.apache.hise.lang.TaskDefinition;
 
 public class HISEDeployer {
+    @Inject
     public HISEEngine hiseEngine;
+    @Inject
     public HISEDD deploymentInfo;
-    
+
+    @PostConstruct
     public void init() throws CompileException {
         deploy(deploymentInfo);
     }
-    
+
     public void deploy(HISEDD di) throws CompileException {
         HumanInteractions tasks = HumanInteractionsCompiler.compile(di.getHumanInteractionsResource());
         

Modified: incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/store/HumanInteractionsCompiler.java
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/store/HumanInteractionsCompiler.java?rev=959359&r1=959358&r2=959359&view=diff
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/store/HumanInteractionsCompiler.java (original)
+++ incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/store/HumanInteractionsCompiler.java Wed Jun 30 16:06:35 2010
@@ -19,61 +19,79 @@
 
 package org.apache.hise.engine.store;
 
+import java.net.URI;
+import java.net.URL;
+import java.util.HashSet;
 import java.util.Map;
+import java.util.Set;
+import javax.wsdl.Definition;
+import javax.wsdl.PortType;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
 
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBElement;
 import javax.xml.bind.Unmarshaller;
 import javax.xml.namespace.QName;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 
 import org.apache.commons.lang.Validate;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hise.lang.HumanInteractions;
 import org.apache.hise.lang.TaskDefinition;
-import org.apache.hise.lang.xsd.htd.TGenericHumanRole;
 import org.apache.hise.lang.xsd.htd.THumanInteractions;
+import org.apache.hise.lang.xsd.htd.TImport;
 import org.apache.hise.lang.xsd.htd.TNotification;
 import org.apache.hise.lang.xsd.htd.TTask;
 import org.apache.hise.lang.xsd.htd.TTaskInterface;
-import org.apache.hise.utils.DOMUtils;
-import org.springframework.core.io.Resource;
-import org.w3c.dom.Document;
 
 public class HumanInteractionsCompiler {
-    private static final Log log = LogFactory.getLog(HumanInteractionsCompiler.class);
 
+    private final Log log = LogFactory.getLog(HumanInteractionsCompiler.class);
     private Map<String, String> xmlNamespaces;
 
     private HumanInteractionsCompiler() {
     }
 
-    public static HumanInteractions compile(Resource resource) throws CompileException {
+    public static HumanInteractions compile(URL resource) throws CompileException {
         Validate.notNull(resource, "Specified resource is null");
         try {
             HumanInteractionsCompiler c = new HumanInteractionsCompiler();
-            log.debug("compiling " + resource);
+            LogFactory.getLog(HumanInteractionsCompiler.class).debug("compiling " + resource);
             return c.compile2(resource);
         } catch (Exception e) {
             throw new CompileException("Compile error for " + resource, e);
         }
     }
 
-    private HumanInteractions compile2(Resource resource) throws Exception {
+    private HumanInteractions compile2(URL resource) throws Exception {
         Validate.notNull(resource);
 
-        Resource htdXml = resource;
+        URL htdXml = resource;
         THumanInteractions hiDoc;
         {
             JAXBContext jaxbContext = JAXBContext.newInstance("org.apache.hise.lang.xsd.htd");
             Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
-            DocumentBuilderFactory f = DOMUtils.getDocumentBuilderFactory();
-            f.setNamespaceAware(true);
-            DocumentBuilder b = f.newDocumentBuilder();
-            Document d = b.parse(htdXml.getInputStream());
-            hiDoc = ((JAXBElement<THumanInteractions>) unmarshaller.unmarshal(d)).getValue();
+            hiDoc = ((JAXBElement<THumanInteractions>) unmarshaller.unmarshal(htdXml.openStream())).getValue();
+        }
+
+        Set<Definition> definitions = new HashSet<Definition>();
+
+        for (TImport tImport : hiDoc.getImport()) {
+            if ("http://schemas.xmlsoap.org/wsdl/".equals(tImport.getImportType())) {
+                try {
+                    URI wsdl = new URI(tImport.getLocation());
+                    if (!wsdl.isAbsolute()){
+                      wsdl = htdXml.toURI().resolve(wsdl);
+                    }
+                    WSDLFactory wsdlf = WSDLFactory.newInstance();
+                    WSDLReader reader = wsdlf.newWSDLReader();
+                    Definition definition = reader.readWSDL(wsdl.toString());
+                    definitions.add(definition);
+                } catch (Exception ex) {
+                    log.error("Error during reading wsdl file.", ex);
+                }
+            }
         }
 
         HumanInteractions humanInteractions = new HumanInteractions();
@@ -82,12 +100,15 @@ public class HumanInteractionsCompiler {
             for (TTask tTask : hiDoc.getTasks().getTask()) {
                 TaskDefinition taskDefinition = new TaskDefinition(tTask, this.xmlNamespaces, hiDoc.getTargetNamespace());
                 taskDefinition.setTaskInterface(tTask.getInterface());
-                
+
                 QName name = taskDefinition.getTaskName();
                 if (humanInteractions.getTaskDefinitions().containsKey(name)) {
                     throw new RuntimeException("Duplicate task found, name: " + name + " resource: " + resource);
                 }
                 humanInteractions.getTaskDefinitions().put(name, taskDefinition);
+
+                QName portTypeName = taskDefinition.getTaskInterface().getPortType();
+                taskDefinition.setPortType(findPortType(portTypeName, definitions));
             }
         }
 
@@ -98,18 +119,31 @@ public class HumanInteractionsCompiler {
                 x.setOperation(tnote.getInterface().getOperation());
                 x.setPortType(tnote.getInterface().getPortType());
                 taskDefinition.setTaskInterface(x);
-                
+
                 QName name = taskDefinition.getTaskName();
                 if (humanInteractions.getTaskDefinitions().containsKey(name)) {
                     throw new RuntimeException("Duplicate task found, name: " + name + " resource: " + resource);
                 }
                 humanInteractions.getTaskDefinitions().put(name, taskDefinition);
+
+                QName portTypeName = taskDefinition.getTaskInterface().getPortType();
+                taskDefinition.setPortType(findPortType(portTypeName, definitions));
             }
         }
 
         return humanInteractions;
     }
 
+    private PortType findPortType(QName portTypeName, Set<Definition> definitions) {
+        for (Definition definition : definitions) {
+            PortType portType = (PortType) definition.getAllPortTypes().get(portTypeName);
+            if (portType != null) {
+                return portType;
+                }
+            }
+
+        throw new RuntimeException("PortType not found in definitions portType: " + portTypeName);
+    }
     // /**
     // * Creates HumanInteractions instance, passing DOM Document instance to its constructor.
     // *

Modified: incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/store/TaskDD.java
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/store/TaskDD.java?rev=959359&r1=959358&r2=959359&view=diff
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/store/TaskDD.java (original)
+++ incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/engine/store/TaskDD.java Wed Jun 30 16:06:35 2010
@@ -19,6 +19,8 @@
 
 package org.apache.hise.engine.store;
 
+import javax.annotation.Resource;
+import javax.inject.Inject;
 import org.apache.hise.api.Handler;
 import org.apache.hise.api.Sender;
 
@@ -26,8 +28,11 @@ import javax.xml.namespace.QName;
 
 public class TaskDD {
 
+    @Resource
     public QName taskName;
+    @Inject
     public Handler handler;
+    @Inject
     public Sender sender;
 
     public QName getTaskName() {

Modified: incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/lang/TaskDefinition.java
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/lang/TaskDefinition.java?rev=959359&r1=959358&r2=959359&view=diff
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/lang/TaskDefinition.java (original)
+++ incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/lang/TaskDefinition.java Wed Jun 30 16:06:35 2010
@@ -22,6 +22,7 @@ package org.apache.hise.lang;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
+import javax.wsdl.PortType;
 
 import javax.xml.namespace.QName;
 
@@ -68,6 +69,8 @@ public class TaskDefinition {
      */
     private Map<String, String> xmlNamespaces;
 
+    private PortType portType;
+
     // ==================== CONSTRUCTOR =========================
 
     public TaskDefinition(TTask taskDefinition, Map<String, String> xmlNamespaces, String targetNamespace) {
@@ -365,4 +368,13 @@ public class TaskDefinition {
     public TDeadlines getDeadlines() {
         return tTask.getDeadlines();
     }
+
+    public PortType getPortType() {
+        return portType;
+    }
+
+    public void setPortType(PortType portType) {
+        this.portType = portType;
+    }
+   
 }

Modified: incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/runtime/DeadlineController.java
URL: http://svn.apache.org/viewvc/incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/runtime/DeadlineController.java?rev=959359&r1=959358&r2=959359&view=diff
==============================================================================
--- incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/runtime/DeadlineController.java (original)
+++ incubator/hise/branches/0.2.x-experimental/hise-services/src/main/java/org/apache/hise/runtime/DeadlineController.java Wed Jun 30 16:06:35 2010
@@ -29,14 +29,12 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hise.dao.GenericHumanRole;
 import org.apache.hise.dao.Job;
-import org.apache.hise.dao.Message;
 import org.apache.hise.dao.TaskOrgEntity;
 import org.apache.hise.dao.Task.Status;
 import org.apache.hise.lang.xsd.htd.TDeadline;
 import org.apache.hise.lang.xsd.htd.TDeadlines;
 import org.apache.hise.lang.xsd.htd.TEscalation;
 import org.apache.hise.runtime.TaskEvaluator.EscalationResult;
-import org.apache.hise.utils.DOMUtils;
 import org.w3c.dom.Node;
 
 public class DeadlineController implements TaskStateListener {



Mime
View raw message