You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hise-commits@incubator.apache.org by rr...@apache.org on 2010/03/10 19:45:11 UTC

svn commit: r921529 [1/3] - in /incubator/hise/trunk: ./ hise-bundle/ hise-bundle/src/main/resources/META-INF/spring/ hise-karaf/ hise-karaf/src/ hise-karaf/src/main/ hise-karaf/src/main/resources/ hise-services/src/main/java/org/apache/hise/engine/ hi...

Author: rr
Date: Wed Mar 10 19:45:10 2010
New Revision: 921529

URL: http://svn.apache.org/viewvc?rev=921529&view=rev
Log:
Added hise karaf features, fixed scheduler runtime exception problem & verified installation under apache-servicemix-4.2.0-fuse-01-00

Added:
    incubator/hise/trunk/hise-karaf/
    incubator/hise/trunk/hise-karaf/pom.xml   (with props)
    incubator/hise/trunk/hise-karaf/src/
    incubator/hise/trunk/hise-karaf/src/main/
    incubator/hise/trunk/hise-karaf/src/main/resources/
    incubator/hise/trunk/hise-karaf/src/main/resources/features.xml   (with props)
Modified:
    incubator/hise/trunk/hise-bundle/pom.xml
    incubator/hise/trunk/hise-bundle/src/main/resources/META-INF/spring/hise-ds.xml
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEScheduler.java
    incubator/hise/trunk/hise-test-example-osgi/pom.xml
    incubator/hise/trunk/hise-test-example-osgi/src/main/resources/META-INF/spring/beans.xml
    incubator/hise/trunk/itest/hise-soapui-project.xml
    incubator/hise/trunk/pom.xml

Modified: incubator/hise/trunk/hise-bundle/pom.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-bundle/pom.xml?rev=921529&r1=921528&r2=921529&view=diff
==============================================================================
--- incubator/hise/trunk/hise-bundle/pom.xml (original)
+++ incubator/hise/trunk/hise-bundle/pom.xml Wed Mar 10 19:45:10 2010
@@ -115,6 +115,7 @@
                             META-INF.cxf.osgi,
                             org.apache.cxf.resource,
                             org.apache.cxf.binding.soap.spring,
+                            org.apache.cxf.ws.security.wss4j,
                             org.apache.cxf.jaxws.spi,
 
    org.springframework.osgi.config,
@@ -151,7 +152,7 @@ org.h2,
 			    net.sf.saxon*
                         <Embed-Dependency>saxon*,spring-orm,spring-jdbc,ojdbc5;scope=compile|runtime</Embed-Dependency>
                         -->
-                        <Embed-Dependency>h2,spring-orm,spring-jdbc,spring-aspects,hise-wsdl;scope=compile|runtime</Embed-Dependency>
+                        <Embed-Dependency>h2,spring-orm,spring-jdbc,spring-aspects,hise-wsdl;scope=compile|runtime;inline=**</Embed-Dependency>
                         <Embed-Transitive>true</Embed-Transitive>
                         <!--
                         -->

Modified: incubator/hise/trunk/hise-bundle/src/main/resources/META-INF/spring/hise-ds.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-bundle/src/main/resources/META-INF/spring/hise-ds.xml?rev=921529&r1=921528&r2=921529&view=diff
==============================================================================
--- incubator/hise/trunk/hise-bundle/src/main/resources/META-INF/spring/hise-ds.xml (original)
+++ incubator/hise/trunk/hise-bundle/src/main/resources/META-INF/spring/hise-ds.xml Wed Mar 10 19:45:10 2010
@@ -20,13 +20,34 @@
 <beans xmlns="http://www.springframework.org/schema/beans" 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xmlns:util="http://www.springframework.org/schema/util"
+xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
+xmlns:ctx="http://www.springframework.org/schema/context"
        
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
     http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
     http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
     http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
+http://www.springframework.org/schema/osgi-compendium http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd
     ">
 
