You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2018/03/08 15:15:16 UTC

[isis] branch master updated: ISIS-1903 fixing helloworld issues (while not touching archetype!)

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/master by this push:
     new cbb4656  ISIS-1903 fixing helloworld issues (while not touching archetype!)
cbb4656 is described below

commit cbb4656c24cf46e6b784c6414b9a7a9e5ba1bab5
Author: Andi Huber <ah...@apache.org>
AuthorDate: Thu Mar 8 16:14:56 2018 +0100

    ISIS-1903 fixing helloworld issues (while not touching archetype!)
    
    1) add core-plugin dependencies (DN-5, eventbus-guava, resteasy-3)
    
    2) upgrade web-descriptor (web.xml) to version 3.1
    
    3) let HelloWorldObjects use the new IsisJdoSupport_v3_2
    
    4) remove configured option: isis.services.eventbus.implementation=axon
---
 example/application/helloworld/pom.xml             | 31 ++++++++++++++++++++++
 .../application/isis-non-changing.properties       |  4 +--
 .../java/domainapp/dom/impl/HelloWorldObjects.java |  9 +++----
 .../helloworld/src/main/webapp/WEB-INF/web.xml     |  7 ++---
 4 files changed, 41 insertions(+), 10 deletions(-)

diff --git a/example/application/helloworld/pom.xml b/example/application/helloworld/pom.xml
index c4570e3..dcf4672 100644
--- a/example/application/helloworld/pom.xml
+++ b/example/application/helloworld/pom.xml
@@ -155,10 +155,41 @@
     </dependencyManagement>
 
     <dependencies>
+
+    	<!-- ISIS API -->
+    	
         <dependency>
             <groupId>org.apache.isis.core</groupId>
             <artifactId>isis-core-applib</artifactId>
         </dependency>
+        
+        <!-- ISIS CORE PLUGINS -->
+        
+        <dependency>
+            <groupId>org.apache.isis.core</groupId>
+            <artifactId>isis-core-plugins-discovery-reflections</artifactId>
+            <version>${isis.version}</version>
+        </dependency>
+    
+      	<dependency>
+            <groupId>org.apache.isis.core</groupId>
+            <artifactId>isis-core-plugins-jdo-datanucleus-5</artifactId>
+            <version>${isis.version}</version>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.isis.core</groupId>
+            <artifactId>isis-core-plugins-eventbus-guava</artifactId>
+            <version>${isis.version}</version>
+        </dependency>
+    
+    	<dependency>
+            <groupId>org.apache.isis.core</groupId>
+            <artifactId>isis-core-plugins-jaxrs-resteasy-3</artifactId>
+            <version>${isis.version}</version>
+        </dependency>
+        
+        <!-- TESTS -->
 
         <dependency>
             <groupId>org.apache.isis.mavendeps</groupId>
diff --git a/example/application/helloworld/src/main/java/domainapp/application/isis-non-changing.properties b/example/application/helloworld/src/main/java/domainapp/application/isis-non-changing.properties
index d42682e..512fe42 100644
--- a/example/application/helloworld/src/main/java/domainapp/application/isis-non-changing.properties
+++ b/example/application/helloworld/src/main/java/domainapp/application/isis-non-changing.properties
@@ -16,9 +16,9 @@
 #  under the License.
 
 
-
+# -- auto wired by plugins -- 
 #isis.services.eventbus.implementation=guava
-isis.services.eventbus.implementation=axon
+#isis.services.eventbus.implementation=axon
 
 isis.reflector.validator.allowDeprecated=false
 isis.reflector.validator.noParamsOnly=true
diff --git a/example/application/helloworld/src/main/java/domainapp/dom/impl/HelloWorldObjects.java b/example/application/helloworld/src/main/java/domainapp/dom/impl/HelloWorldObjects.java
index 92bd565..375f6f5 100644
--- a/example/application/helloworld/src/main/java/domainapp/dom/impl/HelloWorldObjects.java
+++ b/example/application/helloworld/src/main/java/domainapp/dom/impl/HelloWorldObjects.java
@@ -20,7 +20,7 @@ package domainapp.dom.impl;
 
 import java.util.List;
 
-import org.datanucleus.query.typesafe.TypesafeQuery;
+import javax.jdo.JDOQLTypedQuery;
 
 import org.apache.isis.applib.annotation.Action;
 import org.apache.isis.applib.annotation.DomainService;
@@ -30,8 +30,7 @@ import org.apache.isis.applib.annotation.Parameter;
 import org.apache.isis.applib.annotation.ParameterLayout;
 import org.apache.isis.applib.annotation.RestrictTo;
 import org.apache.isis.applib.annotation.SemanticsOf;
-import org.apache.isis.applib.services.jdosupport.IsisJdoSupport;
-import org.apache.isis.applib.services.registry.ServiceRegistry;
+import org.apache.isis.applib.services.jdosupport.IsisJdoSupport_v3_2;
 import org.apache.isis.applib.services.repository.RepositoryService;
 
 @DomainService(
@@ -52,7 +51,7 @@ public class HelloWorldObjects {
     @Action(semantics = SemanticsOf.SAFE)
     @MemberOrder(sequence = "2")
     public List<HelloWorldObject> findByName(final String name) {
-        TypesafeQuery<HelloWorldObject> q = isisJdoSupport.newTypesafeQuery(HelloWorldObject.class);
+    	JDOQLTypedQuery<HelloWorldObject> q = isisJdoSupport.newTypesafeQuery(HelloWorldObject.class);
         final QHelloWorldObject cand = QHelloWorldObject.candidate();
         q = q.filter(
                 cand.name.indexOf(q.stringParameter("name")).ne(-1)
@@ -71,6 +70,6 @@ public class HelloWorldObjects {
     RepositoryService repositoryService;
 
     @javax.inject.Inject
-    IsisJdoSupport isisJdoSupport;
+    IsisJdoSupport_v3_2 isisJdoSupport;
 
 }
diff --git a/example/application/helloworld/src/main/webapp/WEB-INF/web.xml b/example/application/helloworld/src/main/webapp/WEB-INF/web.xml
index a3f7835..a6c042c 100644
--- a/example/application/helloworld/src/main/webapp/WEB-INF/web.xml
+++ b/example/application/helloworld/src/main/webapp/WEB-INF/web.xml
@@ -17,9 +17,10 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<web-app id="WebApp_ID" version="2.4"
-    xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+	xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
+	id="WebApp_ID" version="3.1"> 
 
     <display-name>Hello World</display-name>
 

-- 
To stop receiving notification emails like this one, please contact
ahuber@apache.org.