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 2019/12/12 18:18:02 UTC

[isis] branch master updated (bc37df1 -> 8e8549e)

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

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


    from bc37df1  ISIS-2201: adds thymeleaf, and adds an example templates/error.html.  SB will use this automatically (see BasicErrorController).
     new 99dd950  ISIS-2177: remove TransactionalResource
     new c8feea8  ISIS-2177: remove SessionScopedComponent
     new 8e8549e  Merge remote-tracking branch 'origin/master'

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:
 .../isis/config/beans/IsisBeanTypeRegistry.java    |  5 ---
 .../persistence/IsisPersistenceSessionJdo.java     | 20 ++++++++--
 .../persistence/IsisTransactionManagerJdo.java     |  3 +-
 .../transaction/TransactionalResource.java         | 46 ----------------------
 .../fixtures/fixturescripts/FixtureScripts.java    |  6 ++-
 5 files changed, 23 insertions(+), 57 deletions(-)
 delete mode 100644 core/runtime/src/main/java/org/apache/isis/runtime/persistence/objectstore/transaction/TransactionalResource.java


[isis] 02/03: ISIS-2177: remove SessionScopedComponent

Posted by ah...@apache.org.
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

commit c8feea88c1589fff882549f3345157275407d1fd
Author: Andi Huber <ah...@apache.org>
AuthorDate: Thu Dec 12 19:15:11 2019 +0100

    ISIS-2177: remove SessionScopedComponent
---
 .../java/org/apache/isis/config/beans/IsisBeanTypeRegistry.java     | 5 -----
 .../jdo/datanucleus5/persistence/IsisPersistenceSessionJdo.java     | 3 +--
 .../jdo/datanucleus5/persistence/IsisTransactionManagerJdo.java     | 3 +--
 .../isis/extensions/fixtures/fixturescripts/FixtureScripts.java     | 6 +++++-
 4 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/core/config/src/main/java/org/apache/isis/config/beans/IsisBeanTypeRegistry.java b/core/config/src/main/java/org/apache/isis/config/beans/IsisBeanTypeRegistry.java
index be2ceba..2c67eb5 100644
--- a/core/config/src/main/java/org/apache/isis/config/beans/IsisBeanTypeRegistry.java
+++ b/core/config/src/main/java/org/apache/isis/config/beans/IsisBeanTypeRegistry.java
@@ -40,7 +40,6 @@ import org.apache.isis.commons.internal.base._Strings;
 import org.apache.isis.commons.internal.collections._Lists;
 import org.apache.isis.commons.internal.collections._Sets;
 import org.apache.isis.commons.internal.components.ApplicationScopedComponent;
-import org.apache.isis.commons.internal.components.SessionScopedComponent;
 import org.apache.isis.commons.internal.components.TransactionScopedComponent;
 import org.apache.isis.commons.internal.ioc.BeanSort;
 import org.apache.isis.commons.internal.reflection._Reflect;
@@ -242,10 +241,6 @@ public final class IsisBeanTypeRegistry implements IsisComponentScanInterceptor,
             return BeanSort.MANAGED_BEAN;
         }
 
-        if(SessionScopedComponent.class.isAssignableFrom(type)) {
-            return BeanSort.MANAGED_BEAN;
-        }
-
         if(TransactionScopedComponent.class.isAssignableFrom(type)) {
             return BeanSort.MANAGED_BEAN;
         }
diff --git a/core/persistence/jdo/datanucleus-5/src/main/java/org/apache/isis/persistence/jdo/datanucleus5/persistence/IsisPersistenceSessionJdo.java b/core/persistence/jdo/datanucleus-5/src/main/java/org/apache/isis/persistence/jdo/datanucleus5/persistence/IsisPersistenceSessionJdo.java
index f74cfc3..8f917ef 100644
--- a/core/persistence/jdo/datanucleus-5/src/main/java/org/apache/isis/persistence/jdo/datanucleus5/persistence/IsisPersistenceSessionJdo.java
+++ b/core/persistence/jdo/datanucleus-5/src/main/java/org/apache/isis/persistence/jdo/datanucleus5/persistence/IsisPersistenceSessionJdo.java
@@ -18,7 +18,6 @@
  */
 package org.apache.isis.persistence.jdo.datanucleus5.persistence;
 
