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/09/20 05:18:16 UTC

[isis] branch v2 updated (fad5470 -> 0b64abc)

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

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


    from fad5470  ISIS-1987: adocs: removing duplicate entry; explaining 'ad'
     new 32bc42d  ISIS-1905: web.xml correcting a comment
     new fd31b74  ISIS-1895: cleanup experimental config keys
     new 0b64abc  ISIS-1895: remove deprecated deployment types SERVER_EXPLORATION, UNIT_TESTING

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/isis/core/runtime/runner/Constants.java     |  1 -
 .../apache/isis/core/runtime/system/DeploymentType.java    |  2 --
 .../org/apache/isis/core/webapp/modules/WebModule.java     | 14 ++++++++++----
 .../apache/isis/core/webapp/modules/WebModule_Wicket.java  | 11 +++--------
 .../authentication/standard/AuthenticatorDefaultTest.java  |  8 ++++----
 .../isis/viewer/wicket/viewer/IsisWicketApplication.java   |  6 +-----
 .../internal/OptionHandlerDeploymentTypeWebServer.java     |  3 +--
 .../application/helloworld/src/main/webapp/WEB-INF/web.xml |  2 +-
 .../simpleapp/webapp/src/main/webapp/WEB-INF/web.xml       |  2 +-
 9 files changed, 21 insertions(+), 28 deletions(-)


[isis] 03/03: ISIS-1895: remove deprecated deployment types SERVER_EXPLORATION, UNIT_TESTING

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 0b64abc8421d0d519c28df2ef32e21650dc12cf2
Author: Andi Huber <ah...@apache.org>
AuthorDate: Thu Sep 20 06:50:26 2018 +0200

    ISIS-1895: remove deprecated deployment types SERVER_EXPLORATION,
    UNIT_TESTING
    
    Task-Url: https://issues.apache.org/jira/browse/ISIS-1895
---
 .../main/java/org/apache/isis/core/runtime/runner/Constants.java  | 1 -
 .../java/org/apache/isis/core/runtime/system/DeploymentType.java  | 2 --
 .../runtime/authentication/standard/AuthenticatorDefaultTest.java | 8 ++++----
 .../webserver/internal/OptionHandlerDeploymentTypeWebServer.java  | 3 +--
 4 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/Constants.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/Constants.java
