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/10/16 22:26:26 UTC

[isis] branch v2 updated (0d4c71b -> 4650922)

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 0d4c71b  ISIS-2006: adding a jax-rs request/response debug logging filter
     new 2d984eb  ISIS-2006: fixes typo in warning message
     new 4650922  ISIS-1895: fixes context parameters not picked up during bootstrapping

The 2 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/applib/client/RestfulClient.java   |  3 ++-
 .../isis/core/webapp/IsisWebAppConfigProvider.java     | 18 ++++++++----------
 .../isis/core/webapp/IsisWebAppContextListener.java    |  2 +-
 .../org/apache/isis/core/webapp/WebAppConstants.java   |  7 -------
 .../isis/core/webapp/modules/WebModule_Wicket.java     |  5 ++---
 5 files changed, 13 insertions(+), 22 deletions(-)


[isis] 01/02: ISIS-2006: fixes typo in warning message

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 2d984eb4264de5451271e63265476e9eeafb6519
Author: Andi Huber <ah...@apache.org>
AuthorDate: Tue Oct 16 15:37:10 2018 +0200

    ISIS-2006: fixes typo in warning message
    
    Task-Url: https://issues.apache.org/jira/browse/ISIS-2006
---
 .../src/main/java/org/apache/isis/applib/client/RestfulClient.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/client/RestfulClient.java b/core/applib/src/main/java/org/apache/isis/applib/client/RestfulClient.java
index 6496db1..53c0fc4 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/client/RestfulClient.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/client/RestfulClient.java
@@ -212,7 +212,8 @@ public class RestfulClient {
             Class<?> MOXyJsonProvider = _Context.loadClass("org.eclipse.persistence.jaxb.rs.MOXyJsonProvider");
             client.register(MOXyJsonProvider);
         } catch (Exception e) {
-            LOG.warning("This implementaion of RestfulClient does require the class 'MOXyJsonProvider' on the class-path."
+            LOG.warning("This implementation of RestfulClient does require the class 'MOXyJsonProvider'"
+                    + " on the class-path."
                     + " Are you missing a maven dependency?");
         }
     }


[isis] 02/02: ISIS-1895: fixes context parameters not picked up during bootstrapping

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 46509221735b51f226b91f40992f88bcbf64e1ff
Author: Andi Huber <ah...@apache.org>
AuthorDate: Wed Oct 17 00:25:50 2018 +0200

    ISIS-1895: fixes context parameters not picked up during bootstrapping
    
    Task-Url: https://issues.apache.org/jira/browse/ISIS-1895
---
 .../isis/core/webapp/IsisWebAppConfigProvider.java     | 18 ++++++++----------
 .../isis/core/webapp/IsisWebAppContextListener.java    |  2 +-
 .../org/apache/isis/core/webapp/WebAppConstants.java   |  7 -------
 .../isis/core/webapp/modules/WebModule_Wicket.java     |  5 ++---
 4 files changed, 11 insertions(+), 21 deletions(-)

diff --git a/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisWebAppConfigProvider.java b/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisWebAppConfigProvider.java
index 0e7b8bc..2bb2bca 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisWebAppConfigProvider.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisWebAppConfigProvider.java
@@ -44,12 +44,13 @@ public class IsisWebAppConfigProvider {
     
     private static final Logger LOG = LoggerFactory.getLogger(IsisWebAppConfigProvider.class);
     
+    private IsisConfigurationBuilder cfgBuilder;
+    
     /**
-     * Removes any cashed IsisConfigurationBuilder instance from the ServletContext.
-     * @param servletContext
+     * Removes any cached IsisConfigurationBuilder instance from this provider.
      */
-    public void invalidate(final ServletContext servletContext) {
-        servletContext.setAttribute(WebAppConstants.CONFIGURATION_BUILDER_KEY, null);
+    public void invalidate() {
+        cfgBuilder = null;
     }
     
     /**
@@ -60,13 +61,10 @@ public class IsisWebAppConfigProvider {
      * @return
      */
     public synchronized IsisConfigurationBuilder getConfigurationBuilder(final ServletContext servletContext) {
-        IsisConfigurationBuilder isisConfigurationBuilder =
-                (IsisConfigurationBuilder) servletContext.getAttribute(WebAppConstants.CONFIGURATION_BUILDER_KEY);
-        if(isisConfigurationBuilder == null) {
-            isisConfigurationBuilder = newIsisConfigurationBuilder(servletContext);
-            servletContext.setAttribute(WebAppConstants.CONFIGURATION_BUILDER_KEY, isisConfigurationBuilder);
+        if(cfgBuilder == null) {
+            cfgBuilder = newIsisConfigurationBuilder(servletContext);
         }
-        return isisConfigurationBuilder;
+        return cfgBuilder;
     }
 
     /**
diff --git a/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisWebAppContextListener.java b/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisWebAppContextListener.java
index a4559c9..2267032 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisWebAppContextListener.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisWebAppContextListener.java
@@ -83,7 +83,7 @@ public class IsisWebAppContextListener implements ServletContextListener {
         // put the list of viewer names "isis.viewers" into a context parameter
         WebModule.ContextUtil.commitViewers(servletContext);
         // invalidate config such that next IsisConfigurationBuilder that gets obtained is reinitialized
-        configProvider.invalidate(servletContext);  
+        configProvider.invalidate();  
         
         LOG.info("=== PHASE 2 === Initializing the ServletContext");
         
diff --git a/core/runtime/src/main/java/org/apache/isis/core/webapp/WebAppConstants.java b/core/runtime/src/main/java/org/apache/isis/core/webapp/WebAppConstants.java
index 1fde0fe..f3bf67b 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/webapp/WebAppConstants.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/webapp/WebAppConstants.java
@@ -25,13 +25,6 @@ import org.apache.isis.core.commons.authentication.AuthenticationSession;
 public final class WebAppConstants {
 
     /**
-     * Key under which the {@link org.apache.isis.core.commons.configbuilder.IsisConfigurationBuilder} is
-     * bound as a servlet context attribute (<tt>ServletContext#getAttribute(String)</tt>); used to pass
-     * from the <tt>webserver</tt> module to this.
-     */
-    public static final String CONFIGURATION_BUILDER_KEY = "isis.configurationBuilder";
-
-    /**
      * Key under which the {@link AuthenticationSession} is bound as a session
      * attribute ( <tt>HttpSession#getAttribute(String)</tt>).
      */
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 1b286db..a5e060c 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
@@ -31,6 +31,7 @@ import javax.servlet.ServletContext;
 import javax.servlet.ServletContextListener;
 import javax.servlet.ServletException;
 
+import org.apache.isis.core.runtime.system.context.IsisContext;
 import org.apache.isis.core.webapp.IsisWebAppConfigProvider;
 
 /**
@@ -65,9 +66,7 @@ final class WebModule_Wicket implements WebModule  {
                 configProvider.peekAtOrDefault(ctx, "isis.viewer.wicket.basePath", "/wicket");
         
         {
-            //TODO[ahuber] once this class is moved to viewer-wicket-impl, we can utilize
-            // IsisWicketApplication's method of determining the deployment code.
-            deploymentMode = "true".equalsIgnoreCase(System.getenv("PROTOTYPING"))
+            deploymentMode = IsisContext.getEnvironment().getDeploymentCategory().isPrototyping()
                     ? "development" : "deployment";
         }