onami-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sclas...@apache.org
Subject svn commit: r1585487 [5/5] - in /onami/sandbox/persist: ./ src/main/java/org/apache/onami/persist/ src/sandbox/ src/test/java/org/apache/onami/persist/ src/test/java/org/apache/onami/persist/test/ src/test/java/org/apache/onami/persist/test/transaction...
Date Mon, 07 Apr 2014 14:12:21 GMT
Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/exceptions/TestException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/exceptions/TestException.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/exceptions/TestException.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingNone.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingNone.java?rev=1585487&view=auto
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingNone.java
(added)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingNone.java
Mon Apr  7 14:12:18 2014
@@ -0,0 +1,49 @@
+package org.apache.onami.persist.test.transaction.testframework.tasks;
+
+/*
+ * 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.
+ */
+
+import org.apache.onami.persist.Transactional;
+import org.apache.onami.persist.test.transaction.testframework.TransactionTestEntity;
+import org.apache.onami.persist.test.transaction.testframework.TransactionalTask;
+import org.apache.onami.persist.test.transaction.testframework.exceptions.RuntimeTestException;
+import org.apache.onami.persist.test.transaction.testframework.exceptions.TestException;
+
+/**
+ * Task which stores an entity and will:
+ * - roll back if any exception happened.
+ * - throw no new exception.
+ */
+public class TaskRollingBackOnAnyThrowingNone
+    extends TransactionalTask
+{
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    @Transactional(rollbackOn = Exception.class)
+    public void doTransactional()
+        throws TestException, RuntimeTestException
+    {
+        storeEntity( new TransactionTestEntity() );
+        doOtherTasks();
+    }
+
+}

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingNone.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingNone.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingNone.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingRuntimeTestException.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingRuntimeTestException.java?rev=1585487&view=auto
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingRuntimeTestException.java
(added)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingRuntimeTestException.java
Mon Apr  7 14:12:18 2014
@@ -0,0 +1,50 @@
+package org.apache.onami.persist.test.transaction.testframework.tasks;
+
+/*
+ * 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.
+ */
+
+import org.apache.onami.persist.Transactional;
+import org.apache.onami.persist.test.transaction.testframework.TransactionTestEntity;
+import org.apache.onami.persist.test.transaction.testframework.TransactionalTask;
+import org.apache.onami.persist.test.transaction.testframework.exceptions.RuntimeTestException;
+import org.apache.onami.persist.test.transaction.testframework.exceptions.TestException;
+
+/**
+ * Task which stores an entity and will:
+ * - roll back if any exception happened.
+ * - throw a new {@link org.apache.onami.persist.test.transaction.testframework.exceptions.RuntimeTestException}.
+ */
+public class TaskRollingBackOnAnyThrowingRuntimeTestException
+    extends TransactionalTask
+{
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    @Transactional(rollbackOn = Exception.class)
+    public void doTransactional()
+        throws TestException, RuntimeTestException
+    {
+        storeEntity( new TransactionTestEntity() );
+        doOtherTasks();
+        throw new RuntimeTestException( getClass().getSimpleName() );
+    }
+
+}

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingRuntimeTestException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingRuntimeTestException.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingRuntimeTestException.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingTestException.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingTestException.java?rev=1585487&view=auto
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingTestException.java
(added)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingTestException.java
Mon Apr  7 14:12:18 2014
@@ -0,0 +1,50 @@
+package org.apache.onami.persist.test.transaction.testframework.tasks;
+
+/*
+ * 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.
+ */
+
+import org.apache.onami.persist.Transactional;
+import org.apache.onami.persist.test.transaction.testframework.TransactionTestEntity;
+import org.apache.onami.persist.test.transaction.testframework.TransactionalTask;
+import org.apache.onami.persist.test.transaction.testframework.exceptions.RuntimeTestException;
+import org.apache.onami.persist.test.transaction.testframework.exceptions.TestException;
+
+/**
+ * Task which stores an entity and will:
+ * - roll backy if an exception happened.
+ * - throw a new {@link org.apache.onami.persist.test.transaction.testframework.exceptions.TestException}.
+ */
+public class TaskRollingBackOnAnyThrowingTestException
+    extends TransactionalTask
+{
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    @Transactional(rollbackOn = Exception.class)
+    public void doTransactional()
+        throws TestException, RuntimeTestException
+    {
+        storeEntity( new TransactionTestEntity() );
+        doOtherTasks();
+        throw new TestException( getClass().getSimpleName() );
+    }
+
+}

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingTestException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingTestException.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingTestException.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingNone.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingNone.java?rev=1585487&view=auto
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingNone.java
(added)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingNone.java
Mon Apr  7 14:12:18 2014
@@ -0,0 +1,49 @@
+package org.apache.onami.persist.test.transaction.testframework.tasks;
+
+/*
+ * 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.
+ */
+
+import org.apache.onami.persist.Transactional;
+import org.apache.onami.persist.test.transaction.testframework.TransactionTestEntity;
+import org.apache.onami.persist.test.transaction.testframework.TransactionalTask;
+import org.apache.onami.persist.test.transaction.testframework.exceptions.RuntimeTestException;
+import org.apache.onami.persist.test.transaction.testframework.exceptions.TestException;
+
+/**
+ * Task which stores an entity and will:
+ * - never roll back.
+ * - throw no new exception.
+ */
+public class TaskRollingBackOnNoneThrowingNone
+    extends TransactionalTask
+{
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    @Transactional(ignore = Exception.class)
+    public void doTransactional()
+        throws TestException, RuntimeTestException
+    {
+        storeEntity( new TransactionTestEntity() );
+        doOtherTasks();
+    }
+
+}

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingNone.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingNone.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingNone.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingRuntimeTestException.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingRuntimeTestException.java?rev=1585487&view=auto
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingRuntimeTestException.java
(added)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingRuntimeTestException.java
Mon Apr  7 14:12:18 2014
@@ -0,0 +1,50 @@
+package org.apache.onami.persist.test.transaction.testframework.tasks;
+
+/*
+ * 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.
+ */
+
+import org.apache.onami.persist.Transactional;
+import org.apache.onami.persist.test.transaction.testframework.TransactionTestEntity;
+import org.apache.onami.persist.test.transaction.testframework.TransactionalTask;
+import org.apache.onami.persist.test.transaction.testframework.exceptions.RuntimeTestException;
+import org.apache.onami.persist.test.transaction.testframework.exceptions.TestException;
+
+/**
+ * Task which stores an entity and will:
+ * - never roll back.
+ * - throw a new {@link org.apache.onami.persist.test.transaction.testframework.exceptions.RuntimeTestException}.
+ */
+public class TaskRollingBackOnNoneThrowingRuntimeTestException
+    extends TransactionalTask
+{
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    @Transactional(ignore = Exception.class)
+    public void doTransactional()
+        throws TestException, RuntimeTestException
+    {
+        storeEntity( new TransactionTestEntity() );
+        doOtherTasks();
+        throw new RuntimeTestException( getClass().getSimpleName() );
+    }
+
+}

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingRuntimeTestException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingRuntimeTestException.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingRuntimeTestException.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingTestException.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingTestException.java?rev=1585487&view=auto
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingTestException.java
(added)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingTestException.java
Mon Apr  7 14:12:18 2014
@@ -0,0 +1,50 @@
+package org.apache.onami.persist.test.transaction.testframework.tasks;
+
+/*
+ * 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.
+ */
+
+import org.apache.onami.persist.Transactional;
+import org.apache.onami.persist.test.transaction.testframework.TransactionTestEntity;
+import org.apache.onami.persist.test.transaction.testframework.TransactionalTask;
+import org.apache.onami.persist.test.transaction.testframework.exceptions.RuntimeTestException;
+import org.apache.onami.persist.test.transaction.testframework.exceptions.TestException;
+
+/**
+ * Task which stores an entity and will:
+ * - never roll back.
+ * - throw a new {@link org.apache.onami.persist.test.transaction.testframework.exceptions.TestException}.
+ */
+public class TaskRollingBackOnNoneThrowingTestException
+    extends TransactionalTask
+{
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    @Transactional(ignore = Exception.class)
+    public void doTransactional()
+        throws TestException, RuntimeTestException
+    {
+        storeEntity( new TransactionTestEntity() );
+        doOtherTasks();
+        throw new TestException();
+    }
+
+}

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingTestException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingTestException.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingTestException.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingNone.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingNone.java?rev=1585487&view=auto
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingNone.java
(added)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingNone.java
Mon Apr  7 14:12:18 2014
@@ -0,0 +1,49 @@
+package org.apache.onami.persist.test.transaction.testframework.tasks;
+
+/*
+ * 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.
+ */
+
+import org.apache.onami.persist.Transactional;
+import org.apache.onami.persist.test.transaction.testframework.TransactionTestEntity;
+import org.apache.onami.persist.test.transaction.testframework.TransactionalTask;
+import org.apache.onami.persist.test.transaction.testframework.exceptions.RuntimeTestException;
+import org.apache.onami.persist.test.transaction.testframework.exceptions.TestException;
+
+/**
+ * Task which stores an entity and will:
+ * - roll back on {@link org.apache.onami.persist.test.transaction.testframework.exceptions.RuntimeTestException}.
+ * - throw no new Exception
+ */
+public class TaskRollingBackOnRuntimeTestExceptionThrowingNone
+    extends TransactionalTask
+{
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    @Transactional(rollbackOn = RuntimeTestException.class)
+    public void doTransactional()
+        throws TestException, RuntimeTestException
+    {
+        storeEntity( new TransactionTestEntity() );
+        doOtherTasks();
+    }
+
+}

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingNone.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingNone.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingNone.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingRuntimeTestException.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingRuntimeTestException.java?rev=1585487&view=auto
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingRuntimeTestException.java
(added)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingRuntimeTestException.java
Mon Apr  7 14:12:18 2014
@@ -0,0 +1,50 @@
+package org.apache.onami.persist.test.transaction.testframework.tasks;
+
+/*
+ * 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.
+ */
+
+import org.apache.onami.persist.Transactional;
+import org.apache.onami.persist.test.transaction.testframework.TransactionTestEntity;
+import org.apache.onami.persist.test.transaction.testframework.TransactionalTask;
+import org.apache.onami.persist.test.transaction.testframework.exceptions.RuntimeTestException;
+import org.apache.onami.persist.test.transaction.testframework.exceptions.TestException;
+
+/**
+ * Task which stores an entity and will:
+ * - roll back on {@link org.apache.onami.persist.test.transaction.testframework.exceptions.RuntimeTestException}.
+ * - throw a new {@link org.apache.onami.persist.test.transaction.testframework.exceptions.RuntimeTestException}.
+ */
+public class TaskRollingBackOnRuntimeTestExceptionThrowingRuntimeTestException
+    extends TransactionalTask
+{
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    @Transactional(rollbackOn = RuntimeTestException.class)
+    public void doTransactional()
+        throws TestException, RuntimeTestException
+    {
+        storeEntity( new TransactionTestEntity() );
+        doOtherTasks();
+        throw new RuntimeTestException( getClass().getSimpleName() );
+    }
+
+}

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingRuntimeTestException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingRuntimeTestException.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingRuntimeTestException.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingTestException.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingTestException.java?rev=1585487&view=auto
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingTestException.java
(added)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingTestException.java
Mon Apr  7 14:12:18 2014
@@ -0,0 +1,50 @@
+package org.apache.onami.persist.test.transaction.testframework.tasks;
+
+/*
+ * 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.
+ */
+
+import org.apache.onami.persist.Transactional;
+import org.apache.onami.persist.test.transaction.testframework.TransactionTestEntity;
+import org.apache.onami.persist.test.transaction.testframework.TransactionalTask;
+import org.apache.onami.persist.test.transaction.testframework.exceptions.RuntimeTestException;
+import org.apache.onami.persist.test.transaction.testframework.exceptions.TestException;
+
+/**
+ * Task which stores an entity and will:
+ * - roll back on {@link org.apache.onami.persist.test.transaction.testframework.exceptions.RuntimeTestException}.
+ * - throw a new {@link org.apache.onami.persist.test.transaction.testframework.exceptions.TestException}.
+ */
+public class TaskRollingBackOnRuntimeTestExceptionThrowingTestException
+    extends TransactionalTask
+{
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    @Transactional(rollbackOn = RuntimeTestException.class)
+    public void doTransactional()
+        throws TestException, RuntimeTestException
+    {
+        storeEntity( new TransactionTestEntity() );
+        doOtherTasks();
+        throw new TestException( getClass().getSimpleName() );
+    }
+
+}

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingTestException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingTestException.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingTestException.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingNone.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingNone.java?rev=1585487&view=auto
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingNone.java
(added)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingNone.java
Mon Apr  7 14:12:18 2014
@@ -0,0 +1,49 @@
+package org.apache.onami.persist.test.transaction.testframework.tasks;
+
+/*
+ * 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.
+ */
+
+import org.apache.onami.persist.Transactional;
+import org.apache.onami.persist.test.transaction.testframework.TransactionTestEntity;
+import org.apache.onami.persist.test.transaction.testframework.TransactionalTask;
+import org.apache.onami.persist.test.transaction.testframework.exceptions.RuntimeTestException;
+import org.apache.onami.persist.test.transaction.testframework.exceptions.TestException;
+
+/**
+ * Task which stores an entity and will:
+ * - roll back on {@link org.apache.onami.persist.test.transaction.testframework.exceptions.TestException}.
+ * - throw no new Exception
+ */
+public class TaskRollingBackOnTestExceptionThrowingNone
+    extends TransactionalTask
+{
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    @Transactional(rollbackOn = TestException.class)
+    public void doTransactional()
+        throws TestException, RuntimeTestException
+    {
+        storeEntity( new TransactionTestEntity() );
+        doOtherTasks();
+    }
+
+}

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingNone.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingNone.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingNone.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingRuntimeTestException.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingRuntimeTestException.java?rev=1585487&view=auto
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingRuntimeTestException.java
(added)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingRuntimeTestException.java
Mon Apr  7 14:12:18 2014
@@ -0,0 +1,50 @@
+package org.apache.onami.persist.test.transaction.testframework.tasks;
+
+/*
+ * 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.
+ */
+
+import org.apache.onami.persist.Transactional;
+import org.apache.onami.persist.test.transaction.testframework.TransactionTestEntity;
+import org.apache.onami.persist.test.transaction.testframework.TransactionalTask;
+import org.apache.onami.persist.test.transaction.testframework.exceptions.RuntimeTestException;
+import org.apache.onami.persist.test.transaction.testframework.exceptions.TestException;
+
+/**
+ * Task which stores an entity and will:
+ * - roll back on {@link org.apache.onami.persist.test.transaction.testframework.exceptions.TestException}.
+ * - throw a new {@link org.apache.onami.persist.test.transaction.testframework.exceptions.RuntimeTestException}.
+ */
+public class TaskRollingBackOnTestExceptionThrowingRuntimeTestException
+    extends TransactionalTask
+{
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    @Transactional(rollbackOn = TestException.class)
+    public void doTransactional()
+        throws TestException, RuntimeTestException
+    {
+        storeEntity( new TransactionTestEntity() );
+        doOtherTasks();
+        throw new RuntimeTestException( getClass().getSimpleName() );
+    }
+
+}

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingRuntimeTestException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingRuntimeTestException.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingRuntimeTestException.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingTestException.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingTestException.java?rev=1585487&view=auto
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingTestException.java
(added)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingTestException.java
Mon Apr  7 14:12:18 2014
@@ -0,0 +1,50 @@
+package org.apache.onami.persist.test.transaction.testframework.tasks;
+
+/*
+ * 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.
+ */
+
+import org.apache.onami.persist.Transactional;
+import org.apache.onami.persist.test.transaction.testframework.TransactionTestEntity;
+import org.apache.onami.persist.test.transaction.testframework.TransactionalTask;
+import org.apache.onami.persist.test.transaction.testframework.exceptions.RuntimeTestException;
+import org.apache.onami.persist.test.transaction.testframework.exceptions.TestException;
+
+/**
+ * Task which stores an entity and will:
+ * - roll back on {@link org.apache.onami.persist.test.transaction.testframework.exceptions.TestException}.
+ * - throw a new {@link org.apache.onami.persist.test.transaction.testframework.exceptions.TestException}.
+ */
+public class TaskRollingBackOnTestExceptionThrowingTestException
+    extends TransactionalTask
+{
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    @Transactional(rollbackOn = TestException.class)
+    public void doTransactional()
+        throws TestException, RuntimeTestException
+    {
+        storeEntity( new TransactionTestEntity() );
+        doOtherTasks();
+        throw new TestException( getClass().getSimpleName() );
+    }
+
+}

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingTestException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingTestException.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingTestException.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: onami/sandbox/persist/src/test/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/test/resources/META-INF/persistence.xml?rev=1585487&r1=1585486&r2=1585487&view=diff
==============================================================================
--- onami/sandbox/persist/src/test/resources/META-INF/persistence.xml (original)
+++ onami/sandbox/persist/src/test/resources/META-INF/persistence.xml Mon Apr  7 14:12:18
2014
@@ -2,13 +2,13 @@
 <persistence xmlns="http://java.sun.com/xml/ns/persistence"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