index 51d7d0d..c1c55c0 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/Constants.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/Constants.java
@@ -29,7 +29,6 @@ public final class Constants {
 
     public static final String TYPE_OPT = "t";
     public static final String TYPE_LONG_OPT = "type";
-    public static final String TYPE_SERVER_EXPLORATION = DeploymentType.SERVER_EXPLORATION.friendlyName();
     public static final String TYPE_SERVER_PROTOTYPE = DeploymentType.SERVER_PROTOTYPE.friendlyName();
     public static final String TYPE_SERVER = DeploymentType.SERVER.friendlyName();
 
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/DeploymentType.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/DeploymentType.java
index d358eb7..dc2a652 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/DeploymentType.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/DeploymentType.java
@@ -32,9 +32,7 @@ public class DeploymentType {
     private static List<DeploymentType> deploymentTypes = _Lists.newArrayList();
 
     public static DeploymentType SERVER = new DeploymentType("SERVER", DeploymentCategory.PRODUCTION);
-    public static DeploymentType SERVER_EXPLORATION = new DeploymentType("SERVER_EXPLORATION", DeploymentCategory.EXPLORING);
     public static DeploymentType SERVER_PROTOTYPE = new DeploymentType("SERVER_PROTOTYPE", DeploymentCategory.PROTOTYPING);
-    public static DeploymentType UNIT_TESTING = new DeploymentType("UNIT_TESTING", DeploymentCategory.PRODUCTION);
 
     /**
      * Look up {@link DeploymentType} by their {@link #name()}.
diff --git a/core/runtime/src/test/java/org/apache/isis/core/runtime/authentication/standard/AuthenticatorDefaultTest.java b/core/runtime/src/test/java/org/apache/isis/core/runtime/authentication/standard/AuthenticatorDefaultTest.java
index 4f5b2ac..f05f8a5 100644
--- a/core/runtime/src/test/java/org/apache/isis/core/runtime/authentication/standard/AuthenticatorDefaultTest.java
+++ b/core/runtime/src/test/java/org/apache/isis/core/runtime/authentication/standard/AuthenticatorDefaultTest.java
@@ -19,6 +19,9 @@
 
 package org.apache.isis.core.runtime.authentication.standard;
 
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
 import org.jmock.Mockery;
 import org.jmock.integration.junit4.JMock;
 import org.jmock.integration.junit4.JUnit4Mockery;
@@ -31,9 +34,6 @@ import org.apache.isis.core.metamodel.deployment.DeploymentCategory;
 import org.apache.isis.core.runtime.authentication.AuthenticationRequest;
 import org.apache.isis.core.runtime.system.DeploymentType;
 
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
 @RunWith(JMock.class)
 public class AuthenticatorDefaultTest {
 
@@ -67,7 +67,7 @@ public class AuthenticatorDefaultTest {
 
     @Test
     public void getDeploymentCategory() throws Exception {
-        final DeploymentCategory deploymentCategory = DeploymentType.SERVER_EXPLORATION.getDeploymentCategory();
+        final DeploymentCategory deploymentCategory = DeploymentType.SERVER_PROTOTYPE.getDeploymentCategory();
         authenticator.init(deploymentCategory);
         assertThat(authenticator.getDeploymentCategory(), is(deploymentCategory));
     }
diff --git a/core/webserver/src/main/java/org/apache/isis/core/webserver/internal/OptionHandlerDeploymentTypeWebServer.java b/core/webserver/src/main/java/org/apache/isis/core/webserver/internal/OptionHandlerDeploymentTypeWebServer.java
index 9bddfb8..4a829ff 100644
--- a/core/webserver/src/main/java/org/apache/isis/core/webserver/internal/OptionHandlerDeploymentTypeWebServer.java
+++ b/core/webserver/src/main/java/org/apache/isis/core/webserver/internal/OptionHandlerDeploymentTypeWebServer.java
@@ -20,7 +20,6 @@
 package org.apache.isis.core.webserver.internal;
 
 import static org.apache.isis.core.runtime.runner.Constants.TYPE_SERVER;
-import static org.apache.isis.core.runtime.runner.Constants.TYPE_SERVER_EXPLORATION;
 import static org.apache.isis.core.runtime.runner.Constants.TYPE_SERVER_PROTOTYPE;
 
 import org.apache.isis.core.runtime.runner.opts.OptionHandlerDeploymentType;
@@ -28,7 +27,7 @@ import org.apache.isis.core.runtime.system.DeploymentType;
 
 public class OptionHandlerDeploymentTypeWebServer extends OptionHandlerDeploymentType {
 
-    private static final String TYPES = TYPE_SERVER_EXPLORATION + "; " + TYPE_SERVER_PROTOTYPE + " (default); " + TYPE_SERVER;
+    private static final String TYPES = TYPE_SERVER_PROTOTYPE + " (default); " + TYPE_SERVER;
 
     public OptionHandlerDeploymentTypeWebServer() {
         super(DeploymentType.SERVER_PROTOTYPE, TYPES);


[isis] 01/03: ISIS-1905: web.xml correcting a comment

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 32bc42d629d4a2a4648f8802d0064808de736c8e
Author: Andi Huber <ah...@apache.org>
AuthorDate: Thu Sep 20 06:09:17 2018 +0200

    ISIS-1905: web.xml correcting a comment
    
    Task-Url: https://issues.apache.org/jira/browse/ISIS-1905
---
 example/application/helloworld/src/main/webapp/WEB-INF/web.xml       | 2 +-
 example/application/simpleapp/webapp/src/main/webapp/WEB-INF/web.xml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

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 76d33f1..2be7f8c 100644
--- a/example/application/helloworld/src/main/webapp/WEB-INF/web.xml
+++ b/example/application/helloworld/src/main/webapp/WEB-INF/web.xml
@@ -28,7 +28,7 @@
         <welcome-file>about/index.html</welcome-file>
     </welcome-file-list>
 
-    <!-- can be removed with axon >= 3.5 -->
+    <!-- can be removed with axon >= 3.4 | see https://github.com/AxonFramework/AxonFramework/issues/534 -->
     <persistence-context-ref>
         <persistence-context-ref-name>org.axonframework.common.jpa.ContainerManagedEntityManagerProvider/entityManager</persistence-context-ref-name>
         <persistence-unit-name>noop</persistence-unit-name>
diff --git a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/web.xml b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/web.xml
index e17f6ef..8f926eb 100644
--- a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/web.xml
+++ b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/web.xml
@@ -28,7 +28,7 @@
         <welcome-file>about/index.html</welcome-file>
     </welcome-file-list>
 
-    <!-- can be removed with axon >= 3.5 -->
+    <!-- can be removed with axon >= 3.4 | see https://github.com/AxonFramework/AxonFramework/issues/534 -->
     <persistence-context-ref>
         <persistence-context-ref-name>org.axonframework.common.jpa.ContainerManagedEntityManagerProvider/entityManager</persistence-context-ref-name>
         <persistence-unit-name>noop</persistence-unit-name>


[isis] 02/03: ISIS-1895: cleanup experimental config keys

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit fd31b74a1f558859d6a898c7b20c63f6569c77fb
Author: Andi Huber <ah...@apache.org>
AuthorDate: Thu Sep 20 06:45:07 2018 +0200

    ISIS-1895: cleanup experimental config keys
    
    Task-Url: https://issues.apache.org/jira/browse/ISIS-1895
---
 .../org/apache/isis/core/webapp/modules/WebModule.java     | 14 ++++++++++----
 .../apache/isis/core/webapp/modules/WebModule_Wicket.java  | 11 +++--------
 .../isis/viewer/wicket/viewer/IsisWicketApplication.java   |  6 +-----
 3 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/core/runtime/src/main/java/org/apache/isis/core/webapp/modules/WebModule.java b/core/runtime/src/main/java/org/apache/isis/core/webapp/modules/WebModule.java
index 04233c1..eb7dcfd 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/webapp/modules/WebModule.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/webapp/modules/WebModule.java
@@ -101,6 +101,12 @@ public interface WebModule {
     static final class ContextUtil {
         
         /**
+         * This key was deprecated from config, but we still use it for reference. It is auto-populated 
+         * such that it can be looked up, to see what viewers have been discovered by the framework.
+         */
+        private final static String ISIS_VIEWERS = "isis.viewers";
+        
+        /**
          * Tell other modules that a bootstrapper is present.
          * @param ctx
          * @param bootstrapper
@@ -123,13 +129,13 @@ public interface WebModule {
          * @param viewerName
          */
         public static void registerViewer(ServletContext ctx, String viewerName) {
-            String viewers = (String) ctx.getAttribute("isis.viewers");
+            String viewers = (String) ctx.getAttribute(ISIS_VIEWERS);
             if(isEmpty(viewers)) {
                 viewers = viewerName;
             } else {
                 viewers = viewers + "," + viewerName;
             }
-            ctx.setAttribute("isis.viewers", viewers);
+            ctx.setAttribute(ISIS_VIEWERS, viewers);
         }
         
         /**
@@ -137,9 +143,9 @@ public interface WebModule {
          * @param ctx
          */
         public static void commitViewers(ServletContext ctx) {
-            String viewers = (String) ctx.getAttribute("isis.viewers");
+            String viewers = (String) ctx.getAttribute(ISIS_VIEWERS);
             if(!isEmpty(viewers)) {
-                ctx.setInitParameter("isis.viewers", viewers);    
+                ctx.setInitParameter(ISIS_VIEWERS, viewers);    
             }
         }
         
diff --git a/core/runtime/src/main/java/org/apache/isis/core/webapp/modules/WebModule_Wicket.java b/core/runtime/src/main/java/org/apache/isis/core/webapp/modules/WebModule_Wicket.java
index 1ed1d79..1b286db 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/webapp/modules/WebModule_Wicket.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/webapp/modules/WebModule_Wicket.java
@@ -45,7 +45,7 @@ final class WebModule_Wicket implements WebModule  {
     private final static String WICKET_FILTER_NAME = "WicketFilter";
     
     private String pathConfigValue;
-    private String modeConfigValue;
+    private String deploymentMode;
     private String appConfigValue;
 
     @Override
@@ -60,8 +60,6 @@ final class WebModule_Wicket implements WebModule  {
             return;
         }
 
-        
-        
         final IsisWebAppConfigProvider configProvider = IsisWebAppConfigProvider.getInstance();
         pathConfigValue = 
                 configProvider.peekAtOrDefault(ctx, "isis.viewer.wicket.basePath", "/wicket");
@@ -69,10 +67,8 @@ final class WebModule_Wicket implements WebModule  {
         {
             //TODO[ahuber] once this class is moved to viewer-wicket-impl, we can utilize
             // IsisWicketApplication's method of determining the deployment code.
-            final String modeFromEnvironment = "true".equalsIgnoreCase(System.getenv("PROTOTYPING"))
+            deploymentMode = "true".equalsIgnoreCase(System.getenv("PROTOTYPING"))
                     ? "development" : "deployment";
-            modeConfigValue = 
-                    configProvider.peekAtOrDefault(ctx, "isis.viewer.wicket.mode", modeFromEnvironment);
         }
         
         appConfigValue = 
@@ -86,7 +82,6 @@ final class WebModule_Wicket implements WebModule  {
 
     @Override
     public ServletContextListener init(ServletContext ctx) throws ServletException {
-        ctx.setInitParameter("isis.viewers", "wicket,restfulobjects");
 
         final Filter filter;
         try {
@@ -140,7 +135,7 @@ final class WebModule_Wicket implements WebModule  {
     }
 
     private String getWicketMode() {
-        return requireNonNull(modeConfigValue, "This web-module needs to be prepared first.");
+        return requireNonNull(deploymentMode, "This web-module needs to be prepared first.");
     }
 
     private String getApplicationClassName() {
diff --git a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
index 81bc9b0..92ba594 100644
--- a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
+++ b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
@@ -549,17 +549,13 @@ implements ComponentFactoryRegistryAccessor, PageClassRegistryAccessor, WicketVi
         
         // in order of highest precedence first  
         final String deploymentTypeConfigValue = configuration.getString("isis.deploymentType");
-        final String wicketModeConfigValue = configuration.getString("isis.viewer.wicket.mode");
         final String modeFromEnvironment = "true".equalsIgnoreCase(System.getenv("PROTOTYPING"))
                 ? "PROTOTYPING" : null;
         // --
         
-        
         final boolean isPrototype;
         
-        if(wicketModeConfigValue!=null) {
-            isPrototype = "development".equalsIgnoreCase(wicketModeConfigValue);
-        } else if(deploymentTypeConfigValue!=null) {
+        if(deploymentTypeConfigValue!=null) {
             final DeploymentType deploymentType = DeploymentType.lookup(deploymentTypeConfigValue);
             isPrototype = !deploymentType.getDeploymentCategory().isProduction();
         } else if(modeFromEnvironment!=null) {