+  <osgix:cm-properties id="preProps" persistent-id="org.apache.hise">
+        <prop key="openjpa.db">H2</prop>
+        <prop key="openjpa.dictionary">org.apache.openjpa.jdbc.sql.H2Dictionary</prop>
+        <prop key="openjpa.synchronizeMappings">buildSchema(ForeignKeys=true,SchemaAction='add')</prop>
+        <prop key="openjpa.generateDdl">true</prop>
+        <prop key="openjpa.showSql">true</prop>
+        <prop key="db.driver">org.h2.Driver</prop>
+        <prop key="db.url">jdbc:h2:file:hise-h2-db;DB_CLOSE_ON_EXIT=false</prop>
+        <prop key="db.user">sa</prop>
+        <prop key="db.password"></prop>
+        <prop key="db.maxActive">4</prop>
+        <prop key="db.maxIdle">0</prop>
+        <prop key="db.testOnBorrow">true</prop>
+  </osgix:cm-properties>
+
+  <ctx:property-placeholder properties-ref="preProps" />
+
+
     <bean id="htEntityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
         <property name="dataSource" ref="dataSource" />
         <property name="jpaPropertyMap" ref="jpaPropertyMap"/>
@@ -51,26 +72,34 @@
     
     <!-- OpenJPA H2 Driver -->
     <bean id="jpaVendorAdapter" class="org.apache.hise.dao.vendor.OpenJpaVendorAdapter">
-    <property name="database" value="H2"/>
-    <property name="databasePlatform" value="org.apache.openjpa.jdbc.sql.H2Dictionary"/>
-    <property name="generateDdl"    value="true" />
-    <property name="showSql"      value="false" />
+    <property name="database" value="${openjpa.db}"/>
+    <property name="databasePlatform" value="${openjpa.dictionary}"/>
+    <property name="generateDdl"    value="${openjpa.generateDdl}" />
+    <property name="showSql"      value="${openjpa.showSql}" />
     <property name="extProperties">
       <util:map>
-        <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true,SchemaAction='add')"/>
+        <entry key="openjpa.jdbc.SynchronizeMappings" value="${openjpa.synchronizeMappings}"/>
       </util:map>
     </property>
   </bean>
   
-<!--
   <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
-      <property name="driverClassName" value="org.h2.Driver" />
-      <property name="url" value="jdbc:h2:file:hise-h2-db;DB_CLOSE_ON_EXIT=false" />
-      <property name="username" value="sa" />
-      <property name="password">
-          <value></value>
-      </property>
+        <property name="driverClassName" value="${db.driver}" />
+        <property name="url" value="${db.url}"/>
+        <property name="username" value="${db.user}" />
+        <property name="password" value="${db.password}"/>
+        <property name="maxActive" value="${db.maxActive}"/>
+        <property name="maxIdle" value="${db.maxIdle}"/>
+        <property name="minIdle" value="${db.minIdle}"/>
+        <property name="testOnBorrow" value="${db.testOnBorrow}"/>
+        <property name="testWhileIdle" value="${db.testWhileIdle}"/>
+        <property name="timeBetweenEvictionRunsMillis" value="${db.timeBetweenEvictionRunsMillis}"/>
+        <!--
+        <property name="validationQuery" value="${db.validationQuery}"/>
+        -->
   </bean>
+<!--
+        <property name="validationQueryTimeout" value="${db.validationQueryTimeout}"/>
 -->
   <!--
     <bean id="dataSource" class="org.springframework.jdbc.datasource.SingleConnectionDataSource">
@@ -85,15 +114,13 @@
     </bean>
     -->
 
+    <!-- 
     <bean id="dataSource" class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
-        <property name="driverClass" value="org.h2.Driver" />
-        <property name="url" value="jdbc:h2:file:hise-h2-db;DB_CLOSE_ON_EXIT=false"/>
-        <property name="username" value="sa" />
-        <property name="password">
-            <value></value>
-        </property>
+        <property name="driverClass" value="${db.driver}" />
+        <property name="url" value="${db.url}"/>
+        <property name="username" value="${db.user}" />
+        <property name="password" value="${db.password}"/>
     </bean>
