syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdisabat...@apache.org
Subject [1/6] syncope git commit: [SYNCOPE-652] Upgrade Spring to 4.2.0.RELEASE + various cleanup
Date Tue, 18 Aug 2015 15:48:03 GMT
Repository: syncope
Updated Branches:
  refs/heads/SYNCOPE-156 f0883ca5f -> 5336431db


http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/DomainTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/DomainTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/DomainTest.java
index a447f29..2924d34 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/DomainTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/DomainTest.java
@@ -33,7 +33,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class DomainTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/GroupTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/GroupTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/GroupTest.java
index c6a31ef..0b24a25 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/GroupTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/GroupTest.java
@@ -32,7 +32,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class GroupTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/MultitenancyTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/MultitenancyTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/MultitenancyTest.java
index a39de84..074c26e 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/MultitenancyTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/MultitenancyTest.java
@@ -44,11 +44,9 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
 import org.springframework.security.core.GrantedAuthority;
 import org.springframework.security.core.context.SecurityContextHolder;
-import org.springframework.test.context.transaction.TransactionConfiguration;
 import org.springframework.transaction.annotation.Transactional;
 
-@TransactionConfiguration(transactionManager = "TwoTransactionManager")
-@Transactional
+@Transactional("Two")
 public class MultitenancyTest extends AbstractTest {
 
     @Autowired
@@ -85,7 +83,7 @@ public class MultitenancyTest extends AbstractTest {
 
     @Test
     public void readPlainSchemas() {
-        assertEquals(18, plainSchemaDAO.findAll().size());
+        assertEquals(16, plainSchemaDAO.findAll().size());
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/NotificationTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/NotificationTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/NotificationTest.java
index 150b924..b97cbd4 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/NotificationTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/NotificationTest.java
@@ -33,7 +33,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class NotificationTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainAttrTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainAttrTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainAttrTest.java
index 108e622..fe53386 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainAttrTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainAttrTest.java
@@ -46,7 +46,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.crypto.codec.Base64;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class PlainAttrTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainSchemaTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainSchemaTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainSchemaTest.java
index b7c7ecc..c425460 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainSchemaTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainSchemaTest.java
@@ -38,7 +38,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class PlainSchemaTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PolicyTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PolicyTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PolicyTest.java
index ed11445..c75a148 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PolicyTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PolicyTest.java
@@ -38,7 +38,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class PolicyTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RealmTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RealmTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RealmTest.java
index 3fef2ce..4eb611a 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RealmTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RealmTest.java
@@ -41,7 +41,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class RealmTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RelationshipTypeTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RelationshipTypeTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RelationshipTypeTest.java
index 9aee7f1..9808962 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RelationshipTypeTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RelationshipTypeTest.java
@@ -35,7 +35,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class RelationshipTypeTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ReportTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ReportTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ReportTest.java
index 4318813..1144981 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ReportTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ReportTest.java
@@ -31,7 +31,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class ReportTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ResourceTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ResourceTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ResourceTest.java
index e5cee24..bdfd645 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ResourceTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ResourceTest.java
@@ -46,7 +46,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class ResourceTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RoleTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RoleTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RoleTest.java
index bf2c012..2368e38 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RoleTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RoleTest.java
@@ -34,7 +34,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class RoleTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/SecurityQuestionTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/SecurityQuestionTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/SecurityQuestionTest.java
index f17146e..08466b1 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/SecurityQuestionTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/SecurityQuestionTest.java
@@ -30,7 +30,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class SecurityQuestionTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/TaskExecTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/TaskExecTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/TaskExecTest.java
index 5385600..e840a06 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/TaskExecTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/TaskExecTest.java
@@ -35,7 +35,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class TaskExecTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/TaskTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/TaskTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/TaskTest.java
index a3bfedd..2fa4a8c 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/TaskTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/TaskTest.java
@@ -47,7 +47,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class TaskTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/UserTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/UserTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/UserTest.java
index a7e0d83..7c62ab2 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/UserTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/UserTest.java
@@ -39,7 +39,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class UserTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/VirAttrTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/VirAttrTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/VirAttrTest.java
index 95111c6..fd13cd6 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/VirAttrTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/VirAttrTest.java
@@ -37,7 +37,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class VirAttrTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/VirSchemaTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/VirSchemaTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/VirSchemaTest.java
index fc56739..10970d1 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/VirSchemaTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/VirSchemaTest.java
@@ -34,7 +34,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class VirSchemaTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/AnySearchTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/AnySearchTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/AnySearchTest.java
index 79f96ed..6c59ad0 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/AnySearchTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/AnySearchTest.java
@@ -44,7 +44,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class AnySearchTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/AnyTypeClassTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/AnyTypeClassTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/AnyTypeClassTest.java
index c9e00bb..cef688b 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/AnyTypeClassTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/AnyTypeClassTest.java
@@ -33,7 +33,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class AnyTypeClassTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/AnyTypeTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/AnyTypeTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/AnyTypeTest.java
index b3712d8..0f25f20 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/AnyTypeTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/AnyTypeTest.java
@@ -31,7 +31,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class AnyTypeTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/ConnInstanceTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/ConnInstanceTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/ConnInstanceTest.java
index 0046679..d9f79fc 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/ConnInstanceTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/ConnInstanceTest.java
@@ -35,7 +35,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class ConnInstanceTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/DerSchemaTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/DerSchemaTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/DerSchemaTest.java
index fcbe239..f4529f8 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/DerSchemaTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/DerSchemaTest.java
@@ -30,7 +30,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class DerSchemaTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/GroupTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/GroupTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/GroupTest.java
index 0777854..57e3d1f 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/GroupTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/GroupTest.java
@@ -28,7 +28,6 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.List;
-import javax.persistence.EntityManager;
 import javax.persistence.TypedQuery;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.collections4.Transformer;
@@ -59,7 +58,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class GroupTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/PlainAttrTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/PlainAttrTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/PlainAttrTest.java
index 2e46caf..82147a2 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/PlainAttrTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/PlainAttrTest.java
@@ -47,7 +47,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class PlainAttrTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/PlainSchemaTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/PlainSchemaTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/PlainSchemaTest.java
index 0917d27..ab0b88b 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/PlainSchemaTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/PlainSchemaTest.java
@@ -40,7 +40,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class PlainSchemaTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/RealmTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/RealmTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/RealmTest.java
index d55fa62..5bf1b83 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/RealmTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/RealmTest.java
@@ -31,7 +31,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class RealmTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/ReportTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/ReportTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/ReportTest.java
index 713ea64..f143fd8 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/ReportTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/ReportTest.java
@@ -35,7 +35,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class ReportTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/ResourceTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/ResourceTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/ResourceTest.java
index 0e9c8db..967b719 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/ResourceTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/ResourceTest.java
@@ -28,7 +28,6 @@ import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
-import javax.persistence.EntityManager;
 import org.apache.syncope.common.lib.types.IntMappingType;
 import org.apache.syncope.common.lib.types.MappingPurpose;
 import org.apache.syncope.common.lib.types.TaskType;
@@ -53,7 +52,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class ResourceTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/RoleTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/RoleTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/RoleTest.java
index 9764e07..2ca08bb 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/RoleTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/RoleTest.java
@@ -46,7 +46,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class RoleTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/SecurityQuestionTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/SecurityQuestionTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/SecurityQuestionTest.java
index 0a966da..14c463c 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/SecurityQuestionTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/SecurityQuestionTest.java
@@ -28,7 +28,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class SecurityQuestionTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/TaskTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/TaskTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/TaskTest.java
index f281fb4..03ff4c6 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/TaskTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/TaskTest.java
@@ -55,7 +55,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class TaskTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/UserTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/UserTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/UserTest.java
index b921cdc..62bba9c 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/UserTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/outer/UserTest.java
@@ -42,7 +42,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class UserTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/resources/domains/MasterContent.xml
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/resources/domains/MasterContent.xml b/core/persistence-jpa/src/test/resources/domains/MasterContent.xml
index 2542a1a..37ff60f 100644
--- a/core/persistence-jpa/src/test/resources/domains/MasterContent.xml
+++ b/core/persistence-jpa/src/test/resources/domains/MasterContent.xml
@@ -30,13 +30,13 @@ under the License.
   <CPlainAttrValue id="1" attribute_id="1" stringValue="SHA1"/>
 
   <!-- notificationjob.cronExpression:
-  + not existing: NotificationJob runs according to Notification.DEFAULT_CRON_EXP
+  + not existing: NotificationJob runs according to NotificationJob.DEFAULT_CRON_EXP
   + provided as empty string: NotificationJob disabled
   + provided as non-empty string: NotificationJob runs according to the given value -->
   <PlainSchema name="notificationjob.cronExpression" type="String"
                mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0"/>
   <CPlainAttr id="2" owner_id="1" schema_name="notificationjob.cronExpression"/>
-  <CPlainAttrValue id="2" attribute_id="2" stringValue=""/>
+  <CPlainAttrValue id="2" attribute_id="2" stringValue="0/5 * * * * ?"/>
   
   <PlainSchema name="notification.maxRetries" type="Long"
                mandatoryCondition="true" multivalue="0" uniqueConstraint="0" readonly="0"/>

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/persistence-jpa/src/test/resources/domains/TwoContent.xml
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/resources/domains/TwoContent.xml b/core/persistence-jpa/src/test/resources/domains/TwoContent.xml
index 39cdae2..b4c5d9b 100644
--- a/core/persistence-jpa/src/test/resources/domains/TwoContent.xml
+++ b/core/persistence-jpa/src/test/resources/domains/TwoContent.xml
@@ -29,20 +29,6 @@ under the License.
   <CPlainAttr id="1" owner_id="1" schema_name="password.cipher.algorithm"/>
   <CPlainAttrValue id="1" attribute_id="1" stringValue="SHA1"/>
 
-  <!-- notificationjob.cronExpression:
-  + not existing: NotificationJob runs according to Notification.DEFAULT_CRON_EXP
-  + provided as empty string: NotificationJob disabled
-  + provided as non-empty string: NotificationJob runs according to the given value -->
-  <PlainSchema name="notificationjob.cronExpression" type="String"
-               mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0"/>
-  <CPlainAttr id="2" owner_id="1" schema_name="notificationjob.cronExpression"/>
-  <CPlainAttrValue id="2" attribute_id="2" stringValue=""/>
-
-  <PlainSchema name="notification.maxRetries" type="Long"
-               mandatoryCondition="true" multivalue="0" uniqueConstraint="0" readonly="0"/>
-  <CPlainAttr id="3" owner_id="1" schema_name="notification.maxRetries"/>
-  <CPlainAttrValue id="3" attribute_id="3" longValue="3"/>
-
   <PlainSchema name="token.length" type="Long"
                mandatoryCondition="true" multivalue="0" uniqueConstraint="0" readonly="0"/>
   <CPlainAttr id="4" owner_id="1" schema_name="token.length"/>

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnectorManager.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnectorManager.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnectorManager.java
index 38b3f2a..a38ba50 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnectorManager.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnectorManager.java
@@ -25,6 +25,7 @@ import java.util.Map;
 import java.util.Set;
 import org.apache.commons.lang3.SerializationUtils;
 import org.apache.syncope.common.lib.types.ConnConfProperty;
+import org.apache.syncope.core.misc.security.AuthContextUtils;
 import org.apache.syncope.core.misc.spring.ApplicationContextProvider;
 import org.apache.syncope.core.persistence.api.dao.ExternalResourceDAO;
 import org.apache.syncope.core.persistence.api.entity.ConnInstance;
@@ -56,7 +57,8 @@ public class ConnectorManager implements ConnectorRegistry, ConnectorFactory {
     private ExternalResourceDAO resourceDAO;
 
     private String getBeanName(final ExternalResource resource) {
-        return String.format("connInstance-%d-%s", resource.getConnector().getKey(), resource.getKey());
+        return String.format("connInstance-%s-%d-%s",
+                AuthContextUtils.getDomain(), resource.getConnector().getKey(), resource.getKey());
     }
 
     @Override
@@ -71,7 +73,7 @@ public class ConnectorManager implements ConnectorRegistry, ConnectorFactory {
 
     @Override
     public Connector createConnector(final ConnInstance connInstance, final Set<ConnConfProperty> configuration) {
-        final ConnInstance connInstanceClone = SerializationUtils.clone(connInstance);
+        ConnInstance connInstanceClone = SerializationUtils.clone(connInstance);
 
         connInstanceClone.setConfiguration(configuration);
 
@@ -82,10 +84,11 @@ public class ConnectorManager implements ConnectorRegistry, ConnectorFactory {
     }
 
     @Override
-    public ConnInstance getOverriddenConnInstance(final ConnInstance connInstance,
-            final Set<ConnConfProperty> overridden) {
-        final Set<ConnConfProperty> configuration = new HashSet<>();
-        final Map<String, ConnConfProperty> overridable = new HashMap<>();
+    public ConnInstance getOverriddenConnInstance(
+            final ConnInstance connInstance, final Set<ConnConfProperty> overridden) {
+
+        Set<ConnConfProperty> configuration = new HashSet<>();
+        Map<String, ConnConfProperty> overridable = new HashMap<>();
 
         // add not overridable properties
         for (ConnConfProperty prop : connInstance.getConfiguration()) {
@@ -114,12 +117,12 @@ public class ConnectorManager implements ConnectorRegistry, ConnectorFactory {
 
     @Override
     public void registerConnector(final ExternalResource resource) {
-        final ConnInstance connInstance = getOverriddenConnInstance(
+        ConnInstance connInstance = getOverriddenConnInstance(
                 SerializationUtils.clone(resource.getConnector()), resource.getConnInstanceConfiguration());
-        final Connector connector = createConnector(resource.getConnector(), connInstance.getConfiguration());
+        Connector connector = createConnector(resource.getConnector(), connInstance.getConfiguration());
         LOG.debug("Connector to be registered: {}", connector);
 
-        final String beanName = getBeanName(resource);
+        String beanName = getBeanName(resource);
 
         if (ApplicationContextProvider.getBeanFactory().containsSingleton(beanName)) {
             unregisterConnector(beanName);

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/TaskJob.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/TaskJob.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/TaskJob.java
index 2001e22..dbfeca5 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/TaskJob.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/TaskJob.java
@@ -82,17 +82,29 @@ public class TaskJob implements InterruptableJob {
         this.runningThread.set(Thread.currentThread());
         this.interruptMaxRetries = context.getMergedJobDataMap().getLong(INTERRUPT_MAX_RETRIES_KEY);
 
-        AuthContextUtils.setFakeAuth(context.getMergedJobDataMap().getString(JobInstanceLoader.DOMAIN));
         try {
-            Class<?> delegateClass = ClassUtils.getClass(context.getMergedJobDataMap().getString(DELEGATE_CLASS_KEY));
-
-            ((SchedTaskJobDelegate) ApplicationContextProvider.getBeanFactory().
-                    createBean(delegateClass, AbstractBeanDefinition.AUTOWIRE_BY_NAME, false)).
-                    execute(taskKey, context.getMergedJobDataMap().getBoolean(DRY_RUN_JOBDETAIL_KEY));
-        } catch (Exception e) {
-            throw new JobExecutionException(e);
-        } finally {
-            AuthContextUtils.clearFakeAuth();
+            AuthContextUtils.execWithAuthContext(context.getMergedJobDataMap().getString(JobInstanceLoader.DOMAIN),
+                    new AuthContextUtils.Executable<Void>() {
+
+                        @Override
+                        public Void exec() {
+                            try {
+                                Class<?> delegateClass =
+                                ClassUtils.getClass(context.getMergedJobDataMap().getString(DELEGATE_CLASS_KEY));
+
+                                ((SchedTaskJobDelegate) ApplicationContextProvider.getBeanFactory().
+                                createBean(delegateClass, AbstractBeanDefinition.AUTOWIRE_BY_NAME, false)).
+                                execute(taskKey, context.getMergedJobDataMap().getBoolean(DRY_RUN_JOBDETAIL_KEY));
+                            } catch (Exception e) {
+                                throw new RuntimeException(e);
+                            }
+
+                            return null;
+                        }
+                    }
+            );
+        } catch (RuntimeException e) {
+            throw new JobExecutionException(e.getCause());
         }
     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/notification/NotificationManagerImpl.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/notification/NotificationManagerImpl.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/notification/NotificationManagerImpl.java
index 65b4618..412b978 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/notification/NotificationManagerImpl.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/notification/NotificationManagerImpl.java
@@ -375,21 +375,21 @@ public class NotificationManagerImpl implements NotificationManager {
         task.addExec(execution);
         task.setExecuted(true);
         taskDAO.save(task);
-        // this flush call is needed to generate a value for the execution id
+        // this flush call is needed to generate a value for the execution key
         taskDAO.flush();
         return execution;
     }
 
     @Override
-    public void setTaskExecuted(final Long taskId, final boolean executed) {
-        NotificationTask task = taskDAO.find(taskId);
+    public void setTaskExecuted(final Long taskKey, final boolean executed) {
+        NotificationTask task = taskDAO.find(taskKey);
         task.setExecuted(executed);
         taskDAO.save(task);
     }
 
     @Override
-    public long countExecutionsWithStatus(final Long taskId, final String status) {
-        NotificationTask task = taskDAO.find(taskId);
+    public long countExecutionsWithStatus(final Long taskKey, final String status) {
+        NotificationTask task = taskDAO.find(taskKey);
         long count = 0;
         for (TaskExec taskExec : task.getExecs()) {
             if (status == null) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/provisioning-java/src/test/java/org/apache/syncope/core/provisioning/java/AbstractTest.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/test/java/org/apache/syncope/core/provisioning/java/AbstractTest.java b/core/provisioning-java/src/test/java/org/apache/syncope/core/provisioning/java/AbstractTest.java
index 07bda8a..e26f238 100644
--- a/core/provisioning-java/src/test/java/org/apache/syncope/core/provisioning/java/AbstractTest.java
+++ b/core/provisioning-java/src/test/java/org/apache/syncope/core/provisioning/java/AbstractTest.java
@@ -21,7 +21,6 @@ package org.apache.syncope.core.provisioning.java;
 import org.junit.runner.RunWith;
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.test.context.transaction.TransactionConfiguration;
 
 @RunWith(SpringJUnit4ClassRunner.class)
 @ContextConfiguration(locations = {
@@ -30,6 +29,5 @@ import org.springframework.test.context.transaction.TransactionConfiguration;
     "classpath:workflowContext.xml",
     "classpath:provisioningTest.xml"
 })
-@TransactionConfiguration(transactionManager = "MasterTransactionManager")
 public abstract class AbstractTest {
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/provisioning-java/src/test/java/org/apache/syncope/core/provisioning/java/ConnectorManagerTest.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/test/java/org/apache/syncope/core/provisioning/java/ConnectorManagerTest.java b/core/provisioning-java/src/test/java/org/apache/syncope/core/provisioning/java/ConnectorManagerTest.java
index 1a71b89..205aa2f 100644
--- a/core/provisioning-java/src/test/java/org/apache/syncope/core/provisioning/java/ConnectorManagerTest.java
+++ b/core/provisioning-java/src/test/java/org/apache/syncope/core/provisioning/java/ConnectorManagerTest.java
@@ -31,7 +31,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.util.ReflectionTestUtils;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class ConnectorManagerTest extends AbstractTest {
 
     private ConnectorManager connManager;

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/provisioning-java/src/test/java/org/apache/syncope/core/provisioning/java/MappingTest.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/test/java/org/apache/syncope/core/provisioning/java/MappingTest.java b/core/provisioning-java/src/test/java/org/apache/syncope/core/provisioning/java/MappingTest.java
index eb100f3..8bf191e 100644
--- a/core/provisioning-java/src/test/java/org/apache/syncope/core/provisioning/java/MappingTest.java
+++ b/core/provisioning-java/src/test/java/org/apache/syncope/core/provisioning/java/MappingTest.java
@@ -33,7 +33,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class MappingTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/provisioning-java/src/test/java/org/apache/syncope/core/provisioning/java/ResourceDataBinderTest.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/test/java/org/apache/syncope/core/provisioning/java/ResourceDataBinderTest.java b/core/provisioning-java/src/test/java/org/apache/syncope/core/provisioning/java/ResourceDataBinderTest.java
index f0a706c..13f1557 100644
--- a/core/provisioning-java/src/test/java/org/apache/syncope/core/provisioning/java/ResourceDataBinderTest.java
+++ b/core/provisioning-java/src/test/java/org/apache/syncope/core/provisioning/java/ResourceDataBinderTest.java
@@ -43,7 +43,7 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional
+@Transactional("Master")
 public class ResourceDataBinderTest extends AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConfigurationServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConfigurationServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConfigurationServiceImpl.java
index 90bb6be..09e0779 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConfigurationServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConfigurationServiceImpl.java
@@ -55,8 +55,8 @@ public class ConfigurationServiceImpl extends AbstractServiceImpl implements Con
     }
 
     @Override
-    public void delete(final String key) {
-        logic.delete(key);
+    public void delete(final String schema) {
+        logic.delete(schema);
     }
 
     @Override
@@ -65,13 +65,12 @@ public class ConfigurationServiceImpl extends AbstractServiceImpl implements Con
     }
 
     @Override
-    public AttrTO read(final String key) {
-        return logic.read(key);
+    public AttrTO get(final String schema) {
+        return logic.get(schema);
     }
 
     @Override
-    public void set(final String key, final AttrTO value) {
-        value.setSchema(key);
+    public void set(final AttrTO value) {
         logic.set(value);
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/fit/core-reference/pom.xml
----------------------------------------------------------------------
diff --git a/fit/core-reference/pom.xml b/fit/core-reference/pom.xml
index d7e27dc..1339153 100644
--- a/fit/core-reference/pom.xml
+++ b/fit/core-reference/pom.xml
@@ -102,6 +102,11 @@ under the License.
     
     <!-- TEST -->
     <dependency>
+      <groupId>com.icegreen</groupId>
+      <artifactId>greenmail</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
       <groupId>org.apache.syncope.fit</groupId>
       <artifactId>syncope-fit-build-tools</artifactId>
       <version>${project.version}</version>

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/fit/core-reference/src/main/resources/mail.properties
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/main/resources/mail.properties b/fit/core-reference/src/main/resources/mail.properties
new file mode 100644
index 0000000..66f2e90
--- /dev/null
+++ b/fit/core-reference/src/main/resources/mail.properties
@@ -0,0 +1,25 @@
+# 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.
+templates.directory=${conf.directory}
+smtpHost=localhost
+smtpPort=2525
+smtpUser=
+smtpPassword=
+smtpProtocol=smtp
+smtpEncoding=UTF-8
+smtpConnectionTimeout=3000
+mailDebug=false

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AbstractTaskITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AbstractTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AbstractTaskITCase.java
index 7bdd7c5..fe79eda 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AbstractTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AbstractTaskITCase.java
@@ -33,6 +33,8 @@ import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.Predicate;
 import org.apache.syncope.client.lib.SyncopeClient;
 import org.apache.syncope.common.lib.to.AbstractTaskTO;
 import org.apache.syncope.common.lib.to.NotificationTaskTO;
@@ -41,6 +43,7 @@ import org.apache.syncope.common.lib.to.TaskExecTO;
 import org.apache.syncope.common.lib.to.UserTO;
 import org.apache.syncope.common.lib.types.TaskType;
 import org.apache.syncope.common.rest.api.service.TaskService;
+import org.apache.syncope.core.logic.notification.NotificationJob;
 
 public abstract class AbstractTaskITCase extends AbstractITCase {
 
@@ -88,8 +91,8 @@ public abstract class AbstractTaskITCase extends AbstractITCase {
         }
     }
 
-    public static TaskExecTO execProvisioningTask(
-            final TaskService taskService, final Long taskKey, final int maxWaitSeconds, final boolean dryRun) {
+    protected static TaskExecTO execTask(final TaskService taskService, final Long taskKey, final String initialStatus,
+            final int maxWaitSeconds, final boolean dryRun) {
 
         AbstractTaskTO taskTO = taskService.read(taskKey);
         assertNotNull(taskTO);
@@ -97,12 +100,12 @@ public abstract class AbstractTaskITCase extends AbstractITCase {
 
         int preSyncSize = taskTO.getExecutions().size();
         TaskExecTO execution = taskService.execute(taskTO.getKey(), dryRun);
-        assertEquals("JOB_FIRED", execution.getStatus());
+        assertEquals(initialStatus, execution.getStatus());
 
         int i = 0;
         int maxit = maxWaitSeconds;
 
-        // wait for sync completion (executions incremented)
+        // wait for completion (executions incremented)
         do {
             try {
                 Thread.sleep(1000);
@@ -122,6 +125,18 @@ public abstract class AbstractTaskITCase extends AbstractITCase {
         return taskTO.getExecutions().get(taskTO.getExecutions().size() - 1);
     }
 
+    public static TaskExecTO execProvisioningTask(
+            final TaskService taskService, final Long taskKey, final int maxWaitSeconds, final boolean dryRun) {
+
+        return execTask(taskService, taskKey, "JOB_FIRED", maxWaitSeconds, dryRun);
+    }
+
+    protected static TaskExecTO execNotificationTask(
+            final TaskService taskService, final Long taskKey, final int maxWaitSeconds) {
+
+        return execTask(taskService, taskKey, NotificationJob.Status.SENT.name(), maxWaitSeconds, false);
+    }
+
     protected Map<Long, TaskExecTO> execProvisioningTasks(final TaskService taskService,
             final Set<Long> taskKeys, final int maxWaitSeconds, final boolean dryRun) throws Exception {
 
@@ -154,13 +169,13 @@ public abstract class AbstractTaskITCase extends AbstractITCase {
                 taskService.list(TaskType.NOTIFICATION, SyncopeClient.getListQueryBuilder().build());
         assertNotNull(tasks);
         assertFalse(tasks.getResult().isEmpty());
-        NotificationTaskTO taskTO = null;
-        for (NotificationTaskTO task : tasks.getResult()) {
-            if (sender.equals(task.getSender())) {
-                taskTO = task;
+
+        return CollectionUtils.find(tasks.getResult(), new Predicate<NotificationTaskTO>() {
+
+            @Override
+            public boolean evaluate(final NotificationTaskTO task) {
+                return sender.equals(task.getSender());
             }
-        }
-        return taskTO;
+        });
     }
-
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ConfigurationITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ConfigurationITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ConfigurationITCase.java
index e311e41..71317e4 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ConfigurationITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ConfigurationITCase.java
@@ -58,9 +58,9 @@ public class ConfigurationITCase extends AbstractITCase {
         conf.setSchema(testKey.getKey());
         conf.getValues().add("testValue");
 
-        configurationService.set(conf.getSchema(), conf);
+        configurationService.set(conf);
 
-        AttrTO actual = configurationService.read(conf.getSchema());
+        AttrTO actual = configurationService.get(conf.getSchema());
         assertEquals(actual, conf);
     }
 
@@ -72,18 +72,18 @@ public class ConfigurationITCase extends AbstractITCase {
             assertEquals(Response.Status.NOT_FOUND, e.getType().getResponseStatus());
         }
 
-        AttrTO tokenLength = configurationService.read("token.length");
+        AttrTO tokenLength = configurationService.get("token.length");
 
         configurationService.delete("token.length");
         try {
-            configurationService.read("token.length");
+            configurationService.get("token.length");
         } catch (SyncopeClientException e) {
             assertEquals(Response.Status.NOT_FOUND, e.getType().getResponseStatus());
         }
 
-        configurationService.set(tokenLength.getSchema(), tokenLength);
+        configurationService.set(tokenLength);
 
-        AttrTO actual = configurationService.read(tokenLength.getSchema());
+        AttrTO actual = configurationService.get(tokenLength.getSchema());
         assertEquals(actual, tokenLength);
     }
 
@@ -98,20 +98,20 @@ public class ConfigurationITCase extends AbstractITCase {
 
     @Test
     public void read() {
-        AttrTO conf = configurationService.read("token.expireTime");
+        AttrTO conf = configurationService.get("token.expireTime");
         assertNotNull(conf);
     }
 
     @Test
     public void update() {
-        AttrTO expireTime = configurationService.read("token.expireTime");
+        AttrTO expireTime = configurationService.get("token.expireTime");
         int value = Integer.parseInt(expireTime.getValues().get(0));
         value++;
         expireTime.getValues().set(0, value + "");
 
-        configurationService.set(expireTime.getSchema(), expireTime);
+        configurationService.set(expireTime);
 
-        AttrTO newConfigurationTO = configurationService.read(expireTime.getSchema());
+        AttrTO newConfigurationTO = configurationService.get(expireTime.getSchema());
         assertEquals(expireTime, newConfigurationTO);
     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/MultitenancyITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/MultitenancyITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/MultitenancyITCase.java
index dda5f52..9ca7b50 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/MultitenancyITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/MultitenancyITCase.java
@@ -98,7 +98,7 @@ public class MultitenancyITCase extends AbstractITCase {
 
     @Test
     public void readPlainSchemas() {
-        assertEquals(18, adminClient.getService(SchemaService.class).list(SchemaType.PLAIN).size());
+        assertEquals(16, adminClient.getService(SchemaService.class).list(SchemaType.PLAIN).size());
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/NotificationTaskITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/NotificationTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/NotificationTaskITCase.java
index 3fd0778..02c4299 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/NotificationTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/NotificationTaskITCase.java
@@ -21,10 +21,25 @@ package org.apache.syncope.fit.core.reference;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
+import com.icegreen.greenmail.util.GreenMail;
+import com.icegreen.greenmail.util.ServerSetup;
+import java.io.InputStream;
+import java.util.Properties;
+import javax.mail.Flags;
+import javax.mail.Folder;
+import javax.mail.Message;
+import javax.mail.Session;
+import javax.mail.Store;
 import javax.ws.rs.core.Response;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.syncope.client.lib.SyncopeClient;
+import org.apache.syncope.common.lib.to.AttrTO;
+import org.apache.syncope.common.lib.to.GroupTO;
 import org.apache.syncope.common.lib.to.MembershipTO;
 import org.apache.syncope.common.lib.to.NotificationTO;
 import org.apache.syncope.common.lib.to.NotificationTaskTO;
@@ -34,6 +49,9 @@ import org.apache.syncope.common.lib.types.AnyTypeKind;
 import org.apache.syncope.common.lib.types.IntMappingType;
 import org.apache.syncope.common.lib.types.TraceLevel;
 import org.apache.syncope.common.rest.api.service.NotificationService;
+import org.apache.syncope.core.logic.notification.NotificationJob;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
 import org.junit.FixMethodOrder;
 import org.junit.Test;
 import org.junit.runners.MethodSorters;
@@ -41,38 +59,166 @@ import org.junit.runners.MethodSorters;
 @FixMethodOrder(MethodSorters.JVM)
 public class NotificationTaskITCase extends AbstractTaskITCase {
 
+    private static final String MAIL_ADDRESS = "notificationtest@syncope.apache.org";
+
+    private static final String POP3_HOST = "localhost";
+
+    private static final int POP3_PORT = 1110;
+
+    private static String SMTP_HOST;
+
+    private static int SMTP_PORT;
+
+    private static GreenMail greenMail;
+
+    @BeforeClass
+    public static void startGreenMail() {
+        Properties props = new Properties();
+        InputStream propStream = null;
+        try {
+            propStream = ExceptionMapperITCase.class.getResourceAsStream("/mail.properties");
+            props.load(propStream);
+        } catch (Exception e) {
+            LOG.error("Could not load /mail.properties", e);
+        } finally {
+            IOUtils.closeQuietly(propStream);
+        }
+
+        SMTP_HOST = props.getProperty("smtpHost");
+        assertNotNull(SMTP_HOST);
+        SMTP_PORT = Integer.parseInt(props.getProperty("smtpPort"));
+        assertNotNull(SMTP_PORT);
+
+        ServerSetup[] config = new ServerSetup[2];
+        config[0] = new ServerSetup(SMTP_PORT, SMTP_HOST, ServerSetup.PROTOCOL_SMTP);
+        config[1] = new ServerSetup(POP3_PORT, POP3_HOST, ServerSetup.PROTOCOL_POP3);
+        greenMail = new GreenMail(config);
+        greenMail.start();
+    }
+
+    @AfterClass
+    public static void stopGreenMail() {
+        if (greenMail != null) {
+            greenMail.stop();
+        }
+    }
+
+    private boolean verifyMail(final String sender, final String subject, final String mailAddress) throws Exception {
+        LOG.info("Waiting for notification to be sent...");
+        greenMail.waitForIncomingEmail(1);
+
+        boolean found = false;
+        Session session = Session.getDefaultInstance(System.getProperties());
+        session.setDebug(true);
+        Store store = session.getStore("pop3");
+        store.connect(POP3_HOST, POP3_PORT, mailAddress, mailAddress);
+
+        Folder inbox = store.getFolder("INBOX");
+        assertNotNull(inbox);
+        inbox.open(Folder.READ_WRITE);
+
+        Message[] messages = inbox.getMessages();
+        for (Message message : messages) {
+            if (sender.equals(message.getFrom()[0].toString()) && subject.equals(message.getSubject())) {
+                found = true;
+                message.setFlag(Flags.Flag.DELETED, true);
+            }
+        }
+
+        inbox.close(true);
+        store.close();
+        return found;
+    }
+
     @Test
-    public void issueSYNCOPE81() {
-        String sender = "syncope81@syncope.apache.org";
-        createNotificationTask(sender);
+    public void notifyByMail() throws Exception {
+        String sender = "syncopetest-" + getUUIDString() + "@syncope.apache.org";
+        String subject = "Test notification " + getUUIDString();
+        String recipient = createNotificationTask(true, true, TraceLevel.ALL, sender, subject);
         NotificationTaskTO taskTO = findNotificationTaskBySender(sender);
         assertNotNull(taskTO);
+        assertTrue(taskTO.getExecutions().isEmpty());
 
+        execNotificationTask(taskService, taskTO.getKey(), 50);
+
+        assertTrue(verifyMail(sender, subject, recipient));
+
+        // verify message body
+        taskTO = taskService.read(taskTO.getKey());
+        assertNotNull(taskTO);
+        assertTrue(taskTO.isExecuted());
+        assertNotNull(taskTO.getTextBody());
+        assertTrue("Notification mail text doesn't contain expected content.",
+                taskTO.getTextBody().contains("Your email address is " + recipient + "."));
+        assertTrue("Notification mail text doesn't contain expected content.",
+                taskTO.getTextBody().contains("Your email address inside a link: "
+                        + "http://localhost/?email=" + recipient.replaceAll("@", "%40") + " ."));
+    }
+
+    @Test
+    public void notifyByMailEmptyAbout() throws Exception {
+        String sender = "syncopetest-" + getUUIDString() + "@syncope.apache.org";
+        String subject = "Test notification " + getUUIDString();
+        String recipient = createNotificationTask(true, false, TraceLevel.ALL, sender, subject);
+        NotificationTaskTO taskTO = findNotificationTaskBySender(sender);
+        assertNotNull(taskTO);
         assertTrue(taskTO.getExecutions().isEmpty());
 
-        // generate an execution in order to verify the deletion of a notification task with one or more executions
-        TaskExecTO execution = taskService.execute(taskTO.getKey(), false);
-        assertEquals("NOT_SENT", execution.getStatus());
-
-        int i = 0;
-        int maxit = 50;
-        int executions = 0;
-
-        // wait for task exec completion (executions incremented)
-        do {
-            try {
-                Thread.sleep(1000);
-            } catch (InterruptedException e) {
-            }
+        execNotificationTask(taskService, taskTO.getKey(), 50);
 
-            taskTO = taskService.read(taskTO.getKey());
+        assertTrue(verifyMail(sender, subject, recipient));
+    }
+
+    @Test
+    public void notifyByMailWithRetry() throws Exception {
+        // 1. Set higher number of retries
+        AttrTO origMaxRetries = configurationService.get("notification.maxRetries");
+
+        configurationService.set(attrTO(origMaxRetries.getSchema(), "10"));
 
+        // 2. Stop mail server to force errors while sending out e-mails
+        stopGreenMail();
+
+        try {
+            // 3. create notification and user
+            String sender = "syncopetest-" + getUUIDString() + "@syncope.apache.org";
+            String subject = "Test notification " + getUUIDString();
+            createNotificationTask(true, true, TraceLevel.ALL, sender, subject);
+            NotificationTaskTO taskTO = findNotificationTaskBySender(sender);
             assertNotNull(taskTO);
-            assertNotNull(taskTO.getExecutions());
+            assertTrue(taskTO.getExecutions().isEmpty());
+
+            // 4. verify notification could not be delivered
+            execTask(taskService, taskTO.getKey(), NotificationJob.Status.NOT_SENT.name(), 5, false);
+
+            taskTO = taskService.read(taskTO.getKey());
+            assertNotNull(taskTO);
+            assertFalse(taskTO.isExecuted());
+            assertFalse(taskTO.getExecutions().isEmpty());
+            for (TaskExecTO exec : taskTO.getExecutions()) {
+                assertEquals(NotificationJob.Status.NOT_SENT.name(), exec.getStatus());
+            }
+        } finally {
+            // start mail server again
+            startGreenMail();
+            // reset number of retries
+            configurationService.set(origMaxRetries);
+        }
+    }
+
+    @Test
+    public void issueSYNCOPE81() {
+        String sender = "syncope81@syncope.apache.org";
+        createNotificationTask(true, true, TraceLevel.ALL, sender, "Test notification");
+        NotificationTaskTO taskTO = findNotificationTaskBySender(sender);
+        assertNotNull(taskTO);
+        assertTrue(taskTO.getExecutions().isEmpty());
 
-            i++;
-        } while (executions == taskTO.getExecutions().size() && i < maxit);
+        // generate an execution in order to verify the deletion of a notification task with one or more executions
+        execNotificationTask(taskService, taskTO.getKey(), 50);
 
+        taskTO = taskService.read(taskTO.getKey());
+        assertTrue(taskTO.isExecuted());
         assertFalse(taskTO.getExecutions().isEmpty());
 
         taskService.delete(taskTO.getKey());
@@ -82,7 +228,7 @@ public class NotificationTaskITCase extends AbstractTaskITCase {
     public void issueSYNCOPE86() {
         // 1. create notification task
         String sender = "syncope86@syncope.apache.org";
-        createNotificationTask(sender);
+        createNotificationTask(true, true, TraceLevel.ALL, sender, "Test notification");
 
         // 2. get NotificationTaskTO for user just created
         NotificationTaskTO taskTO = findNotificationTaskBySender(sender);
@@ -91,12 +237,12 @@ public class NotificationTaskITCase extends AbstractTaskITCase {
 
         try {
             // 3. execute the generated NotificationTask
-            TaskExecTO execution = taskService.execute(taskTO.getKey(), false);
-            assertNotNull(execution);
+            execNotificationTask(taskService, taskTO.getKey(), 50);
 
             // 4. verify
             taskTO = taskService.read(taskTO.getKey());
             assertNotNull(taskTO);
+            assertTrue(taskTO.isExecuted());
             assertEquals(1, taskTO.getExecutions().size());
         } finally {
             // Remove execution to make test re-runnable
@@ -104,39 +250,146 @@ public class NotificationTaskITCase extends AbstractTaskITCase {
         }
     }
 
-    private void createNotificationTask(final String sender) {
+    @Test
+    public void issueSYNCOPE192() throws Exception {
+        String sender = "syncopetest-" + getUUIDString() + "@syncope.apache.org";
+        String subject = "Test notification " + getUUIDString();
+        String recipient = createNotificationTask(true, true, TraceLevel.NONE, sender, subject);
+        NotificationTaskTO taskTO = findNotificationTaskBySender(sender);
+        assertNotNull(taskTO);
+        assertTrue(taskTO.getExecutions().isEmpty());
+
+        taskService.execute(taskTO.getKey(), false);
+
+        try {
+            Thread.sleep(5);
+        } catch (InterruptedException e) {
+        }
+
+        assertTrue(verifyMail(sender, subject, recipient));
+
+        // verify that last exec status was updated
+        taskTO = taskService.read(taskTO.getKey());
+        assertNotNull(taskTO);
+        assertTrue(taskTO.isExecuted());
+        assertTrue(taskTO.getExecutions().isEmpty());
+        assertTrue(StringUtils.isNotBlank(taskTO.getLatestExecStatus()));
+    }
+
+    @Test
+    public void issueSYNCOPE445() throws Exception {
+        String sender = "syncopetest-" + getUUIDString() + "@syncope.apache.org";
+        String subject = "Test notification " + getUUIDString();
+        String recipient = createNotificationTask(
+                true, true, TraceLevel.ALL, sender, subject, "syncope445@syncope.apache.org");
+        NotificationTaskTO taskTO = findNotificationTaskBySender(sender);
+        assertNotNull(taskTO);
+        assertTrue(taskTO.getExecutions().isEmpty());
+
+        execNotificationTask(taskService, taskTO.getKey(), 50);
+
+        assertTrue(verifyMail(sender, subject, recipient));
+
+        // verify task
+        taskTO = taskService.read(taskTO.getKey());
+        assertTrue(taskTO.isExecuted());
+        assertNotNull(taskTO);
+        assertTrue(taskTO.getRecipients().contains("syncope445@syncope.apache.org"));
+    }
+
+    @Test
+    public void issueSYNCOPE446() throws Exception {
         // 1. Create notification
         NotificationTO notification = new NotificationTO();
-        notification.setTraceLevel(TraceLevel.FAILURES);
+        notification.setTraceLevel(TraceLevel.ALL);
+        notification.getEvents().add("[REST]:[GroupLogic]:[]:[create]:[SUCCESS]");
+
+        String groupName = "group" + getUUIDString();
+        notification.getAbouts().put(AnyTypeKind.GROUP.name(),
+                SyncopeClient.getGroupSearchConditionBuilder().is("name").equalTo(groupName).query());
+
+        notification.setRecipients(SyncopeClient.getUserSearchConditionBuilder().inGroups(8L).query());
+        notification.setSelfAsRecipient(false);
+        notification.setRecipientAttrName("email");
+        notification.setRecipientAttrType(IntMappingType.UserPlainSchema);
+        notification.getStaticRecipients().add(MAIL_ADDRESS);
+
+        String sender = "syncopetest-" + getUUIDString() + "@syncope.apache.org";
+        notification.setSender(sender);
+        String subject = "Test notification " + getUUIDString();
+        notification.setSubject(subject);
+        notification.setTemplate("optin");
+        notification.setActive(true);
+
+        Response response = notificationService.create(notification);
+        notification = getObject(response.getLocation(), NotificationService.class, NotificationTO.class);
+        assertNotNull(notification);
+
+        // 2. create group
+        GroupTO groupTO = new GroupTO();
+        groupTO.setName(groupName);
+        groupTO.setRealm("/even/two");
+        groupTO = createGroup(groupTO);
+        assertNotNull(groupTO);
+
+        // 3. verify
+        NotificationTaskTO taskTO = findNotificationTaskBySender(sender);
+        assertNotNull(taskTO);
+
+        execNotificationTask(taskService, taskTO.getKey(), 50);
+
+        assertTrue(verifyMail(sender, subject, MAIL_ADDRESS));
+    }
+
+    @Test
+    public void issueSYNCOPE492() throws Exception {
+        String sender = "syncopetest-" + getUUIDString() + "@syncope.apache.org";
+        String subject = "Test notification " + getUUIDString();
+        createNotificationTask(false, true, TraceLevel.NONE, sender, subject, "syncope445@syncope.apache.org");
+
+        // verify that no task was created for disabled notification
+        assertNull(findNotificationTaskBySender(sender));
+    }
+
+    private String createNotificationTask(final boolean active, final boolean includeAbout, final TraceLevel traceLevel,
+            final String sender, final String subject, final String... staticRecipients) {
+
+        // 1. Create notification
+        NotificationTO notification = new NotificationTO();
+        notification.setTraceLevel(traceLevel);
         notification.getEvents().add("[REST]:[UserLogic]:[]:[create]:[SUCCESS]");
 
-        notification.getAbouts().put(AnyTypeKind.USER.name(),
-                SyncopeClient.getUserSearchConditionBuilder().inGroups(7L).query());
+        if (includeAbout) {
+            notification.getAbouts().put(AnyTypeKind.USER.name(),
+                    SyncopeClient.getUserSearchConditionBuilder().inGroups(7L).query());
+        }
 
         notification.setRecipients(SyncopeClient.getUserSearchConditionBuilder().inGroups(8L).query());
         notification.setSelfAsRecipient(true);
-
         notification.setRecipientAttrName("email");
         notification.setRecipientAttrType(IntMappingType.UserPlainSchema);
+        if (staticRecipients != null) {
+            CollectionUtils.addAll(notification.getStaticRecipients(), staticRecipients);
+        }
 
         notification.setSender(sender);
-        String subject = "Test notification";
         notification.setSubject(subject);
         notification.setTemplate("optin");
-        notification.setActive(true);
+        notification.setActive(active);
 
         Response response = notificationService.create(notification);
         notification = getObject(response.getLocation(), NotificationService.class, NotificationTO.class);
         assertNotNull(notification);
 
         // 2. create user
-        UserTO userTO = UserITCase.getUniqueSampleTO("syncope@syncope.apache.org");
+        UserTO userTO = UserITCase.getUniqueSampleTO(MAIL_ADDRESS);
         MembershipTO membershipTO = new MembershipTO();
         membershipTO.setRightKey(7);
         userTO.getMemberships().add(membershipTO);
 
         userTO = createUser(userTO);
         assertNotNull(userTO);
+        return userTO.getUsername();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/UserITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/UserITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/UserITCase.java
index 048259d..da438d3 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/UserITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/UserITCase.java
@@ -113,18 +113,17 @@ public class UserITCase extends AbstractITCase {
     }
 
     public static UserTO getSampleTO(final String email) {
-        String uid = email;
         UserTO userTO = new UserTO();
         userTO.setRealm(SyncopeConstants.ROOT_REALM);
         userTO.setPassword("password123");
-        userTO.setUsername(uid);
+        userTO.setUsername(email);
 
-        userTO.getPlainAttrs().add(attrTO("fullname", uid));
-        userTO.getPlainAttrs().add(attrTO("firstname", uid));
+        userTO.getPlainAttrs().add(attrTO("fullname", email));
+        userTO.getPlainAttrs().add(attrTO("firstname", email));
         userTO.getPlainAttrs().add(attrTO("surname", "surname"));
         userTO.getPlainAttrs().add(attrTO("type", "a type"));
-        userTO.getPlainAttrs().add(attrTO("userId", uid));
-        userTO.getPlainAttrs().add(attrTO("email", uid));
+        userTO.getPlainAttrs().add(attrTO("userId", email));
+        userTO.getPlainAttrs().add(attrTO("email", email));
         userTO.getPlainAttrs().add(attrTO("loginDate", DATE_FORMAT.get().format(new Date())));
         userTO.getDerAttrs().add(attrTO("cn", null));
         userTO.getVirAttrs().add(attrTO("virtualdata", "virtualvalue"));
@@ -1274,12 +1273,12 @@ public class UserITCase extends AbstractITCase {
 
     @Test()
     public void issueSYNCOPE51() {
-        AttrTO defaultCA = configurationService.read("password.cipher.algorithm");
+        AttrTO defaultCA = configurationService.get("password.cipher.algorithm");
         final String originalCAValue = defaultCA.getValues().get(0);
         defaultCA.getValues().set(0, "MD5");
-        configurationService.set(defaultCA.getSchema(), defaultCA);
+        configurationService.set(defaultCA);
 
-        AttrTO newCA = configurationService.read(defaultCA.getSchema());
+        AttrTO newCA = configurationService.get(defaultCA.getSchema());
         assertEquals(defaultCA, newCA);
 
         UserTO userTO = getSampleTO("syncope51@syncope.apache.org");
@@ -1294,9 +1293,9 @@ public class UserITCase extends AbstractITCase {
         }
 
         defaultCA.getValues().set(0, originalCAValue);
-        configurationService.set(defaultCA.getSchema(), defaultCA);
+        configurationService.set(defaultCA);
 
-        AttrTO oldCA = configurationService.read(defaultCA.getSchema());
+        AttrTO oldCA = configurationService.get(defaultCA.getSchema());
         assertEquals(defaultCA, oldCA);
     }
 
@@ -1428,12 +1427,12 @@ public class UserITCase extends AbstractITCase {
     @Test
     public void isseSYNCOPE136AES() {
         // 1. read configured cipher algorithm in order to be able to restore it at the end of test
-        AttrTO pwdCipherAlgo = configurationService.read("password.cipher.algorithm");
+        AttrTO pwdCipherAlgo = configurationService.get("password.cipher.algorithm");
         final String origpwdCipherAlgo = pwdCipherAlgo.getValues().get(0);
 
         // 2. set AES password cipher algorithm
         pwdCipherAlgo.getValues().set(0, "AES");
-        configurationService.set(pwdCipherAlgo.getSchema(), pwdCipherAlgo);
+        configurationService.set(pwdCipherAlgo);
 
         // 3. create user with no resources
         UserTO userTO = getUniqueSampleTO("syncope136_AES@apache.org");
@@ -1466,7 +1465,7 @@ public class UserITCase extends AbstractITCase {
 
         // 6. restore initial cipher algorithm
         pwdCipherAlgo.getValues().set(0, origpwdCipherAlgo);
-        configurationService.set(pwdCipherAlgo.getSchema(), pwdCipherAlgo);
+        configurationService.set(pwdCipherAlgo);
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/UserSelfITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/UserSelfITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/UserSelfITCase.java
index 2944cdc..34a9349 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/UserSelfITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/UserSelfITCase.java
@@ -252,8 +252,7 @@ public class UserSelfITCase extends AbstractITCase {
     @Test
     public void passwordReset() {
         // 0. ensure that password request DOES require security question
-        configurationService.set("passwordReset.securityQuestion",
-                attrTO("passwordReset.securityQuestion", "true"));
+        configurationService.set(attrTO("passwordReset.securityQuestion", "true"));
 
         // 1. create an user with security question and answer
         UserTO user = UserITCase.getUniqueSampleTO("pwdReset@syncope.apache.org");
@@ -313,8 +312,7 @@ public class UserSelfITCase extends AbstractITCase {
     @Test
     public void passwordResetWithoutSecurityQuestion() {
         // 0. disable security question for password reset
-        configurationService.set("passwordReset.securityQuestion",
-                attrTO("passwordReset.securityQuestion", "false"));
+        configurationService.set(attrTO("passwordReset.securityQuestion", "false"));
 
         // 1. create an user with security question and answer
         UserTO user = UserITCase.getUniqueSampleTO("pwdResetNoSecurityQuestion@syncope.apache.org");
@@ -350,8 +348,7 @@ public class UserSelfITCase extends AbstractITCase {
         assertNull(read.getToken());
 
         // 7. re-enable security question for password reset
-        configurationService.set("passwordReset.securityQuestion",
-                attrTO("passwordReset.securityQuestion", "true"));
+        configurationService.set(attrTO("passwordReset.securityQuestion", "true"));
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/88061761/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index b58c7e1..6330b9e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -332,7 +332,7 @@ under the License.
 
     <jackson.version>2.6.1</jackson.version>
 
-    <spring.version>4.1.7.RELEASE</spring.version>
+    <spring.version>4.2.0.RELEASE</spring.version>
     <spring-security.version>4.0.2.RELEASE</spring-security.version>
 
     <openjpa.version>2.4.0</openjpa.version>


Mime
View raw message