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:03 UTC

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

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();
-
-}