-    <!-- 
      -->
 
     <!-- Hibernate MySQL Driver

Added: incubator/hise/trunk/hise-karaf/pom.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-karaf/pom.xml?rev=921529&view=auto
==============================================================================
--- incubator/hise/trunk/hise-karaf/pom.xml (added)
+++ incubator/hise/trunk/hise-karaf/pom.xml Wed Mar 10 19:45:10 2010
@@ -0,0 +1,77 @@
+<?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.
+-->
+<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>
+    <groupId>org.apache.hise</groupId>
+    <artifactId>hise</artifactId>
+    <version>0.2.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>hise-karaf</artifactId>
+  <packaging>jar</packaging>
+
+  <build>
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <filtering>true</filtering>
+      </resource>
+    </resources>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <executions>
+           <execution>
+              <id>filter</id>
+              <phase>generate-resources</phase>
+              <goals>
+                <goal>resources</goal>
+              </goals>
+           </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+          <artifactId>build-helper-maven-plugin</artifactId>
+          <executions>
+            <execution>
+              <id>attach-artifacts</id>
+              <phase>package</phase>
+              <goals>
+                <goal>attach-artifact</goal>
+              </goals>
+              <configuration>
+                <artifacts>
+                  <artifact>
+                    <file>target/classes/features.xml</file>
+                     <type>xml</type>
+                     <classifier>features</classifier>
+                   </artifact>
+                 </artifacts>
+               </configuration>
+             </execution>
+         </executions>
+       </plugin>
+    </plugins>
+  </build>
+
+</project>

Propchange: incubator/hise/trunk/hise-karaf/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/hise/trunk/hise-karaf/src/main/resources/features.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-karaf/src/main/resources/features.xml?rev=921529&view=auto
==============================================================================
--- incubator/hise/trunk/hise-karaf/src/main/resources/features.xml (added)
+++ incubator/hise/trunk/hise-karaf/src/main/resources/features.xml Wed Mar 10 19:45:10 2010
@@ -0,0 +1,51 @@
+<?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.
+  -->
+<features>
+  <feature name="hise" version="${project.version}">
+    <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-dbcp/1.2.2_5</bundle>
+    <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.openjpa/1.2.1_2</bundle>
+    <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon/9.1.0.8_1-SNAPSHOT</bundle>
+    <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.serp/1.13.1_2</bundle>
+    <bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.java-persistence-api-1.1.1/1.4.0</bundle>
+    <bundle>mvn:org.apache.ws.security/wss4j/1.5.8</bundle>
+    <bundle>mvn:org.apache.cxf/cxf-rt-transports-http/2.2.6</bundle>
+    <bundle>mvn:org.apache.cxf/cxf-rt-transports-http-jetty/2.2.6</bundle>
+    <bundle>mvn:org.apache.hise/hise-bundle/${project.version}</bundle>
+  </feature>
+  <feature name="hise-h2" version="${project.version}">
+    <bundle>mvn:com.h2database/h2/1.1.117</bundle>
+    <feature version="${project.version}">hise</feature>
+  </feature>
+  <feature name="hise-sqlserver" version="${project.version}">
+    <bundle>wrap:mvn:com.microsoft.sqlserver/sqljdbc/1.2</bundle>
+    <feature version="${project.version}">hise</feature>
+  </feature>
+  <feature name="hise-oracle" version="${project.version}">
+    <bundle>wrap:mvn:oracle/ojdbc5/11.1.0.6.0</bundle>
+    <feature version="${project.version}">hise</feature>
+  </feature>
+  <feature name="hise-h2-test-example-osgi" version="${project.version}">
+    <feature version="${project.version}">hise-h2</feature>
+    <bundle>mvn:org.apache.hise/hise-test-example-osgi/${project.version}</bundle>
+  </feature>
+  <feature name="hise-sqlserver-test-example-osgi" version="${project.version}">
+    <bundle>mvn:org.apache.hise/hise-test-example-osgi/${project.version}</bundle>
+    <feature version="${project.version}">hise-sqlserver</feature>
+  </feature>
+</features>