-import org.apache.isis.commons.internal.components.SessionScopedComponent;
 import org.apache.isis.metamodel.adapter.ObjectAdapterProvider;
 import org.apache.isis.runtime.persistence.session.PersistenceSession;
 
@@ -27,7 +26,7 @@ import org.apache.isis.runtime.persistence.session.PersistenceSession;
  * @since 2.0
  */
 public interface IsisPersistenceSessionJdo 
-extends PersistenceSession, SessionScopedComponent, ObjectAdapterProvider {
+extends PersistenceSession, ObjectAdapterProvider {
 
     /**
      * to tell the underlying object store to start a transaction.
diff --git a/core/persistence/jdo/datanucleus-5/src/main/java/org/apache/isis/persistence/jdo/datanucleus5/persistence/IsisTransactionManagerJdo.java b/core/persistence/jdo/datanucleus-5/src/main/java/org/apache/isis/persistence/jdo/datanucleus5/persistence/IsisTransactionManagerJdo.java
index 79c24d0..fa5bc61 100644
--- a/core/persistence/jdo/datanucleus-5/src/main/java/org/apache/isis/persistence/jdo/datanucleus5/persistence/IsisTransactionManagerJdo.java
+++ b/core/persistence/jdo/datanucleus-5/src/main/java/org/apache/isis/persistence/jdo/datanucleus5/persistence/IsisTransactionManagerJdo.java
@@ -27,7 +27,6 @@ import org.apache.isis.applib.services.iactn.Interaction;
 import org.apache.isis.applib.services.iactn.InteractionContext;
 import org.apache.isis.applib.services.registry.ServiceRegistry;
 import org.apache.isis.commons.exceptions.IsisException;
-import org.apache.isis.commons.internal.components.SessionScopedComponent;
 import org.apache.isis.runtime.persistence.objectstore.transaction.PersistenceCommand;
 import org.apache.isis.runtime.persistence.transaction.IsisTransactionAspectSupport;
 import org.apache.isis.runtime.persistence.transaction.IsisTransactionManagerException;
@@ -38,7 +37,7 @@ import lombok.val;
 import lombok.extern.log4j.Log4j2;
 
 @Vetoed @Log4j2
-class IsisTransactionManagerJdo implements SessionScopedComponent {
+class IsisTransactionManagerJdo {
 
     // -- constructor, fields
 
diff --git a/extensions/testing/fixtures/src/main/java/org/apache/isis/extensions/fixtures/fixturescripts/FixtureScripts.java b/extensions/testing/fixtures/src/main/java/org/apache/isis/extensions/fixtures/fixturescripts/FixtureScripts.java
index ad3489b..ae9e71b 100644
--- a/extensions/testing/fixtures/src/main/java/org/apache/isis/extensions/fixtures/fixturescripts/FixtureScripts.java
+++ b/extensions/testing/fixtures/src/main/java/org/apache/isis/extensions/fixtures/fixturescripts/FixtureScripts.java
@@ -341,7 +341,11 @@ public class FixtureScripts extends AbstractService {
     	String parameters = null;
     	
     	transactionService.executeWithinTransaction(()->{
-    		runScript(singleScript, parameters);
+    	    try {
+    	        runScript(singleScript, parameters);
+    	    } catch (Exception e) {
+    	        throw _Exceptions.unrecoverable(e);
+            }
     	});
     }
 


[isis] 01/03: ISIS-2177: remove TransactionalResource

Posted by ah...@apache.org.
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

commit 99dd950b56b3ad84aa67ad574ef5251e7c9eea58
Author: Andi Huber <ah...@apache.org>
AuthorDate: Thu Dec 12 18:56:44 2019 +0100

    ISIS-2177: remove TransactionalResource
---
 .../persistence/IsisPersistenceSessionJdo.java     | 19 ++++++++-
 .../transaction/TransactionalResource.java         | 46 ----------------------
 2 files changed, 17 insertions(+), 48 deletions(-)

diff --git a/core/persistence/jdo/datanucleus-5/src/main/java/org/apache/isis/persistence/jdo/datanucleus5/persistence/IsisPersistenceSessionJdo.java b/core/persistence/jdo/datanucleus-5/src/main/java/org/apache/isis/persistence/jdo/datanucleus5/persistence/IsisPersistenceSessionJdo.java
index 135be6f..f74cfc3 100644
--- a/core/persistence/jdo/datanucleus-5/src/main/java/org/apache/isis/persistence/jdo/datanucleus5/persistence/IsisPersistenceSessionJdo.java
+++ b/core/persistence/jdo/datanucleus-5/src/main/java/org/apache/isis/persistence/jdo/datanucleus5/persistence/IsisPersistenceSessionJdo.java
@@ -20,7 +20,6 @@ package org.apache.isis.persistence.jdo.datanucleus5.persistence;
 
 import org.apache.isis.commons.internal.components.SessionScopedComponent;
 import org.apache.isis.metamodel.adapter.ObjectAdapterProvider;
-import org.apache.isis.runtime.persistence.objectstore.transaction.TransactionalResource;
 import org.apache.isis.runtime.persistence.session.PersistenceSession;
 
 /**
@@ -28,9 +27,25 @@ import org.apache.isis.runtime.persistence.session.PersistenceSession;
  * @since 2.0
  */
 public interface IsisPersistenceSessionJdo 
-extends PersistenceSession, TransactionalResource, SessionScopedComponent, ObjectAdapterProvider {
+extends PersistenceSession, SessionScopedComponent, ObjectAdapterProvider {
 
     /**
+     * to tell the underlying object store to start a transaction.
+     */
+    void startTransaction();
+
+    /**
+     * to tell the underlying object store to commit a transaction.
+     */
+    void endTransaction();
+
+    /**
+     * to tell the underlying object store to abort a transaction.
+     */
+    void abortTransaction();
+    
+    
+    /**
      * Not type safe. For type-safe queries use <br/><br/> {@code pm().newNamedQuery(cls, queryName)}
      * @param cls
      * @param queryName
diff --git a/core/runtime/src/main/java/org/apache/isis/runtime/persistence/objectstore/transaction/TransactionalResource.java b/core/runtime/src/main/java/org/apache/isis/runtime/persistence/objectstore/transaction/TransactionalResource.java
deleted file mode 100644
index b6c2d98..0000000
--- a/core/runtime/src/main/java/org/apache/isis/runtime/persistence/objectstore/transaction/TransactionalResource.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- *  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.
- */
-
-package org.apache.isis.runtime.persistence.objectstore.transaction;
-
-/**
- * Interface for the {@link IsisTransactionManagerJdoInternal} to interact with some
- * transactional resource.
- */
-public interface TransactionalResource {
-
-    /**
-     * Used by the {@link IsisTransactionManagerJdoInternal} to tell the underlying
-     * object store to start a transaction.
-     */
-    void startTransaction();
-
-    /**
-     * Used by the {@link IsisTransactionManagerJdoInternal} to tell the underlying
-     * object store to commit a transaction.
-     */
-    void endTransaction();
-
-    /**
-     * Used by the {@link IsisTransactionManagerJdoInternal} to tell the underlying
-     * object store to abort a transaction.
-     */
-    void abortTransaction();
-
-}


[isis] 03/03: Merge remote-tracking branch 'origin/master'

Posted by ah...@apache.org.
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

commit 8e8549eca0b4ef382b8a524dcd69566fb24153b7
Merge: c8feea8 bc37df1
Author: Andi Huber <ah...@apache.org>
AuthorDate: Thu Dec 12 19:17:27 2019 +0100

    Merge remote-tracking branch 'origin/master'

 .../org/apache/isis/config/IsisConfiguration.java  | 15 ++++++--
 .../additional-spring-configuration-metadata.json  | 39 -------------------
 .../viewer/wicket/ui/pages/bootstrap-overrides.css |  3 ++
 core/webapp/pom.xml                                |  5 +++
 examples/demo/src/main/resources/application.yml   |  9 ++---
 .../demo/src/main/resources/static/css/page.css    | 45 ++++++++++++++++++++++
 examples/demo/src/main/resources/static/index.html | 30 +--------------
 .../demo/src/main/resources/templates/error.html   | 20 ++++++++++
 8 files changed, 89 insertions(+), 77 deletions(-)