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 19:16:27 UTC

[isis] branch master updated: ISIS-2177: remove TransactionScopedComponent

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 4e1839d  ISIS-2177: remove TransactionScopedComponent
4e1839d is described below

commit 4e1839d82a0bc0452e9946ac2b8166e43d3ae55b
Author: Andi Huber <ah...@apache.org>
AuthorDate: Thu Dec 12 20:16:19 2019 +0100

    ISIS-2177: remove TransactionScopedComponent
---
 .../components/ApplicationScopedComponent.java     |  3 +-
 .../commons/internal/components/Component.java     | 24 -------------
 .../isis/commons/internal/components/Noop.java     | 32 ------------------
 .../components/TransactionScopedComponent.java     | 39 ----------------------
 .../isis/config/beans/IsisBeanTypeRegistry.java    | 10 ------
 .../persistence/IsisTransactionJdo.java            |  3 +-
 6 files changed, 2 insertions(+), 109 deletions(-)

diff --git a/core/commons/src/main/java/org/apache/isis/commons/internal/components/ApplicationScopedComponent.java b/core/commons/src/main/java/org/apache/isis/commons/internal/components/ApplicationScopedComponent.java
index 327e01f..5f6f63b 100644
--- a/core/commons/src/main/java/org/apache/isis/commons/internal/components/ApplicationScopedComponent.java
+++ b/core/commons/src/main/java/org/apache/isis/commons/internal/components/ApplicationScopedComponent.java
@@ -28,9 +28,8 @@ package org.apache.isis.commons.internal.components;
  * Analogous to Hibernate's <tt>SessionFactory</tt>.
  *
  * @see SessionScopedComponent
- * @see TransactionScopedComponent
  */
-public interface ApplicationScopedComponent extends Component {
+public interface ApplicationScopedComponent {
 
 
 }
diff --git a/core/commons/src/main/java/org/apache/isis/commons/internal/components/Component.java b/core/commons/src/main/java/org/apache/isis/commons/internal/components/Component.java
deleted file mode 100644
index 717f086..0000000
--- a/core/commons/src/main/java/org/apache/isis/commons/internal/components/Component.java
+++ /dev/null
@@ -1,24 +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.commons.internal.components;
-
-public interface Component {
-
-}
diff --git a/core/commons/src/main/java/org/apache/isis/commons/internal/components/Noop.java b/core/commons/src/main/java/org/apache/isis/commons/internal/components/Noop.java
deleted file mode 100644
index d2ceeb0..0000000
--- a/core/commons/src/main/java/org/apache/isis/commons/internal/components/Noop.java
+++ /dev/null
@@ -1,32 +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.commons.internal.components;
-
-/**
- * Marker interface for components that are no-ops.
- *
- * <p>
- * Originally introduced in order to support bootstrapping by dependency
- * injection frameworks; allows us to specify a no-op in the configuration files
- * which will be ignored.
- */
-public interface Noop {
-
-}
diff --git a/core/commons/src/main/java/org/apache/isis/commons/internal/components/TransactionScopedComponent.java b/core/commons/src/main/java/org/apache/isis/commons/internal/components/TransactionScopedComponent.java
deleted file mode 100644
index cf87d8b..0000000
--- a/core/commons/src/main/java/org/apache/isis/commons/internal/components/TransactionScopedComponent.java
+++ /dev/null
@@ -1,39 +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.commons.internal.components;
-
-/**
- * Indicate that the implementing component is scoped at the transaction level
- * (within a single session).
- *
- * <p>
- * Unlike {@link ApplicationScopedComponent} and {@link SessionScopedComponent}
- * there are not lifecycle (initialization/shutdown) methods here. That is, this
- * is strictly a marker interface.
- *
- * <p>
- * Analogous to Hibernate's <tt>Transaction</tt>.
- *
- * @see ApplicationScopedComponent
- * @see SessionScopedComponent
- */
-public interface TransactionScopedComponent extends Component {
-
-}
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 2c67eb5..f67b36e 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
@@ -39,8 +39,6 @@ import org.apache.isis.applib.annotation.ViewModel;
 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.TransactionScopedComponent;
 import org.apache.isis.commons.internal.ioc.BeanSort;
 import org.apache.isis.commons.internal.reflection._Reflect;
 
@@ -237,14 +235,6 @@ public final class IsisBeanTypeRegistry implements IsisComponentScanInterceptor,
             return BeanSort.VIEW_MODEL;
         }
 
-        if(ApplicationScopedComponent.class.isAssignableFrom(type)) {
-            return BeanSort.MANAGED_BEAN;
-        }
-
-        if(TransactionScopedComponent.class.isAssignableFrom(type)) {
-            return BeanSort.MANAGED_BEAN;
-        }
-        
         val aDomainObject = findNearestAnnotation(type, DomainObject.class).orElse(null);
         if(aDomainObject!=null) {
             switch (aDomainObject.nature()) {
diff --git a/core/persistence/jdo/datanucleus-5/src/main/java/org/apache/isis/persistence/jdo/datanucleus5/persistence/IsisTransactionJdo.java b/core/persistence/jdo/datanucleus-5/src/main/java/org/apache/isis/persistence/jdo/datanucleus5/persistence/IsisTransactionJdo.java
index d2f411a..db66b86 100644
--- a/core/persistence/jdo/datanucleus-5/src/main/java/org/apache/isis/persistence/jdo/datanucleus5/persistence/IsisTransactionJdo.java
+++ b/core/persistence/jdo/datanucleus-5/src/main/java/org/apache/isis/persistence/jdo/datanucleus5/persistence/IsisTransactionJdo.java
@@ -32,7 +32,6 @@ import org.apache.isis.applib.services.xactn.TransactionId;
 import org.apache.isis.applib.services.xactn.TransactionState;
 import org.apache.isis.commons.exceptions.IsisException;
 import org.apache.isis.commons.internal.collections._Inbox;
-import org.apache.isis.commons.internal.components.TransactionScopedComponent;
 import org.apache.isis.metamodel.commons.ToString;
 import org.apache.isis.metamodel.services.publishing.PublisherDispatchService;
 import org.apache.isis.metamodel.spec.ManagedObject;
@@ -61,7 +60,7 @@ import lombok.extern.log4j.Log4j2;
  * mechanism (for example, the <tt>ObjectStore</tt>) is also committed.
  */
 @Vetoed @Log4j2
-public class IsisTransactionJdo implements TransactionScopedComponent, Transaction {
+public class IsisTransactionJdo implements Transaction {
 
     public enum State {
         /**