onami-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sclas...@apache.org
Subject svn commit: r1588073 - in /onami/sandbox/persist/src: main/java/org/apache/onami/persist/ test/java/org/apache/onami/persist/ test/java/org/apache/onami/persist/test/transaction/testframework/tasks/ test/resources/ test/resources/META-INF/
Date Wed, 16 Apr 2014 20:55:53 GMT
Author: sclassen
Date: Wed Apr 16 20:55:52 2014
New Revision: 1588073

URL: http://svn.apache.org/r1588073
Log:
onami-persist: added missing license information and did some code cleanup

Added:
    onami/sandbox/persist/src/test/java/org/apache/onami/persist/PersistenceUnitModuleConfiguratorTest.java   (with props)
Modified:
    onami/sandbox/persist/src/main/java/org/apache/onami/persist/AnnotationHolder.java
    onami/sandbox/persist/src/main/java/org/apache/onami/persist/EntityManagerFactorySource.java
    onami/sandbox/persist/src/main/java/org/apache/onami/persist/JndiLookupHelper.java
    onami/sandbox/persist/src/main/java/org/apache/onami/persist/PersistenceModule.java
    onami/sandbox/persist/src/main/java/org/apache/onami/persist/PersistenceUnitModule.java
    onami/sandbox/persist/src/main/java/org/apache/onami/persist/PersistenceUnitModuleConfigurator.java
    onami/sandbox/persist/src/main/java/org/apache/onami/persist/UnconfiguredPersistenceUnitBuilder.java
    onami/sandbox/persist/src/main/java/org/apache/onami/persist/UserTransactionProviderByJndiLookup.java
    onami/sandbox/persist/src/test/java/org/apache/onami/persist/EntityManagerFactorySourceByJndiLookupTest.java
    onami/sandbox/persist/src/test/java/org/apache/onami/persist/EntityManagerFactorySourceViaProviderTest.java
    onami/sandbox/persist/src/test/java/org/apache/onami/persist/JndiLookupHelperTest.java
    onami/sandbox/persist/src/test/java/org/apache/onami/persist/TransactionalAnnotationHelperTest.java
    onami/sandbox/persist/src/test/java/org/apache/onami/persist/TransactionalAnnotationMatcher.java
    onami/sandbox/persist/src/test/java/org/apache/onami/persist/TransactionalAnnotationReaderTest.java
    onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingRuntimeTestException.java
    onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingTestException.java
    onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingRuntimeTestException.java
    onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingTestException.java
    onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingNone.java
    onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingRuntimeTestException.java
    onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingTestException.java
    onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingNone.java
    onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingRuntimeTestException.java
    onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingTestException.java
    onami/sandbox/persist/src/test/resources/META-INF/persistence.xml
    onami/sandbox/persist/src/test/resources/logback-test.xml

Modified: onami/sandbox/persist/src/main/java/org/apache/onami/persist/AnnotationHolder.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/main/java/org/apache/onami/persist/AnnotationHolder.java?rev=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/main/java/org/apache/onami/persist/AnnotationHolder.java (original)
+++ onami/sandbox/persist/src/main/java/org/apache/onami/persist/AnnotationHolder.java Wed Apr 16 20:55:52 2014
@@ -1,17 +1,50 @@
 package org.apache.onami.persist;
 
