You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2019/09/29 14:28:10 UTC

[isis] branch ISIS-2086 updated (c03f109 -> 14a28ee)

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

danhaywood pushed a change to branch ISIS-2086
in repository https://gitbox.apache.org/repos/asf/isis.git.


    from c03f109  ISIS-2086: refactors 'isis.persistor.datanucleus.install-fixtures' as type-safe config
     new 05dbdd3  ISIS-2086: refactors 'isis.persistor.datanucleus.install-fixtures' as type-safe config (ctd)
     new 14a28ee  ISIS-2086: declares 'isis.persistor.datanucleus.impl.javax.jdo.option.connectionUrl' into the new type-safe config

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:
 .../java/org/apache/isis/config/IsisConfiguration.java     | 14 +++++++++++++-
 .../isis/runtime/services/hsqldb/HsqlDbManagerMenu.java    |  8 ++++++--
 .../runtime/system/persistence/PersistenceSession.java     |  6 ------
 3 files changed, 19 insertions(+), 9 deletions(-)


[isis] 01/02: ISIS-2086: refactors 'isis.persistor.datanucleus.install-fixtures' as type-safe config (ctd)

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

danhaywood pushed a commit to branch ISIS-2086
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 05dbdd3045824dfc0da074238320bc6db4bc6cc9
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Sun Sep 29 15:24:59 2019 +0100

    ISIS-2086: refactors 'isis.persistor.datanucleus.install-fixtures' as type-safe config (ctd)
---
 .../apache/isis/runtime/system/persistence/PersistenceSession.java  | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/core/runtime/src/main/java/org/apache/isis/runtime/system/persistence/PersistenceSession.java b/core/runtime/src/main/java/org/apache/isis/runtime/system/persistence/PersistenceSession.java
index 28b1bd2..9738fa4 100644
--- a/core/runtime/src/main/java/org/apache/isis/runtime/system/persistence/PersistenceSession.java
+++ b/core/runtime/src/main/java/org/apache/isis/runtime/system/persistence/PersistenceSession.java
@@ -160,12 +160,6 @@ SessionScopedComponent {
     // -- FIXTURE SUPPORT
 
     /**
-     * @see #isFixturesInstalled()
-     */
-        static final String INSTALL_FIXTURES_KEY = "isis.persistor.datanucleus.install-fixtures";
-    static final boolean INSTALL_FIXTURES_DEFAULT = false;
-
-    /**
      * Determine if the object store has been initialized with its set of start
      * up objects.
      *


[isis] 02/02: ISIS-2086: declares 'isis.persistor.datanucleus.impl.javax.jdo.option.connectionUrl' into the new type-safe config

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

danhaywood pushed a commit to branch ISIS-2086
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 14a28ee89394ce502d99c26765e258845ae3ade0
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Sun Sep 29 15:27:53 2019 +0100

    ISIS-2086: declares 'isis.persistor.datanucleus.impl.javax.jdo.option.connectionUrl' into the new type-safe config
---
 .../java/org/apache/isis/config/IsisConfiguration.java     | 14 +++++++++++++-
 .../isis/runtime/services/hsqldb/HsqlDbManagerMenu.java    |  8 ++++++--
 2 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/core/config/src/main/java/org/apache/isis/config/IsisConfiguration.java b/core/config/src/main/java/org/apache/isis/config/IsisConfiguration.java
index 621ba17..b644591 100644
--- a/core/config/src/main/java/org/apache/isis/config/IsisConfiguration.java
+++ b/core/config/src/main/java/org/apache/isis/config/IsisConfiguration.java
@@ -80,7 +80,19 @@ public class IsisConfiguration {
             private final Impl impl = new Impl();
             @Data
             public static class Impl {
-
+                private final Javax javax = new Javax();
+                @Data
+                public static class Javax {
+                    private final Jdo jdo = new Jdo();
+                    @Data
+                    public static class Jdo {
+                        private final Option option = new Option();
+                        @Data
+                        public static class Option {
+                            private String connectionUrl = null;
+                        }
+                    }
+                }
             }
             private boolean installFixtures = false;
         }
diff --git a/core/runtime-extensions/src/main/java/org/apache/isis/runtime/services/hsqldb/HsqlDbManagerMenu.java b/core/runtime-extensions/src/main/java/org/apache/isis/runtime/services/hsqldb/HsqlDbManagerMenu.java
index f2c1709..aaaf898 100644
--- a/core/runtime-extensions/src/main/java/org/apache/isis/runtime/services/hsqldb/HsqlDbManagerMenu.java
+++ b/core/runtime-extensions/src/main/java/org/apache/isis/runtime/services/hsqldb/HsqlDbManagerMenu.java
@@ -19,7 +19,9 @@
 package org.apache.isis.runtime.services.hsqldb;
 
 import javax.annotation.PostConstruct;
+import javax.inject.Inject;
 
+import org.apache.isis.config.IsisConfiguration;
 import org.hsqldb.util.DatabaseManagerSwing;
 
 import org.apache.isis.applib.IsisApplibModule;
@@ -48,10 +50,12 @@ public class HsqlDbManagerMenu {
 
     private String url;
 
+    @Inject
+    IsisConfiguration configuration;
+
     @PostConstruct
     public void init() {
-        this.url = IsisContext.getConfigurationLegacy()
-                .getString("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL");
+        this.url = configuration.getPersistor().getDatanucleus().getImpl().getJavax().getJdo().getOption().getConnectionUrl();
     }