Propchange: incubator/hise/trunk/hise-karaf/src/main/resources/features.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEScheduler.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEScheduler.java?rev=921529&r1=921528&r2=921529&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEScheduler.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEScheduler.java Wed Mar 10 19:45:10 2010
@@ -56,36 +56,40 @@ public class HISEScheduler {
         public void run() {
             final Date currentEventDateTime = Calendar.getInstance().getTime();
             __log.debug("scheduler CheckJobs at " + currentEventDateTime);
-            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);
+            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;
                             }
-                            return null;
-                        }
-                        
-                    });
-                } catch (Throwable t) {
-                    __log.warn("Job execution failed " + j, t);
+                            
+                        });
+                    } catch (Throwable t) {
+                        __log.warn("Job execution failed " + j, t);
+                    }
                 }
+            } catch (Throwable t) {
+                __log.warn("CheckJobs failed", t);
             }
         }
     }

Modified: incubator/hise/trunk/hise-test-example-osgi/pom.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-test-example-osgi/pom.xml?rev=921529&r1=921528&r2=921529&view=diff
==============================================================================
--- incubator/hise/trunk/hise-test-example-osgi/pom.xml (original)
+++ incubator/hise/trunk/hise-test-example-osgi/pom.xml Wed Mar 10 19:45:10 2010
@@ -37,6 +37,7 @@
                 <configuration>
                     <instructions>
                         <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+<!--
                         <Import-Package>
                             javax.persistence,
                             org.apache.openjpa.persistence,
@@ -44,8 +45,8 @@
                             javax.xml.soap,
                             META-INF.cxf,
                             META-INF.cxf.osgi,
-org.apache.hise,
 
+org.apache.hise,
                             org.apache.cxf.resource,
                             org.apache.cxf.binding.soap.spring,
                             org.springframework.beans,
@@ -57,14 +58,36 @@ org.apache.hise,
    org.springframework.osgi.service,
    org.springframework.osgi.service.importer,
                         </Import-Package>
+-->
+
+                        <Import-Package>
+org.apache.hise,
+                            javax.jws,
+                            javax.wsdl,
+                            META-INF.cxf,
+                            META-INF.cxf.osgi,
+                            org.apache.cxf.bus,
+                            org.apache.cxf.bus.spring,
+                            org.apache.cxf.bus.resource,
+                            org.apache.cxf.configuration.spring,
+                            org.apache.cxf.resource,
+                            org.apache.cxf.transport.http_osgi,
+                            org.apache.servicemix.util,
+                            org.springframework.beans.factory.config
+                        </Import-Package>
                         <Private-Package>org.apache.hise.test</Private-Package>
+                        <Require-Bundle>org.apache.cxf.bundle</Require-Bundle>
+
+
                         <!--
                         <Export-Package>org.apache.hise*,org.w3._2001.xmlschema</Export-Package>
                         -->
                         <DynamicImport-Package>*</DynamicImport-Package>
+                        <!--
                         <Require-Bundle>
                             org.apache.cxf.bundle
                         </Require-Bundle>
+                        -->
                         <!--
                         -->
                         <!--

Modified: incubator/hise/trunk/hise-test-example-osgi/src/main/resources/META-INF/spring/beans.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-test-example-osgi/src/main/resources/META-INF/spring/beans.xml?rev=921529&r1=921528&r2=921529&view=diff
==============================================================================
--- incubator/hise/trunk/hise-test-example-osgi/src/main/resources/META-INF/spring/beans.xml (original)
+++ incubator/hise/trunk/hise-test-example-osgi/src/main/resources/META-INF/spring/beans.xml Wed Mar 10 19:45:10 2010
@@ -10,6 +10,10 @@ xsi:schemaLocation="
        http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.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-extension-http.xml" />
+    <import resource="classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml" />
 
 <osgi:reference id="hiseEngine" interface="org.apache.hise.api.HISEEngine" bean-name="hiseEngine"/>
 <osgi:reference id="transactionManager" interface="org.springframework.transaction.PlatformTransactionManager" bean-name="transactionManager"/>