-        http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
+        http://java.sun.com/xml/ns/persistence/persistence_2_1.xsd" version="1.0">
 
     <!-- JPA test "unit" -->
     <persistence-unit name="testUnit" transaction-type="RESOURCE_LOCAL">
-        <provider>org.hibernate.ejb.HibernatePersistence</provider>
+        <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
 
-        <class>org.apache.onami.persist.testframework.TransactionTestEntity</class>
+        <class>org.apache.onami.persist.test.transaction.testframework.TransactionTestEntity</class>
 
         <exclude-unlisted-classes>true</exclude-unlisted-classes>
 
@@ -19,7 +19,7 @@
             <property name="hibernate.connection.password" value="sa"/>
             <property name="hibernate.connection.pool_size" value="2"/>
             <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
-            <property name="hiberante.cache_provider" value="org.hibernate.cache.NoCacheProvider"/>
+            <property name="hibernate.cache_provider" value="org.hibernate.cache.NoCacheProvider"/>
 
             <property name="hibernate.hbm2ddl.auto" value="create"/>
         </properties>

Added: onami/sandbox/persist/src/test/resources/logback-test.xml
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/test/resources/logback-test.xml?rev=1585487&view=auto
==============================================================================
--- onami/sandbox/persist/src/test/resources/logback-test.xml (added)
+++ onami/sandbox/persist/src/test/resources/logback-test.xml Mon Apr  7 14:12:18 2014
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+
+  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+    <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+      <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern>
+    </encoder>
+  </appender>
+
+  <logger name="org.hibernate.SQL" level="debug" />
+  <logger name="org.hibernate.type.descriptor" level="trace" />
+
+  <!--
+  <logger name="org.hibernate.transaction" level="debug" />
+  <logger name="org.hibernate.engine.transaction" level="debug" />
+  -->
+
+  <root level="warn">
+    <appender-ref ref="STDOUT" />
+  </root>
+
+
+</configuration>

Propchange: onami/sandbox/persist/src/test/resources/logback-test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: onami/sandbox/persist/src/test/resources/logback-test.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: onami/sandbox/persist/src/test/resources/logback-test.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message