+/*
+ * 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 java.lang.annotation.Annotation;
 
+/**
+ * Object to hold the annotation of a persistence unit. may contain {@code null}.
+ */
 public class AnnotationHolder
 {
 
+    /**
+     * The annotation under which to bind current persistence unit.
+     */
     private final Class<? extends Annotation> annotation;
 
+    /**
+     * Constructor.
+     *
+     * @param annotation the annotation under which to bind the annotations. May be {@code null}.
+     */
     AnnotationHolder( Class<? extends Annotation> annotation )
     {
         this.annotation = annotation;
     }
 
+    /**
+     * @return the annotation for the current persistence unit. May return {@code null}.
+     */
     Class<? extends Annotation> getAnnotation() {
         return annotation;
     }

Modified: onami/sandbox/persist/src/main/java/org/apache/onami/persist/EntityManagerFactorySource.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/main/java/org/apache/onami/persist/EntityManagerFactorySource.java?rev=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/main/java/org/apache/onami/persist/EntityManagerFactorySource.java (original)
+++ onami/sandbox/persist/src/main/java/org/apache/onami/persist/EntityManagerFactorySource.java Wed Apr 16 20:55:52 2014
@@ -1,8 +1,37 @@
 package org.apache.onami.persist;
 
+/*
+ * 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 javax.persistence.EntityManagerFactory;
 
+/**
+ * Source for {@link EntityManagerFactory}.
+ *
+ * A source indicates that the instance is not created within the instance (compared to factory)
+ */
 public interface EntityManagerFactorySource
 {
+
+    /**
+     * @return a entity manager factory which is obtained from some source. The instance is not newly created.
+     */
     EntityManagerFactory getEntityManagerFactory();
 }

Modified: onami/sandbox/persist/src/main/java/org/apache/onami/persist/JndiLookupHelper.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/main/java/org/apache/onami/persist/JndiLookupHelper.java?rev=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/main/java/org/apache/onami/persist/JndiLookupHelper.java (original)
+++ onami/sandbox/persist/src/main/java/org/apache/onami/persist/JndiLookupHelper.java Wed Apr 16 20:55:52 2014
@@ -1,5 +1,24 @@
 package org.apache.onami.persist;
 
+/*
+ * 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 com.google.inject.Singleton;
 
 import javax.naming.InitialContext;

Modified: onami/sandbox/persist/src/main/java/org/apache/onami/persist/PersistenceModule.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/main/java/org/apache/onami/persist/PersistenceModule.java?rev=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/main/java/org/apache/onami/persist/PersistenceModule.java (original)
+++ onami/sandbox/persist/src/main/java/org/apache/onami/persist/PersistenceModule.java Wed Apr 16 20:55:52 2014
@@ -49,26 +49,29 @@ public abstract class PersistenceModule
     extends AbstractModule
 {
 
-    private List<PersistenceUnitModule> puModules;
+    private List<PersistenceUnitModuleConfigurator> configurators;
 
     private final PersistenceUnitContainer container = new PersistenceUnitContainer();
+
     private final Matcher<AnnotatedElement> transactionalMatcher = annotatedWith( Transactional.class );
+
     private final Matcher<Object> anyMatcher = any();
 
     @Override
     protected final void configure()
     {
-        if ( puModules != null )
+        if ( configurators != null )
         {
             throw new RuntimeException( "cannot reenter the configure method" );
         }
-        try {
-            puModules = new ArrayList<PersistenceUnitModule>();
+        try
+        {
+            configurators = new ArrayList<PersistenceUnitModuleConfigurator>();
             doConfigure();
         }
         finally
         {
-            puModules = null;
+            configurators = null;
         }
     }
 
@@ -76,12 +79,15 @@ public abstract class PersistenceModule
     {
         configurePersistence();
 
-        for(PersistenceUnitModule pu : puModules)
+        for ( PersistenceUnitModuleConfigurator config : configurators )
         {
+            final PersistenceUnitModule pu = config.createPuModule();
             final TxnInterceptor txnInterceptor = new TxnInterceptor();
             pu.setPersistenceUnitContainer( container );
             pu.setTransactionInterceptor( txnInterceptor );
+
             install( pu );
+
             bindInterceptor( anyMatcher, transactionalMatcher, txnInterceptor );
             bindInterceptor( transactionalMatcher, anyMatcher, txnInterceptor );
         }
@@ -91,27 +97,27 @@ public abstract class PersistenceModule
 
     protected UnannotatedPersistenceUnitBuilder addApplicationManagedPersistenceUnit( String puName )
     {
-        checkNotNull( puModules,
+        checkNotNull( configurators,
                       "calling addApplicationManagedPersistenceUnit outside of configurePersistence is not supported" );
-        final PersistenceUnitModuleConfigurator configurator = createAndAddPuModule();
-        configurator.setPuName(puName);
+        final PersistenceUnitModuleConfigurator configurator = createAndAddConfigurator();
+        configurator.setPuName( puName );
         return configurator;
     }
 
     protected UnannotatedPersistenceUnitBuilder addContainerManagedPersistenceUnit( EntityManagerFactory emf )
     {
-        checkNotNull( puModules,
+        checkNotNull( configurators,
                       "calling addContainerManagedPersistenceUnit outside of configurePersistence is not supported" );
-        final PersistenceUnitModuleConfigurator configurator = createAndAddPuModule();
+        final PersistenceUnitModuleConfigurator configurator = createAndAddConfigurator();
         configurator.setEmf( emf );
         return configurator;
     }
 
     protected UnannotatedPersistenceUnitBuilder addContainerManagedPersistenceUnitWithJndiName( String jndiName )
     {
-        checkNotNull( puModules,
+        checkNotNull( configurators,
                       "calling addContainerManagedPersistenceUnit outside of configurePersistence is not supported" );
-        final PersistenceUnitModuleConfigurator configurator = createAndAddPuModule();
+        final PersistenceUnitModuleConfigurator configurator = createAndAddConfigurator();
         configurator.setEmfJndiName( jndiName );
         return configurator;
     }
@@ -119,9 +125,9 @@ public abstract class PersistenceModule
     protected UnannotatedPersistenceUnitBuilder addContainerManagedPersistenceUnitProvidedBy(
         Provider<EntityManagerFactory> emfProvider )
     {
-        checkNotNull( puModules,
+        checkNotNull( configurators,
                       "calling addContainerManagedPersistenceUnit outside of configurePersistence is not supported" );
-        final PersistenceUnitModuleConfigurator configurator = createAndAddPuModule();
+        final PersistenceUnitModuleConfigurator configurator = createAndAddConfigurator();
         configurator.setEmfProvider( emfProvider );
         return configurator;
     }
@@ -129,9 +135,9 @@ public abstract class PersistenceModule
     protected UnannotatedPersistenceUnitBuilder addContainerManagedPersistenceUnitProvidedBy(
         Class<? extends Provider<EntityManagerFactory>> emfProviderClass )
     {
-        checkNotNull( puModules,
+        checkNotNull( configurators,
                       "calling addContainerManagedPersistenceUnit outside of configurePersistence is not supported" );
-        final PersistenceUnitModuleConfigurator configurator = createAndAddPuModule();
+        final PersistenceUnitModuleConfigurator configurator = createAndAddConfigurator();
         configurator.setEmfProviderClass( emfProviderClass );
         return configurator;
     }
@@ -139,9 +145,9 @@ public abstract class PersistenceModule
     protected UnannotatedPersistenceUnitBuilder addContainerManagedPersistenceUnitProvidedBy(
         TypeLiteral<? extends Provider<EntityManagerFactory>> emfProviderType )
     {
-        checkNotNull( puModules,
+        checkNotNull( configurators,
                       "calling addContainerManagedPersistenceUnit outside of configurePersistence is not supported" );
-        final PersistenceUnitModuleConfigurator configurator = createAndAddPuModule();
+        final PersistenceUnitModuleConfigurator configurator = createAndAddConfigurator();
         configurator.setEmfProviderType( emfProviderType );
         return configurator;
     }
@@ -149,17 +155,17 @@ public abstract class PersistenceModule
     protected UnannotatedPersistenceUnitBuilder addContainerManagedPersistenceUnitProvidedBy(
         Key<? extends Provider<EntityManagerFactory>> emfProviderKey )
     {
-        checkNotNull( puModules,
+        checkNotNull( configurators,
                       "calling addContainerManagedPersistenceUnit outside of configurePersistence is not supported" );
-        final PersistenceUnitModuleConfigurator configurator = createAndAddPuModule();
+        final PersistenceUnitModuleConfigurator configurator = createAndAddConfigurator();
         configurator.setEmfProviderKey( emfProviderKey );
         return configurator;
     }
 
-    private PersistenceUnitModuleConfigurator createAndAddPuModule()
+    private PersistenceUnitModuleConfigurator createAndAddConfigurator()
     {
         final PersistenceUnitModuleConfigurator configurator = new PersistenceUnitModuleConfigurator();
-        puModules.add( configurator.getPuModule() );
+        configurators.add( configurator );
         return configurator;
     }
 }

Modified: onami/sandbox/persist/src/main/java/org/apache/onami/persist/PersistenceUnitModule.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/main/java/org/apache/onami/persist/PersistenceUnitModule.java?rev=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/main/java/org/apache/onami/persist/PersistenceUnitModule.java (original)
+++ onami/sandbox/persist/src/main/java/org/apache/onami/persist/PersistenceUnitModule.java Wed Apr 16 20:55:52 2014
@@ -1,5 +1,24 @@
 package org.apache.onami.persist;
 
+/*
+ * 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 com.google.inject.Key;
 import com.google.inject.PrivateModule;
 import com.google.inject.util.Providers;

Modified: onami/sandbox/persist/src/main/java/org/apache/onami/persist/PersistenceUnitModuleConfigurator.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/main/java/org/apache/onami/persist/PersistenceUnitModuleConfigurator.java?rev=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/main/java/org/apache/onami/persist/PersistenceUnitModuleConfigurator.java (original)
+++ onami/sandbox/persist/src/main/java/org/apache/onami/persist/PersistenceUnitModuleConfigurator.java Wed Apr 16 20:55:52 2014
@@ -1,5 +1,24 @@
 package org.apache.onami.persist;
 
+/*
+ * 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 com.google.inject.Key;
 import com.google.inject.Provider;
 import com.google.inject.TypeLiteral;
@@ -14,6 +33,8 @@ class PersistenceUnitModuleConfigurator
 {
     private Class<? extends Annotation> annotation;
 
+    private boolean isJta = false;
+
     private UserTransaction userTransaction;
 
     private String utJndiName;
@@ -34,7 +55,7 @@ class PersistenceUnitModuleConfigurator
 
     private Key<? extends Provider<EntityManagerFactory>> emfProviderKey;
 
-    PersistenceUnitModule getPuModule()
+    PersistenceUnitModule createPuModule()
     {
         return new PersistenceUnitModule( this );
     }
@@ -47,24 +68,27 @@ class PersistenceUnitModuleConfigurator
 
     public UnconfiguredPersistenceUnitBuilder useLocalTransaction()
     {
-        // does nothing
+        isJta = false;
         return this;
     }
 
     public UnconfiguredPersistenceUnitBuilder useGlobalTransaction( UserTransaction userTransaction )
     {
+        this.isJta = true;
         this.userTransaction = userTransaction;
         return this;
     }
 
     public UnconfiguredPersistenceUnitBuilder useGlobalTransactionWithJndiName( String utJndiName )
     {
+        this.isJta = true;
         this.utJndiName = utJndiName;
         return this;
     }
 
     public UnconfiguredPersistenceUnitBuilder useGlobalTransactionProvidedBy( Provider<UserTransaction> utProvider )
     {
+        this.isJta = true;
         this.utProvider = utProvider;
         return this;
     }
@@ -72,25 +96,24 @@ class PersistenceUnitModuleConfigurator
     public UnconfiguredPersistenceUnitBuilder useGlobalTransactionProvidedBy(
         Class<? extends Provider<UserTransaction>> utProviderClass )
     {
-        utProviderKey = Key.get( utProviderClass );
-        return this;
+        return useGlobalTransactionProvidedBy( Key.get( utProviderClass ) );
     }
 
     public UnconfiguredPersistenceUnitBuilder useGlobalTransactionProvidedBy(
         TypeLiteral<? extends Provider<UserTransaction>> utProviderType )
     {
-        utProviderKey = Key.get( utProviderType );
-        return this;
+        return useGlobalTransactionProvidedBy( Key.get( utProviderType ) );
     }
 
     public UnconfiguredPersistenceUnitBuilder useGlobalTransactionProvidedBy(
         Key<? extends Provider<UserTransaction>> utProviderKey )
     {
+        this.isJta = true;
         this.utProviderKey = utProviderKey;
         return this;
     }
 
-    public void addProperties( Properties properties )
+    public void setProperties( Properties properties )
     {
         this.properties = properties;
     }
@@ -208,7 +231,7 @@ class PersistenceUnitModuleConfigurator
 
     public boolean isJta()
     {
-        return utJndiName != null || userTransaction != null || utProvider != null || utProviderKey != null;
+        return isJta;
     }
 
     public boolean isUserTransactionProvidedByJndiLookup()

Modified: onami/sandbox/persist/src/main/java/org/apache/onami/persist/UnconfiguredPersistenceUnitBuilder.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/main/java/org/apache/onami/persist/UnconfiguredPersistenceUnitBuilder.java?rev=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/main/java/org/apache/onami/persist/UnconfiguredPersistenceUnitBuilder.java (original)
+++ onami/sandbox/persist/src/main/java/org/apache/onami/persist/UnconfiguredPersistenceUnitBuilder.java Wed Apr 16 20:55:52 2014
@@ -23,5 +23,5 @@ import java.util.Properties;
 
 public interface UnconfiguredPersistenceUnitBuilder
 {
-    void addProperties( Properties properties );
+    void setProperties( Properties properties );
 }

Modified: onami/sandbox/persist/src/main/java/org/apache/onami/persist/UserTransactionProviderByJndiLookup.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/main/java/org/apache/onami/persist/UserTransactionProviderByJndiLookup.java?rev=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/main/java/org/apache/onami/persist/UserTransactionProviderByJndiLookup.java (original)
+++ onami/sandbox/persist/src/main/java/org/apache/onami/persist/UserTransactionProviderByJndiLookup.java Wed Apr 16 20:55:52 2014
@@ -1,5 +1,24 @@
 package org.apache.onami.persist;
 
+/*
+ * 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 com.google.inject.Provider;
 import com.google.inject.Singleton;
 

Modified: onami/sandbox/persist/src/test/java/org/apache/onami/persist/EntityManagerFactorySourceByJndiLookupTest.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/test/java/org/apache/onami/persist/EntityManagerFactorySourceByJndiLookupTest.java?rev=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/EntityManagerFactorySourceByJndiLookupTest.java (original)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/EntityManagerFactorySourceByJndiLookupTest.java Wed Apr 16 20:55:52 2014
@@ -1,5 +1,24 @@
 package org.apache.onami.persist;
 
+/*
+ * 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.junit.Before;
 import org.junit.Test;
 
@@ -10,6 +29,9 @@ import static org.junit.Assert.assertTha
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 
+/**
+ * Test for {@link EntityManagerFactorySourceByJndiLookup}.
+ */
 public class EntityManagerFactorySourceByJndiLookupTest
 {
 

Modified: onami/sandbox/persist/src/test/java/org/apache/onami/persist/EntityManagerFactorySourceViaProviderTest.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/test/java/org/apache/onami/persist/EntityManagerFactorySourceViaProviderTest.java?rev=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/EntityManagerFactorySourceViaProviderTest.java (original)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/EntityManagerFactorySourceViaProviderTest.java Wed Apr 16 20:55:52 2014
@@ -1,5 +1,24 @@
 package org.apache.onami.persist;
 
+/*
+ * 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 com.google.inject.Provider;
 import org.junit.Before;
 import org.junit.Test;
@@ -11,6 +30,9 @@ import static org.junit.Assert.assertTha
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 
+/**
+ * Test for {@link EntityManagerFactorySourceViaProvider}.
+ */
 public class EntityManagerFactorySourceViaProviderTest
 {
     private EntityManagerFactorySourceViaProvider sut;

Modified: onami/sandbox/persist/src/test/java/org/apache/onami/persist/JndiLookupHelperTest.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/test/java/org/apache/onami/persist/JndiLookupHelperTest.java?rev=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/JndiLookupHelperTest.java (original)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/JndiLookupHelperTest.java Wed Apr 16 20:55:52 2014
@@ -1,5 +1,24 @@
 package org.apache.onami.persist;
 
+/*
+ * 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.junit.Before;
 import org.junit.Test;
 
@@ -13,6 +32,9 @@ import static org.mockito.Mockito.doRetu
 import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.mock;
 
+/**
+ * Test for {@link JndiLookupHelper}.
+ */
 public class JndiLookupHelperTest
 {
 

Added: onami/sandbox/persist/src/test/java/org/apache/onami/persist/PersistenceUnitModuleConfiguratorTest.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/test/java/org/apache/onami/persist/PersistenceUnitModuleConfiguratorTest.java?rev=1588073&view=auto
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/PersistenceUnitModuleConfiguratorTest.java (added)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/PersistenceUnitModuleConfiguratorTest.java Wed Apr 16 20:55:52 2014
@@ -0,0 +1,293 @@
+package org.apache.onami.persist;
+
+/*
+ * 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 com.google.inject.Key;
+import com.google.inject.Provider;
+import com.google.inject.TypeLiteral;
+import org.junit.Before;
+import org.junit.Test;
+
+import javax.persistence.EntityManagerFactory;
+import javax.transaction.UserTransaction;
+import java.lang.annotation.Annotation;
+import java.util.Properties;
+
+import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.mock;
+
+/**
+ * Test for {@link PersistenceUnitModuleConfigurator}.
+ */
+public class PersistenceUnitModuleConfiguratorTest
+{
+    private PersistenceUnitModuleConfigurator sut;
+
+    @Before
+    public void setUp()
+        throws Exception
+    {
+        sut = new PersistenceUnitModuleConfigurator();
+    }
+
+    @Test
+    public void createShouldReturnNotNull()
+        throws Exception
+    {
+        final PersistenceUnitModule result = sut.createPuModule();
+        assertThat( result, notNullValue() );
+    }
+
+    @Test
+    public void shouldHandleAnnotation()
+    {
+        // given
+        Class<? extends Annotation> annotation = Annotation.class;
+        // when
+        sut.annotatedWith( annotation );
+        // then
+        assertThat( sut.getAnnotation(), sameInstance( (Class) annotation ) );
+    }
+
+    @Test
+    public void shouldHandleResourceLocale()
+    {
+        // when
+        sut.useLocalTransaction();
+        // then
+        assertThat( sut.isJta(), is( false ) );
+    }
+
+    @Test
+    public void shouldHandleUserTransaction()
+    {
+        // given
+        final UserTransaction userTransaction = mock( UserTransaction.class );
+        // when
+        sut.useGlobalTransaction( userTransaction );
+        // then
+        assertThat( sut.isJta(), is( true ) );
+        assertThat( sut.getUserTransaction(), sameInstance( userTransaction ) );
+    }
+
+    @Test
+    public void shouldHandleUserTransactionInJndi()
+    {
+        // given
+        final String utJndiName = "ut";
+        // when
+        sut.useGlobalTransactionWithJndiName( utJndiName );
+        // then
+        assertThat( sut.isJta(), is( true ) );
+        assertThat( sut.getUtJndiName(), is( utJndiName ) );
+    }
+
+    @Test
+    @SuppressWarnings( "unchecked" )
+    public void shouldHandleUserTransactionProvider()
+    {
+        // given
+        final Provider<UserTransaction> utProvider = new MockUserTransactionProvider();
+        // when
+        sut.useGlobalTransactionProvidedBy( utProvider );
+        // then
+        assertThat( sut.isJta(), is( true ) );
+        assertThat( sut.getUtProvider(), sameInstance( utProvider ) );
+    }
+
+    @Test
+    public void shouldHandleUserTransactionProviderClass()
+    {
+        // given
+        final Class<? extends Provider<UserTransaction>> utProviderClass = MockUserTransactionProvider.class;
+        // when
+        sut.useGlobalTransactionProvidedBy( utProviderClass );
+        // then
+        assertThat( sut.isJta(), is( true ) );
+        assertThat( (Key) sut.getUtProviderKey(), is( (Key) Key.get( utProviderClass ) ) );
+    }
+
+    @Test
+    public void shouldHandleUserTransactionProviderType()
+    {
+        // given
+        final TypeLiteral<? extends Provider<UserTransaction>> utProviderType =
+            TypeLiteral.get( MockUserTransactionProvider.class );
+        // when
+        sut.useGlobalTransactionProvidedBy( utProviderType );
+        // then
+        assertThat( sut.isJta(), is( true ) );
+        assertThat( (Key) sut.getUtProviderKey(), is( (Key) Key.get( utProviderType ) ) );
+    }
+
+    @Test
+    public void shouldHandleUserTransactionProviderKey()
+    {
+        // given
+        final Key<? extends Provider<UserTransaction>> utProviderKey = Key.get( MockUserTransactionProvider.class );
+        // when
+        sut.useGlobalTransactionProvidedBy( utProviderKey );
+        // then
+        assertThat( sut.isJta(), is( true ) );
+        assertThat( (Key) sut.getUtProviderKey(), is( (Key) utProviderKey ) );
+    }
+
+    @Test
+    public void shouldHandleProperties()
+    {
+        // given
+        Properties properties = mock( Properties.class );
+        // when
+        sut.setProperties( properties );
+        // then
+        assertThat( sut.getProperties(), sameInstance( properties ) );
+    }
+
+    @Test
+    public void shouldHandlePuName()
+    {
+        // given
+        final String puName = "puName";
+        // when
+        sut.setPuName( puName );
+        // then
+        assertThat( sut.isApplicationManagedPersistenceUnit(), is( true ) );
+        assertThat( sut.getPuName(), sameInstance( puName ) );
+    }
+
+    @Test
+    public void shouldHandleEmf()
+    {
+        // given
+        final EntityManagerFactory emf = mock( EntityManagerFactory.class );
+        // when
+        sut.setEmf( emf );
+        // then
+        assertThat( sut.isApplicationManagedPersistenceUnit(), is( false ) );
+        assertThat( sut.getEmf(), sameInstance( emf ) );
+        assertThat( sut.isEmfProvidedByInstance(), is( true ) );
+        assertThat( sut.isEmfProvidedByJndiLookup(), is( false ) );
+        assertThat( sut.isEmfProvidedByProvider(), is( false ) );
+        assertThat( sut.isEmfProvidedByProviderKey(), is( false ) );
+    }
+
+    @Test
+    public void shouldHandleEmfJndiName()
+    {
+        // given
+        final String emfJndiName = "emfJndiName";
+        // when
+        sut.setEmfJndiName( emfJndiName );
+        // then
+        assertThat( sut.isApplicationManagedPersistenceUnit(), is( false ) );
+        assertThat( sut.getEmfJndiName(), is( emfJndiName ) );
+        assertThat( sut.isEmfProvidedByInstance(), is( false ) );
+        assertThat( sut.isEmfProvidedByJndiLookup(), is( true ) );
+        assertThat( sut.isEmfProvidedByProvider(), is( false ) );
+        assertThat( sut.isEmfProvidedByProviderKey(), is( false ) );
+    }
+
+    @Test
+    public void shouldHandleEmfProvider()
+    {
+        // given
+        final Provider<EntityManagerFactory> emfProvider = new MockEmfProvider();
+        // when
+        sut.setEmfProvider( emfProvider );
+        // then
+        assertThat( sut.isApplicationManagedPersistenceUnit(), is( false ) );
+        assertThat( sut.getEmfProvider(), sameInstance( emfProvider ) );
+        assertThat( sut.isEmfProvidedByInstance(), is( false ) );
+        assertThat( sut.isEmfProvidedByJndiLookup(), is( false ) );
+        assertThat( sut.isEmfProvidedByProvider(), is( true ) );
+        assertThat( sut.isEmfProvidedByProviderKey(), is( false ) );
+    }
+
+    @Test
+    public void shouldHandleEmfProviderClass()
+    {
+        // given
+        final Class<? extends Provider<EntityManagerFactory>> emfProviderClass = MockEmfProvider.class;
+        // when
+        sut.setEmfProviderClass( emfProviderClass );
+        // then
+        assertThat( sut.isApplicationManagedPersistenceUnit(), is( false ) );
+        assertThat( (Key) sut.getEmfProviderKey(), is( (Key) Key.get( emfProviderClass ) ) );
+        assertThat( sut.isEmfProvidedByInstance(), is( false ) );
+        assertThat( sut.isEmfProvidedByJndiLookup(), is( false ) );
+        assertThat( sut.isEmfProvidedByProvider(), is( false ) );
+        assertThat( sut.isEmfProvidedByProviderKey(), is( true ) );
+    }
+
+    @Test
+    public void shouldHandleEmfProviderType()
+    {
+        // given
+        final TypeLiteral<? extends Provider<EntityManagerFactory>> emfProviderType =
+            TypeLiteral.get( MockEmfProvider.class );
+        // when
+        sut.setEmfProviderType( emfProviderType );
+        // then
+        assertThat( sut.isApplicationManagedPersistenceUnit(), is( false ) );
+        assertThat( (Key) sut.getEmfProviderKey(), is( (Key) Key.get( emfProviderType ) ) );
+        assertThat( sut.isEmfProvidedByInstance(), is( false ) );
+        assertThat( sut.isEmfProvidedByJndiLookup(), is( false ) );
+        assertThat( sut.isEmfProvidedByProvider(), is( false ) );
+        assertThat( sut.isEmfProvidedByProviderKey(), is( true ) );
+    }
+
+    @Test
+    public void shouldHandleEmfProviderKey()
+    {
+        // given
+        final Key<? extends Provider<EntityManagerFactory>> emfProviderKey = Key.get( MockEmfProvider.class );
+        // when
+        sut.setEmfProviderKey( emfProviderKey );
+        // then
+        assertThat( sut.isApplicationManagedPersistenceUnit(), is( false ) );
+        assertThat( (Key) sut.getEmfProviderKey(), is( (Key) emfProviderKey ) );
+        assertThat( sut.isEmfProvidedByInstance(), is( false ) );
+        assertThat( sut.isEmfProvidedByJndiLookup(), is( false ) );
+        assertThat( sut.isEmfProvidedByProvider(), is( false ) );
+        assertThat( sut.isEmfProvidedByProviderKey(), is( true ) );
+    }
+
+    // helpers
+
+    private static class MockUserTransactionProvider
+        implements Provider<UserTransaction>
+    {
+        public UserTransaction get()
+        {
+            return mock( UserTransaction.class );
+        }
+    }
+
+    private static class MockEmfProvider
+        implements Provider<EntityManagerFactory>
+    {
+        public EntityManagerFactory get()
+        {
+            return mock( EntityManagerFactory.class );
+        }
+    }
+
+}

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/PersistenceUnitModuleConfiguratorTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: onami/sandbox/persist/src/test/java/org/apache/onami/persist/PersistenceUnitModuleConfiguratorTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: onami/sandbox/persist/src/test/java/org/apache/onami/persist/TransactionalAnnotationHelperTest.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/test/java/org/apache/onami/persist/TransactionalAnnotationHelperTest.java?rev=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/TransactionalAnnotationHelperTest.java (original)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/TransactionalAnnotationHelperTest.java Wed Apr 16 20:55:52 2014
@@ -1,5 +1,24 @@
 package org.apache.onami.persist;
 
+/*
+ * 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 de.bechte.junit.runners.context.HierarchicalContextRunner;
 import org.aopalliance.intercept.MethodInvocation;
 import org.junit.Before;

Modified: onami/sandbox/persist/src/test/java/org/apache/onami/persist/TransactionalAnnotationMatcher.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/test/java/org/apache/onami/persist/TransactionalAnnotationMatcher.java?rev=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/TransactionalAnnotationMatcher.java (original)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/TransactionalAnnotationMatcher.java Wed Apr 16 20:55:52 2014
@@ -1,5 +1,24 @@
 package org.apache.onami.persist;
 
+/*
+ * 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.hamcrest.BaseMatcher;
 import org.hamcrest.Description;
 
@@ -8,6 +27,9 @@ import java.util.Arrays;
 import java.util.HashSet;
 import java.util.Set;
 
+/**
+ * Test for {@link TransactionalAnnotationMatcher}.
+ */
 public final class TransactionalAnnotationMatcher
     extends BaseMatcher<Transactional>
 {

Modified: onami/sandbox/persist/src/test/java/org/apache/onami/persist/TransactionalAnnotationReaderTest.java
URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/test/java/org/apache/onami/persist/TransactionalAnnotationReaderTest.java?rev=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/TransactionalAnnotationReaderTest.java (original)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/TransactionalAnnotationReaderTest.java Wed Apr 16 20:55:52 2014
@@ -1,5 +1,24 @@
 package org.apache.onami.persist;
 
+/*
+ * 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.aopalliance.intercept.MethodInvocation;
 import org.junit.Assert;
 import org.junit.Before;

Modified: 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=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingRuntimeTestException.java (original)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingRuntimeTestException.java Wed Apr 16 20:55:52 2014
@@ -28,7 +28,7 @@ import org.apache.onami.persist.test.tra
 /**
  * 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}.
+ * - throw a new {@link RuntimeTestException}.
  */
 public class TaskRollingBackOnAnyThrowingRuntimeTestException
     extends TransactionalTask

Modified: 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=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingTestException.java (original)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnAnyThrowingTestException.java Wed Apr 16 20:55:52 2014
@@ -28,7 +28,7 @@ import org.apache.onami.persist.test.tra
 /**
  * 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}.
+ * - throw a new {@link TestException}.
  */
 public class TaskRollingBackOnAnyThrowingTestException
     extends TransactionalTask

Modified: 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=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingRuntimeTestException.java (original)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingRuntimeTestException.java Wed Apr 16 20:55:52 2014
@@ -28,7 +28,7 @@ import org.apache.onami.persist.test.tra
 /**
  * Task which stores an entity and will:
  * - never roll back.
- * - throw a new {@link org.apache.onami.persist.test.transaction.testframework.exceptions.RuntimeTestException}.
+ * - throw a new {@link RuntimeTestException}.
  */
 public class TaskRollingBackOnNoneThrowingRuntimeTestException
     extends TransactionalTask

Modified: 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=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingTestException.java (original)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnNoneThrowingTestException.java Wed Apr 16 20:55:52 2014
@@ -28,7 +28,7 @@ import org.apache.onami.persist.test.tra
 /**
  * Task which stores an entity and will:
  * - never roll back.
- * - throw a new {@link org.apache.onami.persist.test.transaction.testframework.exceptions.TestException}.
+ * - throw a new {@link TestException}.
  */
 public class TaskRollingBackOnNoneThrowingTestException
     extends TransactionalTask

Modified: 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=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingNone.java (original)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingNone.java Wed Apr 16 20:55:52 2014
@@ -27,7 +27,7 @@ import org.apache.onami.persist.test.tra
 
 /**
  * Task which stores an entity and will:
- * - roll back on {@link org.apache.onami.persist.test.transaction.testframework.exceptions.RuntimeTestException}.
+ * - roll back on {@link RuntimeTestException}.
  * - throw no new Exception
  */
 public class TaskRollingBackOnRuntimeTestExceptionThrowingNone

Modified: 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=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingRuntimeTestException.java (original)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingRuntimeTestException.java Wed Apr 16 20:55:52 2014
@@ -27,8 +27,8 @@ import org.apache.onami.persist.test.tra
 
 /**
  * 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}.
+ * - roll back on {@link RuntimeTestException}.
+ * - throw a new {@link RuntimeTestException}.
  */
 public class TaskRollingBackOnRuntimeTestExceptionThrowingRuntimeTestException
     extends TransactionalTask

Modified: 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=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingTestException.java (original)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnRuntimeTestExceptionThrowingTestException.java Wed Apr 16 20:55:52 2014
@@ -27,8 +27,8 @@ import org.apache.onami.persist.test.tra
 
 /**
  * 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}.
+ * - roll back on {@link RuntimeTestException}.
+ * - throw a new {@link TestException}.
  */
 public class TaskRollingBackOnRuntimeTestExceptionThrowingTestException
     extends TransactionalTask

Modified: 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=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingNone.java (original)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingNone.java Wed Apr 16 20:55:52 2014
@@ -27,7 +27,7 @@ import org.apache.onami.persist.test.tra
 
 /**
  * Task which stores an entity and will:
- * - roll back on {@link org.apache.onami.persist.test.transaction.testframework.exceptions.TestException}.
+ * - roll back on {@link TestException}.
  * - throw no new Exception
  */
 public class TaskRollingBackOnTestExceptionThrowingNone

Modified: 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=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingRuntimeTestException.java (original)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingRuntimeTestException.java Wed Apr 16 20:55:52 2014
@@ -27,8 +27,8 @@ import org.apache.onami.persist.test.tra
 
 /**
  * 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}.
+ * - roll back on {@link TestException}.
+ * - throw a new {@link RuntimeTestException}.
  */
 public class TaskRollingBackOnTestExceptionThrowingRuntimeTestException
     extends TransactionalTask

Modified: 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=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingTestException.java (original)
+++ onami/sandbox/persist/src/test/java/org/apache/onami/persist/test/transaction/testframework/tasks/TaskRollingBackOnTestExceptionThrowingTestException.java Wed Apr 16 20:55:52 2014
@@ -27,8 +27,8 @@ import org.apache.onami.persist.test.tra
 
 /**
  * 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}.
+ * - roll back on {@link TestException}.
+ * - throw a new {@link TestException}.
  */
 public class TaskRollingBackOnTestExceptionThrowingTestException
     extends TransactionalTask

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=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/test/resources/META-INF/persistence.xml (original)
+++ onami/sandbox/persist/src/test/resources/META-INF/persistence.xml Wed Apr 16 20:55:52 2014
@@ -1,4 +1,22 @@
 <?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ | 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.
+-->
 <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

Modified: 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=1588073&r1=1588072&r2=1588073&view=diff
==============================================================================
--- onami/sandbox/persist/src/test/resources/logback-test.xml (original)
+++ onami/sandbox/persist/src/test/resources/logback-test.xml Wed Apr 16 20:55:52 2014
@@ -1,4 +1,22 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+ | 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.
+-->
 <configuration>
 
   <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">



Mime
View raw message