syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [15/15] syncope git commit: [SYNCOPE-652] Still several things to refine, but it starts taking shape
Date Sun, 02 Aug 2015 05:45:29 GMT
[SYNCOPE-652] Still several things to refine, but it starts taking shape


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/34a1c214
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/34a1c214
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/34a1c214

Branch: refs/heads/SYNCOPE-652
Commit: 34a1c21479aa79d2577f6d703c788a19f5f8d1c2
Parents: eec12cd
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Sun Aug 2 07:44:52 2015 +0200
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Sun Aug 2 07:44:52 2015 +0200

----------------------------------------------------------------------
 .travis.yml                                     |    4 +-
 .../console/pages/BulkActionModalPage.java      |   12 +-
 .../client/console/rest/GroupRestClient.java    |   14 +-
 .../client/console/rest/UserRestClient.java     |   14 +-
 .../client/console/pages/Configuration.java     |    2 -
 .../syncope/common/lib/to/BulkAction.java       |   10 +-
 .../syncope/common/lib/to/SchedTaskTO.java      |   10 +-
 .../common/lib/types/AbstractPolicySpec.java    |   19 +
 .../syncope/common/lib/types/AuditElements.java |    8 +
 .../syncope/common/lib/types/LoggerType.java    |    5 +-
 .../lib/types/ResourceAssociationAction.java    |   39 +
 .../types/ResourceAssociationActionType.java    |   39 -
 .../common/rest/api/CollectionWrapper.java      |    8 +-
 .../common/rest/api/service/AnyService.java     |    8 +-
 core/logic/pom.xml                              |   22 +
 .../syncope/core/logic/AnyObjectLogic.java      |   57 +-
 .../syncope/core/logic/ConfigurationLogic.java  |    3 +-
 .../apache/syncope/core/logic/GroupLogic.java   |   58 +-
 .../apache/syncope/core/logic/LoggerLogic.java  |   24 +-
 .../apache/syncope/core/logic/SyncopeLogic.java |    2 +-
 .../apache/syncope/core/logic/TaskLogic.java    |   76 +-
 .../apache/syncope/core/logic/UserLogic.java    |   67 +-
 .../logic/audit/AuditConnectionFactory.java     |  159 ---
 .../init/ImplementationClassNamesLoader.java    |   18 +-
 .../core/logic/init/JobInstanceLoaderImpl.java  |  181 ++-
 .../syncope/core/logic/init/LoggerLoader.java   |   64 +-
 .../core/logic/init/LogicInitializer.java       |    3 +
 .../logic/notification/NotificationJob.java     |  237 +---
 .../notification/NotificationJobDelegate.java   |  258 ++++
 .../syncope/core/logic/report/ReportJob.java    |  158 +--
 .../core/logic/report/ReportJobDelegate.java    |  181 +++
 .../apache/syncope/core/logic/AbstractTest.java |    4 +-
 .../apache/syncope/core/logic/MappingTest.java  |    2 +
 .../syncope/core/logic/NotificationTest.java    |    6 +-
 core/logic/src/test/resources/logicTest.xml     |    6 +-
 .../apache/syncope/core/misc/AuditManager.java  |   23 +-
 .../apache/syncope/core/misc/MappingUtils.java  |   26 +-
 .../core/misc/policy/AccountPolicyEnforcer.java |   15 +-
 .../misc/policy/PasswordPolicyEnforcer.java     |    4 +-
 .../core/misc/policy/PolicyEnforcer.java        |   10 +-
 .../core/misc/policy/PolicyEvaluator.java       |    5 +-
 .../core/misc/security/AuthContextUtils.java    |   27 +
 .../core/misc/security/PasswordGenerator.java   |   11 +-
 .../security/SyncopeAuthenticationProvider.java |   10 +-
 .../misc/security/SyncopeGrantedAuthority.java  |    7 +
 .../misc/spring/ApplicationContextProvider.java |   12 +-
 .../core/persistence/api/DomainsHolder.java     |   27 +
 .../api/content/ContentExporter.java            |    2 +-
 .../syncope/core/persistence/api/dao/DAO.java   |    2 -
 .../persistence/api/entity/task/SchedTask.java  |    4 +-
 core/persistence-jpa/pom.xml                    |    5 +
 .../jpa/content/AbstractContentDealer.java      |   57 +-
 .../jpa/content/XMLContentExporter.java         |   36 +-
 .../jpa/content/XMLContentLoader.java           |  113 +-
 .../persistence/jpa/dao/AbstractAnyDAO.java     |   17 +-
 .../core/persistence/jpa/dao/AbstractDAO.java   |   33 +-
 .../persistence/jpa/dao/JPAAnyObjectDAO.java    |    8 +-
 .../persistence/jpa/dao/JPAAnySearchDAO.java    |    6 +-
 .../persistence/jpa/dao/JPAAnyTypeClassDAO.java |    8 +-
 .../core/persistence/jpa/dao/JPAAnyTypeDAO.java |   10 +-
 .../core/persistence/jpa/dao/JPAConfDAO.java    |    8 +-
 .../persistence/jpa/dao/JPAConnInstanceDAO.java |    8 +-
 .../core/persistence/jpa/dao/JPADerAttrDAO.java |    8 +-
 .../persistence/jpa/dao/JPADerSchemaDAO.java    |   12 +-
 .../core/persistence/jpa/dao/JPADomainDAO.java  |    8 +-
 .../jpa/dao/JPAExternalResourceDAO.java         |   24 +-
 .../core/persistence/jpa/dao/JPAGroupDAO.java   |   16 +-
 .../core/persistence/jpa/dao/JPALoggerDAO.java  |    8 +-
 .../persistence/jpa/dao/JPANotificationDAO.java |    8 +-
 .../persistence/jpa/dao/JPAPlainAttrDAO.java    |    4 +-
 .../jpa/dao/JPAPlainAttrValueDAO.java           |    8 +-
 .../persistence/jpa/dao/JPAPlainSchemaDAO.java  |   12 +-
 .../core/persistence/jpa/dao/JPAPolicyDAO.java  |   12 +-
 .../core/persistence/jpa/dao/JPARealmDAO.java   |   14 +-
 .../jpa/dao/JPARelationshipTypeDAO.java         |   14 +-
 .../core/persistence/jpa/dao/JPAReportDAO.java  |   13 +-
 .../persistence/jpa/dao/JPAReportExecDAO.java   |   10 +-
 .../core/persistence/jpa/dao/JPARoleDAO.java    |   12 +-
 .../jpa/dao/JPASecurityQuestionDAO.java         |    8 +-
 .../core/persistence/jpa/dao/JPATaskDAO.java    |   15 +-
 .../persistence/jpa/dao/JPATaskExecDAO.java     |   10 +-
 .../core/persistence/jpa/dao/JPAUserDAO.java    |  181 ++-
 .../core/persistence/jpa/dao/JPAVirAttrDAO.java |    8 +-
 .../persistence/jpa/dao/JPAVirSchemaDAO.java    |   12 +-
 .../persistence/jpa/entity/group/JPAGroup.java  |    2 +-
 .../entity/task/AbstractProvisioningTask.java   |    6 +-
 .../jpa/entity/task/JPAPushTask.java            |    3 +-
 .../jpa/entity/task/JPASchedTask.java           |   11 +-
 .../jpa/entity/task/JPASyncTask.java            |    3 +-
 .../persistence/jpa/entity/user/JPAUser.java    |   10 +-
 .../spring/CommonEntityManagerFactoryConf.java  |  107 ++
 .../spring/DomainEntityManagerFactoryBean.java  |   45 +
 .../spring/DomainTransactionInterceptor.java    |   70 ++
 .../jpa/spring/SpringComponentReplacer.java     |   42 +
 .../entity/EntityValidationListener.java        |    2 +-
 .../entity/ProvisioningTaskValidator.java       |   14 +-
 .../validation/entity/SchedTaskValidator.java   |   44 +-
 .../jpa/validation/entity/UserCheck.java        |   41 -
 .../jpa/validation/entity/UserValidator.java    |  199 ---
 .../src/main/resources/audit/audit.sql          |    4 +-
 .../src/main/resources/content.xml              |  117 --
 .../src/main/resources/domains.xml              |   56 +
 .../main/resources/domains/Master.properties    |   28 +
 .../main/resources/domains/MasterContent.xml    |  124 ++
 .../src/main/resources/domains/MasterDomain.xml |  125 ++
 .../src/main/resources/persistence.properties   |   13 -
 .../src/main/resources/persistenceContext.xml   |   93 +-
 .../resources/persistenceContextEMFactory.xml   |   68 --
 .../src/main/resources/quartz/tables_h2.sql     |  266 ----
 .../main/resources/quartz/tables_mariadb.sql    |  206 ----
 .../src/main/resources/quartz/tables_mysql.sql  |  206 ----
 .../resources/quartz/tables_mysql_innodb.sql    |  221 ----
 .../src/main/resources/quartz/tables_oracle.sql |  208 ----
 .../main/resources/quartz/tables_postgres.sql   |  204 ----
 .../main/resources/quartz/tables_sqlServer.sql  |  296 -----
 .../core/persistence/jpa/AbstractTest.java      |   16 +
 .../persistence/jpa/inner/MultitenancyTest.java |  111 ++
 .../core/persistence/jpa/inner/UserTest.java    |    4 +-
 .../persistence/jpa/outer/AnyTypeClassTest.java |    4 -
 .../core/persistence/jpa/outer/GroupTest.java   |   11 +-
 .../persistence/jpa/outer/ResourceTest.java     |    5 +-
 .../core/persistence/jpa/outer/RoleTest.java    |    8 +-
 .../resources/META-INF/persistence-enhance.xml  |    2 +-
 .../src/test/resources/content.xml              | 1138 ------------------
 .../test/resources/domains/Master.properties    |   28 +
 .../test/resources/domains/MasterContent.xml    | 1131 +++++++++++++++++
 .../src/test/resources/domains/Two.properties   |   28 +
 .../src/test/resources/domains/TwoContent.xml   |  124 ++
 .../src/test/resources/domains/TwoDomain.xml    |  125 ++
 .../src/test/resources/persistence.properties   |   31 -
 .../src/test/resources/persistenceTest.xml      |    1 +
 .../api/AnyObjectProvisioningManager.java       |    5 +
 .../api/GroupProvisioningManager.java           |    3 +
 .../api/UserProvisioningManager.java            |   11 +-
 .../provisioning/api/job/JobInstanceLoader.java |   12 +-
 .../core/provisioning/api/job/JobNamer.java     |   10 +-
 .../provisioning/api/job/ProvisioningJob.java   |   28 -
 .../core/provisioning/api/job/PushJob.java      |   26 -
 .../api/job/SchedTaskJobDelegate.java           |   26 +
 .../core/provisioning/api/job/SyncJob.java      |   26 -
 .../core/provisioning/api/job/TaskJob.java      |   43 -
 .../api/propagation/PropagationManager.java     |    5 +-
 core/provisioning-java/pom.xml                  |    7 +
 .../provisioning/java/ConnectorFacadeProxy.java |    2 +-
 .../provisioning/java/ConnectorManager.java     |    2 +-
 .../DefaultAnyObjectProvisioningManager.java    |   46 +-
 .../java/DefaultGroupProvisioningManager.java   |   62 +-
 .../java/DefaultUserProvisioningManager.java    |  120 +-
 .../provisioning/java/UserSuspenderImpl.java    |    2 +-
 .../java/data/AbstractAnyDataBinder.java        |   18 +-
 .../java/data/AnyObjectDataBinderImpl.java      |    2 -
 .../java/data/ConfigurationDataBinderImpl.java  |    2 -
 .../java/data/TaskDataBinderImpl.java           |    8 +-
 .../java/job/AbstractSchedTaskJobDelegate.java  |  144 +++
 .../provisioning/java/job/AbstractTaskJob.java  |  216 ----
 .../java/job/AbstractTransactionalTaskJob.java  |   35 -
 .../core/provisioning/java/job/SampleJob.java   |   52 -
 .../java/job/SpringBeanJobFactory.java          |   12 +-
 .../core/provisioning/java/job/TaskJob.java     |  119 ++
 .../propagation/PropagationManagerImpl.java     |    6 +-
 .../java/sync/AbstractProvisioningJob.java      |  480 --------
 .../sync/AbstractProvisioningJobDelegate.java   |  434 +++++++
 .../java/sync/AbstractPushResultHandler.java    |    3 +-
 .../java/sync/AbstractSyncResultHandler.java    |    6 +-
 .../java/sync/AbstractSyncopeResultHandler.java |    2 +-
 .../provisioning/java/sync/PushJobDelegate.java |  192 +++
 .../provisioning/java/sync/PushJobImpl.java     |  189 ---
 .../provisioning/java/sync/SyncJobDelegate.java |  221 ++++
 .../provisioning/java/sync/SyncJobImpl.java     |  212 ----
 .../core/provisioning/java/sync/SyncUtils.java  |    2 +
 .../java/sync/UserSyncResultHandlerImpl.java    |    7 +-
 .../src/main/resources/provisioning.properties  |    3 +
 .../src/main/resources/provisioningContext.xml  |   27 +-
 .../src/main/resources/quartz/tables_h2.sql     |  266 ++++
 .../main/resources/quartz/tables_mariadb.sql    |  206 ++++
 .../src/main/resources/quartz/tables_mysql.sql  |  206 ++++
 .../resources/quartz/tables_mysql_innodb.sql    |  221 ++++
 .../src/main/resources/quartz/tables_oracle.sql |  208 ++++
 .../main/resources/quartz/tables_postgres.sql   |  204 ++++
 .../main/resources/quartz/tables_sqlServer.sql  |  296 +++++
 .../core/provisioning/java/AbstractTest.java    |    2 +
 .../provisioning/java/ConnectorManagerTest.java |    2 +-
 .../core/provisioning/java/TestInitializer.java |   37 +
 .../src/test/resources/provisioningTest.xml     |    7 +-
 .../rest/cxf/service/AbstractAnyService.java    |   14 +-
 .../rest/cxf/service/ConnectorServiceImpl.java  |    2 +-
 .../rest/cxf/service/ResourceServiceImpl.java   |    2 +-
 .../core/rest/cxf/service/TaskServiceImpl.java  |    2 +-
 .../activiti/ActivitiDefinitionLoader.java      |   67 +-
 .../workflow/activiti/ActivitiImportUtils.java  |   35 +-
 .../activiti/ActivitiUserWorkflowAdapter.java   |  134 +--
 .../activiti/spring/DomainProcessEngine.java    |  102 ++
 .../spring/DomainProcessEngineFactoryBean.java  |  104 ++
 .../task/AbstractActivitiServiceTask.java       |    7 +-
 .../workflow/activiti/task/AutoActivate.java    |    2 +-
 .../core/workflow/activiti/task/Create.java     |    8 +-
 .../core/workflow/activiti/task/Delete.java     |    5 +-
 .../workflow/activiti/task/GenerateToken.java   |    5 +-
 .../core/workflow/activiti/task/Notify.java     |    9 +-
 .../workflow/activiti/task/PasswordReset.java   |   11 +-
 .../core/workflow/activiti/task/Update.java     |   12 +-
 .../main/resources/workflowActivitiContext.xml  |   17 +-
 .../core/workflow/api/UserWorkflowAdapter.java  |    6 +-
 .../java/AbstractAnyObjectWorkflowAdapter.java  |    3 +-
 .../java/AbstractGroupWorkflowAdapter.java      |    3 +-
 .../java/AbstractUserWorkflowAdapter.java       |    3 +-
 .../java/DefaultUserWorkflowAdapter.java        |    2 -
 .../core/logic/init/CamelRouteLoader.java       |   28 +-
 .../persistence/jpa/dao/JPACamelRouteDAO.java   |   10 +-
 .../CamelAnyObjectProvisioningManager.java      |   19 +
 .../camel/CamelGroupProvisioningManager.java    |   23 +-
 .../camel/CamelUserProvisioningManager.java     |   59 +-
 .../processor/AnyObjectCreateProcessor.java     |    2 +-
 .../processor/AnyObjectDeleteProcessor.java     |    2 +-
 .../AnyObjectDeprovisionProcessor.java          |    2 +-
 .../processor/AnyObjectProvisionProcessor.java  |   77 ++
 .../processor/AnyObjectUpdateProcessor.java     |    2 +-
 .../camel/processor/GroupCreateProcessor.java   |    2 +-
 .../camel/processor/GroupDeleteProcessor.java   |    2 +-
 .../processor/GroupDeprovisionProcessor.java    |    4 +-
 .../processor/GroupProvisionProcessor.java      |   77 ++
 .../camel/processor/GroupUpdateProcessor.java   |    2 +-
 .../processor/UserConfirmPwdResetProcessor.java |    7 +-
 .../camel/processor/UserCreateProcessor.java    |    2 +-
 .../camel/processor/UserDeleteProcessor.java    |    2 +-
 .../processor/UserDeprovisionProcessor.java     |    2 +-
 .../camel/processor/UserProvisionProcessor.java |   98 ++
 .../processor/UserSetStatusInSyncProcessor.java |    2 +-
 .../UserStatusPropagationProcessor.java         |   13 +-
 .../processor/UserUpdateInSyncProcessor.java    |    2 +-
 .../camel/processor/UserUpdateProcessor.java    |    2 +-
 .../src/main/resources/anyObjectRoutes.xml      |    6 +
 .../src/main/resources/groupRoutes.xml          |    6 +
 .../src/main/resources/userRoutes.xml           |    8 +-
 fit/core-reference/pom.xml                      |   12 +-
 .../fit/core/reference/TestSampleJob.java       |   64 -
 .../core/reference/TestSampleJobDelegate.java   |   64 +
 .../main/resources/all/provisioning.properties  |    6 +-
 .../src/main/resources/coreContext.xml          |    2 +
 .../src/main/resources/log4j2.xml               |   35 +-
 .../src/main/resources/provisioning.properties  |    4 +
 .../src/main/webapp/cacheStats.jsp              |    5 +-
 .../fit/core/reference/AnyTypeITCase.java       |    1 -
 .../core/reference/AuthenticationITCase.java    |   10 +-
 .../fit/core/reference/CamelRouteITCase.java    |    5 +-
 .../fit/core/reference/ConnectorITCase.java     |    2 +-
 .../core/reference/ExceptionMapperITCase.java   |    3 +-
 .../syncope/fit/core/reference/GroupITCase.java |   24 +-
 .../fit/core/reference/LoggerITCase.java        |    4 +-
 .../core/reference/PropagationTaskITCase.java   |    2 +-
 .../fit/core/reference/PushTaskITCase.java      |    5 +-
 .../fit/core/reference/ResourceITCase.java      |    2 +-
 .../fit/core/reference/SchedTaskITCase.java     |    5 +-
 .../fit/core/reference/SyncTaskITCase.java      |   26 +-
 .../syncope/fit/core/reference/UserITCase.java  |   54 +-
 255 files changed, 7689 insertions(+), 6435 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/34a1c214/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index e17fd2c..0e9cf4b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,13 +13,13 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+sudo: false
 language: java
 jdk:
   - openjdk7
 # default install is mvn install --quiet -DskipTests=true
 install: mvn --show-version --quiet -P all,skipTests
 #invoker.streamLogs: we cannot access to log files through Travis web ui, so display everything in the console
-#script: mvn --show-version --quiet clean install -Dinvoker.streamLogs=true
-script: mvn --show-version --quiet -PskipTests -Dinvoker.streamLogs=true
+script: mvn --show-version --quiet clean install -Dinvoker.streamLogs=true
 notifications:
   webhooks: http://rovere.tirasa.net/cgi-bin/travis.cgi

http://git-wip-us.apache.org/repos/asf/syncope/blob/34a1c214/client/console/src/main/java/org/apache/syncope/client/console/pages/BulkActionModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/BulkActionModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/BulkActionModalPage.java
index 5567094..ace19c8 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/BulkActionModalPage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/BulkActionModalPage.java
@@ -100,19 +100,19 @@ public class BulkActionModalPage<T, S> extends BaseModalPage {
 
             switch (action) {
                 case DELETE:
-                    bulkAction.setOperation(BulkAction.Type.DELETE);
+                    bulkAction.setType(BulkAction.Type.DELETE);
                     break;
                 case SUSPEND:
-                    bulkAction.setOperation(BulkAction.Type.SUSPEND);
+                    bulkAction.setType(BulkAction.Type.SUSPEND);
                     break;
                 case REACTIVATE:
-                    bulkAction.setOperation(BulkAction.Type.REACTIVATE);
+                    bulkAction.setType(BulkAction.Type.REACTIVATE);
                     break;
                 case EXECUTE:
-                    bulkAction.setOperation(BulkAction.Type.EXECUTE);
+                    bulkAction.setType(BulkAction.Type.EXECUTE);
                     break;
                 case DRYRUN:
-                    bulkAction.setOperation(BulkAction.Type.DRYRUN);
+                    bulkAction.setType(BulkAction.Type.DRYRUN);
                     break;
                 default:
                     LOG.error("Bulk action type not supported");
@@ -132,7 +132,7 @@ public class BulkActionModalPage<T, S> extends BaseModalPage {
                     } catch (NoSuchMethodException | SecurityException | IllegalAccessException 
                             | IllegalArgumentException | InvocationTargetException e) {
                         error(getString(Constants.ERROR)
-                                + ": Operation " + bulkAction.getOperation() + " not supported");
+                                + ": Operation " + bulkAction.getType() + " not supported");
                         feedbackPanel.refresh(target);
                     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/34a1c214/client/console/src/main/java/org/apache/syncope/client/console/rest/GroupRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/GroupRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/GroupRestClient.java
index 512e08f..4644fc0 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/GroupRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/GroupRestClient.java
@@ -31,7 +31,7 @@ import org.apache.syncope.common.lib.to.BulkActionResult;
 import org.apache.syncope.common.lib.to.ConnObjectTO;
 import org.apache.syncope.common.lib.to.GroupTO;
 import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.apache.syncope.common.lib.types.ResourceAssociationActionType;
+import org.apache.syncope.common.lib.types.ResourceAssociationAction;
 import org.apache.syncope.common.lib.types.ResourceDeassociationActionType;
 import org.apache.syncope.common.lib.wrap.ResourceKey;
 import org.apache.syncope.common.rest.api.CollectionWrapper;
@@ -123,7 +123,7 @@ public class GroupRestClient extends AbstractAnyRestClient {
     public void unlink(final String etag, final long groupKey, final List<StatusBean> statuses) {
         synchronized (this) {
             GroupService service = getService(etag, GroupService.class);
-            service.bulkDeassociation(groupKey, ResourceDeassociationActionType.UNLINK,
+            service.deassociate(groupKey, ResourceDeassociationActionType.UNLINK,
                     CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
                             ResourceKey.class));
             resetClient(GroupService.class);
@@ -137,7 +137,7 @@ public class GroupRestClient extends AbstractAnyRestClient {
             ResourceAssociationMod associationMod = new ResourceAssociationMod();
             associationMod.getTargetResources().addAll(
                     CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(), ResourceKey.class));
-            service.bulkAssociation(groupKey, ResourceAssociationActionType.LINK, associationMod);
+            service.associate(groupKey, ResourceAssociationAction.LINK, associationMod);
 
             resetClient(GroupService.class);
         }
@@ -147,7 +147,7 @@ public class GroupRestClient extends AbstractAnyRestClient {
         BulkActionResult result;
         synchronized (this) {
             GroupService service = getService(etag, GroupService.class);
-            result = service.bulkDeassociation(groupKey, ResourceDeassociationActionType.DEPROVISION,
+            result = service.deassociate(groupKey, ResourceDeassociationActionType.DEPROVISION,
                     CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
                             ResourceKey.class)).
                     readEntity(BulkActionResult.class);
@@ -165,7 +165,7 @@ public class GroupRestClient extends AbstractAnyRestClient {
             associationMod.getTargetResources().addAll(
                     CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(), ResourceKey.class));
 
-            result = service.bulkAssociation(groupKey, ResourceAssociationActionType.PROVISION, associationMod).
+            result = service.associate(groupKey, ResourceAssociationAction.PROVISION, associationMod).
                     readEntity(BulkActionResult.class);
             resetClient(GroupService.class);
         }
@@ -176,7 +176,7 @@ public class GroupRestClient extends AbstractAnyRestClient {
         BulkActionResult result;
         synchronized (this) {
             GroupService service = getService(etag, GroupService.class);
-            result = service.bulkDeassociation(groupKey, ResourceDeassociationActionType.UNASSIGN,
+            result = service.deassociate(groupKey, ResourceDeassociationActionType.UNASSIGN,
                     CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
                             ResourceKey.class)).
                     readEntity(BulkActionResult.class);
@@ -194,7 +194,7 @@ public class GroupRestClient extends AbstractAnyRestClient {
             associationMod.getTargetResources().addAll(
                     CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(), ResourceKey.class));
 
-            result = service.bulkAssociation(groupKey, ResourceAssociationActionType.ASSIGN, associationMod).
+            result = service.associate(groupKey, ResourceAssociationAction.ASSIGN, associationMod).
                     readEntity(BulkActionResult.class);
 
             resetClient(GroupService.class);

http://git-wip-us.apache.org/repos/asf/syncope/blob/34a1c214/client/console/src/main/java/org/apache/syncope/client/console/rest/UserRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/UserRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/UserRestClient.java
index 338851d..5c5c062 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/UserRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/UserRestClient.java
@@ -32,7 +32,7 @@ import org.apache.syncope.common.lib.to.BulkActionResult;
 import org.apache.syncope.common.lib.to.ConnObjectTO;
 import org.apache.syncope.common.lib.to.UserTO;
 import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.apache.syncope.common.lib.types.ResourceAssociationActionType;
+import org.apache.syncope.common.lib.types.ResourceAssociationAction;
 import org.apache.syncope.common.lib.types.ResourceDeassociationActionType;
 import org.apache.syncope.common.lib.wrap.ResourceKey;
 import org.apache.syncope.common.rest.api.CollectionWrapper;
@@ -150,7 +150,7 @@ public class UserRestClient extends AbstractAnyRestClient {
     public void unlink(final String etag, final long userKey, final List<StatusBean> statuses) {
         synchronized (this) {
             UserService service = getService(etag, UserService.class);
-            service.bulkDeassociation(userKey, ResourceDeassociationActionType.UNLINK,
+            service.deassociate(userKey, ResourceDeassociationActionType.UNLINK,
                     CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
                             ResourceKey.class));
             resetClient(UserService.class);
@@ -164,7 +164,7 @@ public class UserRestClient extends AbstractAnyRestClient {
             ResourceAssociationMod associationMod = new ResourceAssociationMod();
             associationMod.getTargetResources().addAll(
                     CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(), ResourceKey.class));
-            service.bulkAssociation(userKey, ResourceAssociationActionType.LINK, associationMod);
+            service.associate(userKey, ResourceAssociationAction.LINK, associationMod);
 
             resetClient(UserService.class);
         }
@@ -174,7 +174,7 @@ public class UserRestClient extends AbstractAnyRestClient {
         BulkActionResult result;
         synchronized (this) {
             UserService service = getService(etag, UserService.class);
-            result = service.bulkDeassociation(userKey, ResourceDeassociationActionType.DEPROVISION,
+            result = service.deassociate(userKey, ResourceDeassociationActionType.DEPROVISION,
                     CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
                             ResourceKey.class)).
                     readEntity(BulkActionResult.class);
@@ -196,7 +196,7 @@ public class UserRestClient extends AbstractAnyRestClient {
             associationMod.setChangePwd(changepwd);
             associationMod.setPassword(password);
 
-            result = service.bulkAssociation(userKey, ResourceAssociationActionType.PROVISION, associationMod).
+            result = service.associate(userKey, ResourceAssociationAction.PROVISION, associationMod).
                     readEntity(BulkActionResult.class);
             resetClient(UserService.class);
         }
@@ -207,7 +207,7 @@ public class UserRestClient extends AbstractAnyRestClient {
         BulkActionResult result;
         synchronized (this) {
             UserService service = getService(etag, UserService.class);
-            result = service.bulkDeassociation(userKey, ResourceDeassociationActionType.UNASSIGN,
+            result = service.deassociate(userKey, ResourceDeassociationActionType.UNASSIGN,
                     CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
                             ResourceKey.class)).
                     readEntity(BulkActionResult.class);
@@ -229,7 +229,7 @@ public class UserRestClient extends AbstractAnyRestClient {
             associationMod.setChangePwd(changepwd);
             associationMod.setPassword(password);
 
-            result = service.bulkAssociation(userKey, ResourceAssociationActionType.ASSIGN, associationMod).
+            result = service.associate(userKey, ResourceAssociationAction.ASSIGN, associationMod).
                     readEntity(BulkActionResult.class);
             resetClient(UserService.class);
         }

http://git-wip-us.apache.org/repos/asf/syncope/blob/34a1c214/client/old_console/src/main/java/org/apache/syncope/client/console/pages/Configuration.java
----------------------------------------------------------------------
diff --git a/client/old_console/src/main/java/org/apache/syncope/client/console/pages/Configuration.java b/client/old_console/src/main/java/org/apache/syncope/client/console/pages/Configuration.java
index 9f8c734..bb6fcdf 100644
--- a/client/old_console/src/main/java/org/apache/syncope/client/console/pages/Configuration.java
+++ b/client/old_console/src/main/java/org/apache/syncope/client/console/pages/Configuration.java
@@ -18,8 +18,6 @@
  */
 package org.apache.syncope.client.console.pages;
 
-import static org.apache.syncope.client.console.pages.AbstractBasePage.LOG;
-
 import java.io.File;
 import java.io.Serializable;
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/syncope/blob/34a1c214/common/lib/src/main/java/org/apache/syncope/common/lib/to/BulkAction.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/BulkAction.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/BulkAction.java
index a514dcb..5b46616 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/BulkAction.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/BulkAction.java
@@ -46,19 +46,19 @@ public class BulkAction extends AbstractBaseBean {
 
     }
 
-    private Type operation;
+    private Type type;
 
     /**
      * Serialized identifiers.
      */
     private final List<String> targets = new ArrayList<>();
 
-    public Type getOperation() {
-        return operation;
+    public Type getType() {
+        return type;
     }
 
-    public void setOperation(final Type operation) {
-        this.operation = operation;
+    public void setType(final Type type) {
+        this.type = type;
     }
 
     @XmlElementWrapper(name = "targets")

http://git-wip-us.apache.org/repos/asf/syncope/blob/34a1c214/common/lib/src/main/java/org/apache/syncope/common/lib/to/SchedTaskTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/SchedTaskTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/SchedTaskTO.java
index abea52d..08e4c53 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/SchedTaskTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/SchedTaskTO.java
@@ -33,7 +33,7 @@ public class SchedTaskTO extends AbstractTaskTO {
 
     private String cronExpression;
 
-    private String jobClassName;
+    private String jobDelegateClassName;
 
     private String name;
 
@@ -51,12 +51,12 @@ public class SchedTaskTO extends AbstractTaskTO {
         this.cronExpression = cronExpression;
     }
 
-    public String getJobClassName() {
-        return jobClassName;
+    public String getJobDelegateClassName() {
+        return jobDelegateClassName;
     }
 
-    public void setJobClassName(final String jobClassName) {
-        this.jobClassName = jobClassName;
+    public void setJobDelegateClassName(final String jobDelegateClassName) {
+        this.jobDelegateClassName = jobDelegateClassName;
     }
 
     @SuppressWarnings("CPD-START")

http://git-wip-us.apache.org/repos/asf/syncope/blob/34a1c214/common/lib/src/main/java/org/apache/syncope/common/lib/types/AbstractPolicySpec.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/AbstractPolicySpec.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/AbstractPolicySpec.java
index 5f2fd1e..e1e7333 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/types/AbstractPolicySpec.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/AbstractPolicySpec.java
@@ -24,6 +24,10 @@ import java.util.List;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlType;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
 import org.apache.syncope.common.lib.annotation.SchemaList;
 
 @XmlType
@@ -80,4 +84,19 @@ public abstract class AbstractPolicySpec implements PolicySpec {
         return suffixesNotPermitted;
     }
 
+    @Override
+    public boolean equals(final Object obj) {
+        return EqualsBuilder.reflectionEquals(this, obj);
+    }
+
+    @Override
+    public int hashCode() {
+        return HashCodeBuilder.reflectionHashCode(this);
+    }
+
+    @Override
+    public String toString() {
+        return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/34a1c214/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditElements.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditElements.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditElements.java
index 323ea09..c3d4af5 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditElements.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditElements.java
@@ -26,6 +26,10 @@ public final class AuditElements implements Serializable {
 
     private static final long serialVersionUID = -4385059255522273254L;
 
+    public static final String AUTHENTICATION_CATEGORY = "Authentication";
+
+    public static final String LOGIN_EVENT = "login";
+
     @XmlEnum
     public enum EventCategoryType {
 
@@ -55,4 +59,8 @@ public final class AuditElements implements Serializable {
         FAILURE
 
     }
+
+    private AuditElements() {
+        // private constructor for static utility class
+    }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/34a1c214/common/lib/src/main/java/org/apache/syncope/common/lib/types/LoggerType.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/LoggerType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/LoggerType.java
index f77ed81..f129a7d 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/types/LoggerType.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/LoggerType.java
@@ -19,6 +19,7 @@
 package org.apache.syncope.common.lib.types;
 
 import javax.xml.bind.annotation.XmlEnum;
+import org.apache.commons.lang3.StringUtils;
 
 @XmlEnum
 public enum LoggerType {
@@ -26,7 +27,7 @@ public enum LoggerType {
     /**
      * This type describes a common logger used to handle system and application events.
      */
-    LOG(""),
+    LOG(StringUtils.EMPTY),
     /**
      * Audit logger only focus on security related events, usually logging how did what and when.
      * In case of a security incident audit loggers should allow an administrator to recall all
@@ -34,7 +35,7 @@ public enum LoggerType {
      */
     AUDIT("syncope.audit");
 
-    private String prefix;
+    private final String prefix;
 
     LoggerType(final String prefix) {
         this.prefix = prefix;

http://git-wip-us.apache.org/repos/asf/syncope/blob/34a1c214/common/lib/src/main/java/org/apache/syncope/common/lib/types/ResourceAssociationAction.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/ResourceAssociationAction.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ResourceAssociationAction.java
new file mode 100644
index 0000000..efbe0ef
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ResourceAssociationAction.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+@XmlEnum
+public enum ResourceAssociationAction {
+
+    /**
+     * Link user/group/any object on Syncope and external resource(s) without any propagation.
+     */
+    LINK,
+    /**
+     * Send user/group/any object data to external resource(s).
+     */
+    PROVISION,
+    /**
+     * Assign (link + provision) external resource(s) to user/group/any object.
+     */
+    ASSIGN
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/34a1c214/common/lib/src/main/java/org/apache/syncope/common/lib/types/ResourceAssociationActionType.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/ResourceAssociationActionType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ResourceAssociationActionType.java
deleted file mode 100644
index 3d7955d..0000000
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/types/ResourceAssociationActionType.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.common.lib.types;
-
-import javax.xml.bind.annotation.XmlEnum;
-
-@XmlEnum
-public enum ResourceAssociationActionType {
-
-    /**
-     * Add association between user/group on Syncope and external resource(s) without any propagation.
-     */
-    LINK,
-    /**
-     * Add user/group into external resource(s).
-     */
-    PROVISION,
-    /**
-     * Assign (link + provision) external resource(s) with user/group.
-     */
-    ASSIGN
-
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/34a1c214/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/CollectionWrapper.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/CollectionWrapper.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/CollectionWrapper.java
index 94bf21f..3cdf1fa 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/CollectionWrapper.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/CollectionWrapper.java
@@ -57,9 +57,9 @@ public final class CollectionWrapper {
 
     public static List<AuditLoggerName> wrapLogger(final Collection<LoggerTO> logger) {
         List<AuditLoggerName> respons = new ArrayList<>();
-        for (LoggerTO l : logger) {
+        for (LoggerTO loggerTO : logger) {
             try {
-                respons.add(AuditLoggerName.fromLoggerName(l.getKey()));
+                respons.add(AuditLoggerName.fromLoggerName(loggerTO.getKey()));
             } catch (Exception ignore) {
                 // ignore
             }
@@ -69,9 +69,9 @@ public final class CollectionWrapper {
 
     public static List<LoggerTO> unwrapLogger(final Collection<AuditLoggerName> auditNames) {
         List<LoggerTO> respons = new ArrayList<>();
-        for (AuditLoggerName l : auditNames) {
+        for (AuditLoggerName name : auditNames) {
             LoggerTO loggerTO = new LoggerTO();
-            loggerTO.setKey(l.toLoggerName());
+            loggerTO.setKey(name.toLoggerName());
             loggerTO.setLevel(LoggerLevel.DEBUG);
             respons.add(loggerTO);
         }

http://git-wip-us.apache.org/repos/asf/syncope/blob/34a1c214/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java
index 93167cb..1c0fda2 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java
@@ -39,7 +39,7 @@ import org.apache.syncope.common.lib.to.AnyTO;
 import org.apache.syncope.common.lib.to.BulkAction;
 import org.apache.syncope.common.lib.to.BulkActionResult;
 import org.apache.syncope.common.lib.to.PagedResult;
-import org.apache.syncope.common.lib.types.ResourceAssociationActionType;
+import org.apache.syncope.common.lib.types.ResourceAssociationAction;
 import org.apache.syncope.common.lib.types.ResourceDeassociationActionType;
 import org.apache.syncope.common.lib.wrap.ResourceKey;
 import org.apache.syncope.common.rest.api.beans.AnyListQuery;
@@ -150,7 +150,7 @@ public interface AnyService<TO extends AnyTO, MOD extends AnyMod> extends JAXRSS
     @Path("{key}/deassociate/{type}")
     @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
     @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    Response bulkDeassociation(
+    Response deassociate(
             @NotNull @PathParam("key") Long key,
             @NotNull @PathParam("type") ResourceDeassociationActionType type,
             @NotNull List<ResourceKey> resourceNames);
@@ -171,9 +171,9 @@ public interface AnyService<TO extends AnyTO, MOD extends AnyMod> extends JAXRSS
     @Path("{key}/associate/{type}")
     @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
     @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    Response bulkAssociation(
+    Response associate(
             @NotNull @PathParam("key") Long key,
-            @NotNull @PathParam("type") ResourceAssociationActionType type,
+            @NotNull @PathParam("type") ResourceAssociationAction type,
             @NotNull ResourceAssociationMod associationMod);
 
     /**

http://git-wip-us.apache.org/repos/asf/syncope/blob/34a1c214/core/logic/pom.xml
----------------------------------------------------------------------
diff --git a/core/logic/pom.xml b/core/logic/pom.xml
index 60ba05f..7ce109f 100644
--- a/core/logic/pom.xml
+++ b/core/logic/pom.xml
@@ -153,6 +153,13 @@ under the License.
         <filtering>true</filtering>
       </testResource>
       <testResource>
+        <directory>${basedir}/../persistence-jpa/src/main/resources</directory>
+        <includes>
+          <include>persistence.properties</include>
+        </includes>
+        <filtering>true</filtering>
+      </testResource>
+      <testResource>
         <directory>${basedir}/../persistence-jpa/src/test/resources</directory>
         <filtering>true</filtering>
       </testResource>
@@ -161,6 +168,21 @@ under the License.
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <inherited>true</inherited>
+        <executions>
+          <execution>
+            <id>set-bundles</id>
+            <phase>process-test-resources</phase>
+            <goals>
+              <goal>copy</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
       </plugin>
     </plugins>

http://git-wip-us.apache.org/repos/asf/syncope/blob/34a1c214/core/logic/src/main/java/org/apache/syncope/core/logic/AnyObjectLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/AnyObjectLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/AnyObjectLogic.java
index 05db8b5..38927ce 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/AnyObjectLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/AnyObjectLogic.java
@@ -55,7 +55,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.stereotype.Component;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.transaction.interceptor.TransactionInterceptor;
 
 /**
  * Note that this controller does not extend {@link AbstractTransactionalLogic}, hence does not provide any
@@ -96,7 +95,7 @@ public class AnyObjectLogic extends AbstractAnyLogic<AnyObjectTO, AnyObjectMod>
     }
 
     @PreAuthorize("isAuthenticated()")
-    @Transactional(readOnly = true, rollbackFor = { Throwable.class })
+    @Transactional(readOnly = true)
     @Override
     public int count(final List<String> realms) {
         return anyObjectDAO.count(getEffectiveRealms(SyncopeConstants.FULL_ADMIN_REALMS, realms));
@@ -133,7 +132,7 @@ public class AnyObjectLogic extends AbstractAnyLogic<AnyObjectTO, AnyObjectMod>
     }
 
     @PreAuthorize("hasRole('" + Entitlement.ANY_OBJECT_SEARCH + "')")
-    @Transactional(readOnly = true, rollbackFor = { Throwable.class })
+    @Transactional(readOnly = true)
     @Override
     public int searchCount(final SearchCond searchCondition, final List<String> realms) {
         return searchDAO.count(
@@ -142,7 +141,7 @@ public class AnyObjectLogic extends AbstractAnyLogic<AnyObjectTO, AnyObjectMod>
     }
 
     @PreAuthorize("hasRole('" + Entitlement.ANY_OBJECT_SEARCH + "')")
-    @Transactional(readOnly = true, rollbackFor = { Throwable.class })
+    @Transactional(readOnly = true)
     @Override
     public List<AnyObjectTO> search(final SearchCond searchCondition, final int page, final int size,
             final List<OrderByClause> orderBy, final List<String> realms, final boolean details) {
@@ -239,29 +238,26 @@ public class AnyObjectLogic extends AbstractAnyLogic<AnyObjectTO, AnyObjectMod>
     }
 
     @PreAuthorize("hasRole('" + Entitlement.ANY_OBJECT_UPDATE + "')")
-    @Transactional(rollbackFor = { Throwable.class })
     @Override
     public AnyObjectTO unlink(final Long anyObjectKey, final Collection<String> resources) {
         AnyObjectMod anyObjectMod = new AnyObjectMod();
         anyObjectMod.setKey(anyObjectKey);
         anyObjectMod.getResourcesToRemove().addAll(resources);
-        final Long updatedResult = provisioningManager.unlink(anyObjectMod);
 
-        return binder.getAnyObjectTO(updatedResult);
+        return binder.getAnyObjectTO(provisioningManager.unlink(anyObjectMod));
     }
 
     @PreAuthorize("hasRole('" + Entitlement.ANY_OBJECT_UPDATE + "')")
-    @Transactional(rollbackFor = { Throwable.class })
     @Override
     public AnyObjectTO link(final Long anyObjectKey, final Collection<String> resources) {
         AnyObjectMod anyObjectMod = new AnyObjectMod();
         anyObjectMod.setKey(anyObjectKey);
         anyObjectMod.getResourcesToAdd().addAll(resources);
+
         return binder.getAnyObjectTO(provisioningManager.link(anyObjectMod));
     }
 
     @PreAuthorize("hasRole('" + Entitlement.ANY_OBJECT_UPDATE + "')")
-    @Transactional(rollbackFor = { Throwable.class })
     @Override
     public AnyObjectTO unassign(final Long anyObjectKey, final Collection<String> resources) {
         AnyObjectMod anyObjectMod = new AnyObjectMod();
@@ -271,44 +267,41 @@ public class AnyObjectLogic extends AbstractAnyLogic<AnyObjectTO, AnyObjectMod>
     }
 
     @PreAuthorize("hasRole('" + Entitlement.ANY_OBJECT_UPDATE + "')")
-    @Transactional(rollbackFor = { Throwable.class })
     @Override
-    public AnyObjectTO assign(final Long anyObjectKey, final Collection<String> resources,
-            final boolean changePwd, final String password) {
+    public AnyObjectTO assign(
+            final Long key,
+            final Collection<String> resources,
+            final boolean changepwd,
+            final String password) {
 
-        AnyObjectMod userMod = new AnyObjectMod();
-        userMod.setKey(anyObjectKey);
-        userMod.getResourcesToAdd().addAll(resources);
-        return update(userMod);
+        AnyObjectMod anyObjectMod = new AnyObjectMod();
+        anyObjectMod.setKey(key);
+        anyObjectMod.getResourcesToAdd().addAll(resources);
+
+        return update(anyObjectMod);
     }
 
     @PreAuthorize("hasRole('" + Entitlement.ANY_OBJECT_UPDATE + "')")
-    @Transactional(rollbackFor = { Throwable.class })
     @Override
-    public AnyObjectTO deprovision(final Long anyObjectKey, final Collection<String> resources) {
-        AnyObject anyObject = anyObjectDAO.authFind(anyObjectKey);
+    public AnyObjectTO deprovision(final Long key, final Collection<String> resources) {
+        List<PropagationStatus> statuses = provisioningManager.deprovision(key, resources);
 
-        List<PropagationStatus> statuses = provisioningManager.deprovision(anyObjectKey, resources);
-
-        AnyObjectTO updatedTO = binder.getAnyObjectTO(anyObject, true);
+        AnyObjectTO updatedTO = binder.getAnyObjectTO(key);
         updatedTO.getPropagationStatusTOs().addAll(statuses);
         return updatedTO;
     }
 
     @PreAuthorize("hasRole('" + Entitlement.ANY_OBJECT_UPDATE + "')")
-    @Transactional(rollbackFor = { Throwable.class })
     @Override
-    public AnyObjectTO provision(final Long anyObjectKey, final Collection<String> resources,
-            final boolean changePwd, final String password) {
-
-        AnyObjectTO original = binder.getAnyObjectTO(anyObjectKey);
+    public AnyObjectTO provision(
+            final Long key,
+            final Collection<String> resources,
+            final boolean changePwd,
+            final String password) {
 
-        //trick: assign and retrieve propagation statuses ...
-        original.getPropagationStatusTOs().addAll(
-                assign(anyObjectKey, resources, changePwd, password).getPropagationStatusTOs());
+        AnyObjectTO original = binder.getAnyObjectTO(key);
+        original.getPropagationStatusTOs().addAll(provisioningManager.provision(key, resources));
 
-        // .... rollback.
-        TransactionInterceptor.currentTransactionStatus().setRollbackOnly();
         return original;
     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/34a1c214/core/logic/src/main/java/org/apache/syncope/core/logic/ConfigurationLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/ConfigurationLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/ConfigurationLogic.java
index 7d28c88..1598498 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/ConfigurationLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/ConfigurationLogic.java
@@ -23,6 +23,7 @@ import java.lang.reflect.Method;
 import org.apache.syncope.common.lib.to.AttrTO;
 import org.apache.syncope.common.lib.to.ConfTO;
 import org.apache.syncope.common.lib.types.Entitlement;
+import org.apache.syncope.core.misc.security.AuthContextUtils;
 import org.apache.syncope.core.persistence.api.content.ContentExporter;
 import org.apache.syncope.core.persistence.api.dao.ConfDAO;
 import org.apache.syncope.core.persistence.api.dao.NotFoundException;
@@ -97,7 +98,7 @@ public class ConfigurationLogic extends AbstractTransactionalLogic<ConfTO> {
     @Transactional(readOnly = true)
     public void export(final OutputStream os) {
         try {
-            exporter.export(os, uwfAdapter.getPrefix(), gwfAdapter.getPrefix());
+            exporter.export(AuthContextUtils.getDomain(), os, uwfAdapter.getPrefix(), gwfAdapter.getPrefix());
             LOG.debug("Database content successfully exported");
         } catch (Exception e) {
             LOG.error("While exporting database content", e);

http://git-wip-us.apache.org/repos/asf/syncope/blob/34a1c214/core/logic/src/main/java/org/apache/syncope/core/logic/GroupLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/GroupLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/GroupLogic.java
index f476210..33b0447 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/GroupLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/GroupLogic.java
@@ -56,7 +56,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.stereotype.Component;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.transaction.interceptor.TransactionInterceptor;
 
 /**
  * Note that this controller does not extend {@link AbstractTransactionalLogic}, hence does not provide any
@@ -114,7 +113,7 @@ public class GroupLogic extends AbstractAnyLogic<GroupTO, GroupMod> {
     }
 
     @PreAuthorize("isAuthenticated()")
-    @Transactional(readOnly = true, rollbackFor = { Throwable.class })
+    @Transactional(readOnly = true)
     @Override
     public int count(final List<String> realms) {
         return groupDAO.count(getEffectiveRealms(SyncopeConstants.FULL_ADMIN_REALMS, realms));
@@ -140,7 +139,7 @@ public class GroupLogic extends AbstractAnyLogic<GroupTO, GroupMod> {
     }
 
     @PreAuthorize("hasRole('" + Entitlement.GROUP_SEARCH + "')")
-    @Transactional(readOnly = true, rollbackFor = { Throwable.class })
+    @Transactional(readOnly = true)
     @Override
     public int searchCount(final SearchCond searchCondition, final List<String> realms) {
         return searchDAO.count(
@@ -149,7 +148,7 @@ public class GroupLogic extends AbstractAnyLogic<GroupTO, GroupMod> {
     }
 
     @PreAuthorize("hasRole('" + Entitlement.GROUP_SEARCH + "')")
-    @Transactional(readOnly = true, rollbackFor = { Throwable.class })
+    @Transactional(readOnly = true)
     @Override
     public List<GroupTO> search(final SearchCond searchCondition, final int page, final int size,
             final List<OrderByClause> orderBy, final List<String> realms, final boolean details) {
@@ -256,75 +255,70 @@ public class GroupLogic extends AbstractAnyLogic<GroupTO, GroupMod> {
     }
 
     @PreAuthorize("hasRole('" + Entitlement.GROUP_UPDATE + "')")
-    @Transactional(rollbackFor = { Throwable.class })
     @Override
     public GroupTO unlink(final Long groupKey, final Collection<String> resources) {
-        final GroupMod groupMod = new GroupMod();
+        GroupMod groupMod = new GroupMod();
         groupMod.setKey(groupKey);
         groupMod.getResourcesToRemove().addAll(resources);
-        final Long updatedResult = provisioningManager.unlink(groupMod);
 
-        return binder.getGroupTO(updatedResult);
+        return binder.getGroupTO(provisioningManager.unlink(groupMod));
     }
 
     @PreAuthorize("hasRole('" + Entitlement.GROUP_UPDATE + "')")
-    @Transactional(rollbackFor = { Throwable.class })
     @Override
     public GroupTO link(final Long groupKey, final Collection<String> resources) {
-        final GroupMod groupMod = new GroupMod();
+        GroupMod groupMod = new GroupMod();
         groupMod.setKey(groupKey);
         groupMod.getResourcesToAdd().addAll(resources);
+
         return binder.getGroupTO(provisioningManager.link(groupMod));
     }
 
     @PreAuthorize("hasRole('" + Entitlement.GROUP_UPDATE + "')")
-    @Transactional(rollbackFor = { Throwable.class })
     @Override
     public GroupTO unassign(final Long groupKey, final Collection<String> resources) {
-        final GroupMod groupMod = new GroupMod();
+        GroupMod groupMod = new GroupMod();
         groupMod.setKey(groupKey);
         groupMod.getResourcesToRemove().addAll(resources);
         return update(groupMod);
     }
 
     @PreAuthorize("hasRole('" + Entitlement.GROUP_UPDATE + "')")
-    @Transactional(rollbackFor = { Throwable.class })
     @Override
     public GroupTO assign(
-            final Long groupKey, final Collection<String> resources, final boolean changePwd, final String password) {
+            final Long key,
+            final Collection<String> resources,
+            final boolean changepwd,
+            final String password) {
 
-        final GroupMod userMod = new GroupMod();
-        userMod.setKey(groupKey);
-        userMod.getResourcesToAdd().addAll(resources);
-        return update(userMod);
+        GroupMod groupMod = new GroupMod();
+        groupMod.setKey(key);
+        groupMod.getResourcesToAdd().addAll(resources);
+
+        return update(groupMod);
     }
 
     @PreAuthorize("hasRole('" + Entitlement.GROUP_UPDATE + "')")
-    @Transactional(rollbackFor = { Throwable.class })
     @Override
-    public GroupTO deprovision(final Long groupKey, final Collection<String> resources) {
-        final Group group = groupDAO.authFind(groupKey);
-
-        List<PropagationStatus> statuses = provisioningManager.deprovision(groupKey, resources);
+    public GroupTO deprovision(final Long key, final Collection<String> resources) {
+        List<PropagationStatus> statuses = provisioningManager.deprovision(key, resources);
 
-        GroupTO updatedTO = binder.getGroupTO(group, true);
+        GroupTO updatedTO = binder.getGroupTO(key);
         updatedTO.getPropagationStatusTOs().addAll(statuses);
         return updatedTO;
     }
 
     @PreAuthorize("hasRole('" + Entitlement.GROUP_UPDATE + "')")
-    @Transactional(rollbackFor = { Throwable.class })
     @Override
     public GroupTO provision(
-            final Long groupKey, final Collection<String> resources, final boolean changePwd, final String password) {
-        GroupTO original = binder.getGroupTO(groupKey);
+            final Long key,
+            final Collection<String> resources,
+            final boolean changePwd,
+            final String password) {
 
-        //trick: assign and retrieve propagation statuses ...
-        original.getPropagationStatusTOs().addAll(
-                assign(groupKey, resources, changePwd, password).getPropagationStatusTOs());
+        GroupTO original = binder.getGroupTO(key);
+        original.getPropagationStatusTOs().addAll(provisioningManager.provision(key, resources));
 
-        // .... rollback.
-        TransactionInterceptor.currentTransactionStatus().setRollbackOnly();
         return original;
     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/34a1c214/core/logic/src/main/java/org/apache/syncope/core/logic/LoggerLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/LoggerLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/LoggerLogic.java
index 4b5aac8..d407dba 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/LoggerLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/LoggerLogic.java
@@ -46,6 +46,7 @@ import org.apache.syncope.common.lib.types.ResourceOperation;
 import org.apache.syncope.common.lib.types.TaskType;
 import org.apache.syncope.common.lib.types.UnmatchingRule;
 import org.apache.syncope.common.lib.types.AnyTypeKind;
+import org.apache.syncope.common.lib.types.AuditElements;
 import org.apache.syncope.common.lib.types.Entitlement;
 import org.apache.syncope.core.persistence.api.dao.ExternalResourceDAO;
 import org.apache.syncope.core.persistence.api.dao.LoggerDAO;
@@ -55,8 +56,9 @@ import org.apache.syncope.core.persistence.api.entity.EntityFactory;
 import org.apache.syncope.core.persistence.api.entity.resource.ExternalResource;
 import org.apache.syncope.core.persistence.api.entity.Logger;
 import org.apache.syncope.core.persistence.api.entity.task.SchedTask;
-import org.apache.syncope.core.persistence.api.entity.task.SyncTask;
 import org.apache.syncope.core.misc.spring.BeanUtils;
+import org.apache.syncope.core.provisioning.java.sync.PushJobDelegate;
+import org.apache.syncope.core.provisioning.java.sync.SyncJobDelegate;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.core.io.Resource;
 import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
@@ -255,10 +257,10 @@ public class LoggerLogic extends AbstractTransactionalLogic<LoggerTO> {
                 }
             }
 
-            //SYNCOPE-608
+            // SYNCOPE-608
             EventCategoryTO authenticationControllerEvents = new EventCategoryTO();
-            authenticationControllerEvents.setCategory("AuthenticationController");
-            authenticationControllerEvents.getEvents().add("login");
+            authenticationControllerEvents.setCategory(AuditElements.AUTHENTICATION_CATEGORY);
+            authenticationControllerEvents.getEvents().add(AuditElements.LOGIN_EVENT);
             events.add(authenticationControllerEvents);
 
             events.add(new EventCategoryTO(EventCategoryType.PROPAGATION));
@@ -305,15 +307,17 @@ public class LoggerLogic extends AbstractTransactionalLogic<LoggerTO> {
 
             for (SchedTask task : taskDAO.<SchedTask>findAll(TaskType.SCHEDULED)) {
                 EventCategoryTO eventCategoryTO = new EventCategoryTO(EventCategoryType.TASK);
-                eventCategoryTO.setCategory(Class.forName(task.getJobClassName()).getSimpleName());
+                eventCategoryTO.setCategory(Class.forName(task.getJobDelegateClassName()).getSimpleName());
                 events.add(eventCategoryTO);
             }
 
-            for (SyncTask task : taskDAO.<SyncTask>findAll(TaskType.SYNCHRONIZATION)) {
-                EventCategoryTO eventCategoryTO = new EventCategoryTO(EventCategoryType.TASK);
-                eventCategoryTO.setCategory(Class.forName(task.getJobClassName()).getSimpleName());
-                events.add(eventCategoryTO);
-            }
+            EventCategoryTO eventCategoryTO = new EventCategoryTO(EventCategoryType.TASK);
+            eventCategoryTO.setCategory(SyncJobDelegate.class.getSimpleName());
+            events.add(eventCategoryTO);
+
+            eventCategoryTO = new EventCategoryTO(EventCategoryType.TASK);
+            eventCategoryTO.setCategory(PushJobDelegate.class.getSimpleName());
+            events.add(eventCategoryTO);
         } catch (Exception e) {
             LOG.error("Failure retrieving audit/notification events", e);
         }

http://git-wip-us.apache.org/repos/asf/syncope/blob/34a1c214/core/logic/src/main/java/org/apache/syncope/core/logic/SyncopeLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/SyncopeLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/SyncopeLogic.java
index bc8fb0f..8dd20a8 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/SyncopeLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/SyncopeLogic.java
@@ -131,7 +131,7 @@ public class SyncopeLogic extends AbstractLogic<SyncopeTO> {
         syncopeTO.getReportlets().addAll(
                 classNamesLoader.getClassNames(ImplementationClassNamesLoader.Type.REPORTLET));
         syncopeTO.getTaskJobs().addAll(
-                classNamesLoader.getClassNames(ImplementationClassNamesLoader.Type.TASKJOB));
+                classNamesLoader.getClassNames(ImplementationClassNamesLoader.Type.TASKJOBDELEGATE));
         syncopeTO.getPropagationActions().addAll(
                 classNamesLoader.getClassNames(ImplementationClassNamesLoader.Type.PROPAGATION_ACTIONS));
         syncopeTO.getSyncActions().addAll(

http://git-wip-us.apache.org/repos/asf/syncope/blob/34a1c214/core/logic/src/main/java/org/apache/syncope/core/logic/TaskLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/TaskLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/TaskLogic.java
index 82dc8d1..9c119f3 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/TaskLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/TaskLogic.java
@@ -22,6 +22,7 @@ import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.collections4.Transformer;
 import org.apache.commons.lang3.ArrayUtils;
@@ -51,15 +52,15 @@ import org.apache.syncope.core.persistence.api.entity.task.TaskUtils;
 import org.apache.syncope.core.persistence.api.entity.task.TaskUtilsFactory;
 import org.apache.syncope.core.provisioning.api.data.TaskDataBinder;
 import org.apache.syncope.core.provisioning.api.job.JobNamer;
-import org.apache.syncope.core.provisioning.api.job.TaskJob;
 import org.apache.syncope.core.provisioning.api.propagation.PropagationTaskExecutor;
 import org.apache.syncope.core.provisioning.api.job.JobInstanceLoader;
-import org.apache.syncope.core.logic.notification.NotificationJob;
+import org.apache.syncope.core.logic.notification.NotificationJobDelegate;
+import org.apache.syncope.core.persistence.api.dao.ConfDAO;
+import org.apache.syncope.core.provisioning.java.job.TaskJob;
 import org.quartz.JobDataMap;
 import org.quartz.JobKey;
 import org.quartz.Scheduler;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.scheduling.quartz.SchedulerFactoryBean;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.stereotype.Component;
 
@@ -73,21 +74,21 @@ public class TaskLogic extends AbstractJobLogic<AbstractTaskTO> {
     private TaskExecDAO taskExecDAO;
 
     @Autowired
+    private ConfDAO confDAO;
+
+    @Autowired
     private TaskDataBinder binder;
 
     @Autowired
     private PropagationTaskExecutor taskExecutor;
 
     @Autowired
-    private NotificationJob notificationJob;
+    private NotificationJobDelegate notificationJobDelegate;
 
     @Autowired
     private JobInstanceLoader jobInstanceLoader;
 
     @Autowired
-    private SchedulerFactoryBean scheduler;
-
-    @Autowired
     private TaskUtilsFactory taskUtilsFactory;
 
     @PreAuthorize("hasRole('" + Entitlement.TASK_CREATE + "')")
@@ -98,7 +99,9 @@ public class TaskLogic extends AbstractJobLogic<AbstractTaskTO> {
         task = taskDAO.save(task);
 
         try {
-            jobInstanceLoader.registerJob(task, task.getJobClassName(), task.getCronExpression());
+            jobInstanceLoader.registerJob(
+                    task,
+                    confDAO.find("tasks.interruptMaxRetries", "1").getValues().get(0).getLongValue());
         } catch (Exception e) {
             LOG.error("While registering quartz job for task " + task.getKey(), e);
 
@@ -128,7 +131,9 @@ public class TaskLogic extends AbstractJobLogic<AbstractTaskTO> {
         task = taskDAO.save(task);
 
         try {
-            jobInstanceLoader.registerJob(task, task.getJobClassName(), task.getCronExpression());
+            jobInstanceLoader.registerJob(
+                    task,
+                    confDAO.find("tasks.interruptMaxRetries", "1").getValues().get(0).getLongValue());
         } catch (Exception e) {
             LOG.error("While registering quartz job for task " + task.getKey(), e);
 
@@ -163,28 +168,28 @@ public class TaskLogic extends AbstractJobLogic<AbstractTaskTO> {
     }
 
     @PreAuthorize("hasRole('" + Entitlement.TASK_READ + "')")
-    public <T extends AbstractTaskTO> T read(final Long taskId) {
-        Task task = taskDAO.find(taskId);
+    public <T extends AbstractTaskTO> T read(final Long taskKey) {
+        Task task = taskDAO.find(taskKey);
         if (task == null) {
-            throw new NotFoundException("Task " + taskId);
+            throw new NotFoundException("Task " + taskKey);
         }
         return binder.getTaskTO(task, taskUtilsFactory.getInstance(task));
     }
 
     @PreAuthorize("hasRole('" + Entitlement.TASK_READ + "')")
-    public TaskExecTO readExecution(final Long executionId) {
-        TaskExec taskExec = taskExecDAO.find(executionId);
+    public TaskExecTO readExecution(final Long execKey) {
+        TaskExec taskExec = taskExecDAO.find(execKey);
         if (taskExec == null) {
-            throw new NotFoundException("Task execution " + executionId);
+            throw new NotFoundException("Task execution " + execKey);
         }
         return binder.getTaskExecTO(taskExec);
     }
 
     @PreAuthorize("hasRole('" + Entitlement.TASK_EXECUTE + "')")
-    public TaskExecTO execute(final Long taskId, final boolean dryRun) {
-        Task task = taskDAO.find(taskId);
+    public TaskExecTO execute(final Long taskKey, final boolean dryRun) {
+        Task task = taskDAO.find(taskKey);
         if (task == null) {
-            throw new NotFoundException("Task " + taskId);
+            throw new NotFoundException("Task " + taskKey);
         }
         TaskUtils taskUtils = taskUtilsFactory.getInstance(task);
 
@@ -196,7 +201,7 @@ public class TaskLogic extends AbstractJobLogic<AbstractTaskTO> {
                 break;
 
             case NOTIFICATION:
-                final TaskExec notExec = notificationJob.executeSingle((NotificationTask) task);
+                final TaskExec notExec = notificationJobDelegate.executeSingle((NotificationTask) task);
                 result = binder.getTaskExecTO(notExec);
                 break;
 
@@ -204,15 +209,14 @@ public class TaskLogic extends AbstractJobLogic<AbstractTaskTO> {
             case SYNCHRONIZATION:
             case PUSH:
                 try {
-                    jobInstanceLoader.registerJob(task,
-                            ((SchedTask) task).getJobClassName(),
-                            ((SchedTask) task).getCronExpression());
-
-                    JobDataMap map = new JobDataMap();
-                    map.put(TaskJob.DRY_RUN_JOBDETAIL_KEY, dryRun);
+                    Map<String, Object> jobDataMap = jobInstanceLoader.registerJob(
+                            (SchedTask) task,
+                            confDAO.find("tasks.interruptMaxRetries", "1").getValues().get(0).getLongValue());
 
+                    jobDataMap.put(TaskJob.DRY_RUN_JOBDETAIL_KEY, dryRun);
                     scheduler.getScheduler().triggerJob(
-                            new JobKey(JobNamer.getJobName(task), Scheduler.DEFAULT_GROUP), map);
+                            new JobKey(JobNamer.getJobName(task), Scheduler.DEFAULT_GROUP),
+                            new JobDataMap(jobDataMap));
                 } catch (Exception e) {
                     LOG.error("While executing task {}", task, e);
 
@@ -222,7 +226,7 @@ public class TaskLogic extends AbstractJobLogic<AbstractTaskTO> {
                 }
 
                 result = new TaskExecTO();
-                result.setTask(taskId);
+                result.setTask(taskKey);
                 result.setStartDate(new Date());
                 result.setStatus("JOB_FIRED");
                 result.setMessage("Job fired; waiting for results...");
@@ -235,10 +239,10 @@ public class TaskLogic extends AbstractJobLogic<AbstractTaskTO> {
     }
 
     @PreAuthorize("hasRole('" + Entitlement.TASK_READ + "')")
-    public TaskExecTO report(final Long executionId, final PropagationTaskExecStatus status, final String message) {
-        TaskExec exec = taskExecDAO.find(executionId);
+    public TaskExecTO report(final Long execKey, final PropagationTaskExecStatus status, final String message) {
+        TaskExec exec = taskExecDAO.find(execKey);
         if (exec == null) {
-            throw new NotFoundException("Task execution " + executionId);
+            throw new NotFoundException("Task execution " + execKey);
         }
 
         SyncopeClientException sce = SyncopeClientException.build(ClientExceptionType.InvalidPropagationTaskExecReport);
@@ -277,10 +281,10 @@ public class TaskLogic extends AbstractJobLogic<AbstractTaskTO> {
     }
 
     @PreAuthorize("hasRole('" + Entitlement.TASK_DELETE + "')")
-    public <T extends AbstractTaskTO> T delete(final Long taskId) {
-        Task task = taskDAO.find(taskId);
+    public <T extends AbstractTaskTO> T delete(final Long taskKey) {
+        Task task = taskDAO.find(taskKey);
         if (task == null) {
-            throw new NotFoundException("Task " + taskId);
+            throw new NotFoundException("Task " + taskKey);
         }
         TaskUtils taskUtils = taskUtilsFactory.getInstance(task);
 
@@ -298,10 +302,10 @@ public class TaskLogic extends AbstractJobLogic<AbstractTaskTO> {
     }
 
     @PreAuthorize("hasRole('" + Entitlement.TASK_DELETE + "')")
-    public TaskExecTO deleteExecution(final Long executionId) {
-        TaskExec taskExec = taskExecDAO.find(executionId);
+    public TaskExecTO deleteExecution(final Long execKey) {
+        TaskExec taskExec = taskExecDAO.find(execKey);
         if (taskExec == null) {
-            throw new NotFoundException("Task execution " + executionId);
+            throw new NotFoundException("Task execution " + execKey);
         }
 
         TaskExecTO taskExecutionToDelete = binder.getTaskExecTO(taskExec);

http://git-wip-us.apache.org/repos/asf/syncope/blob/34a1c214/core/logic/src/main/java/org/apache/syncope/core/logic/UserLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/UserLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/UserLogic.java
index 3aec28c..28e7401 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/UserLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/UserLogic.java
@@ -60,7 +60,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.stereotype.Component;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.transaction.interceptor.TransactionInterceptor;
 
 /**
  * Note that this controller does not extend {@link AbstractTransactionalLogic}, hence does not provide any
@@ -100,17 +99,19 @@ public class UserLogic extends AbstractAnyLogic<UserTO, UserMod> {
     protected SyncopeLogic syncopeLogic;
 
     @PreAuthorize("hasRole('" + Entitlement.USER_READ + "')")
+    @Transactional(readOnly = true)
     public String getUsername(final Long key) {
         return binder.getUserTO(key).getUsername();
     }
 
     @PreAuthorize("hasRole('" + Entitlement.USER_READ + "')")
+    @Transactional(readOnly = true)
     public Long getKey(final String username) {
         return binder.getUserTO(username).getKey();
     }
 
     @PreAuthorize("hasRole('" + Entitlement.USER_LIST + "')")
-    @Transactional(readOnly = true, rollbackFor = { Throwable.class })
+    @Transactional(readOnly = true)
     @Override
     public int count(final List<String> realms) {
         return userDAO.count(
@@ -118,7 +119,7 @@ public class UserLogic extends AbstractAnyLogic<UserTO, UserMod> {
     }
 
     @PreAuthorize("hasRole('" + Entitlement.USER_LIST + "')")
-    @Transactional(readOnly = true, rollbackFor = { Throwable.class })
+    @Transactional(readOnly = true)
     @Override
     public List<UserTO> list(
             final int page, final int size, final List<OrderByClause> orderBy,
@@ -152,7 +153,7 @@ public class UserLogic extends AbstractAnyLogic<UserTO, UserMod> {
     }
 
     @PreAuthorize("hasRole('" + Entitlement.USER_SEARCH + "')")
-    @Transactional(readOnly = true, rollbackFor = { Throwable.class })
+    @Transactional(readOnly = true)
     @Override
     public int searchCount(final SearchCond searchCondition, final List<String> realms) {
         return searchDAO.count(
@@ -161,7 +162,7 @@ public class UserLogic extends AbstractAnyLogic<UserTO, UserMod> {
     }
 
     @PreAuthorize("hasRole('" + Entitlement.USER_SEARCH + "')")
-    @Transactional(readOnly = true, rollbackFor = { Throwable.class })
+    @Transactional(readOnly = true)
     @Override
     public List<UserTO> search(final SearchCond searchCondition, final int page, final int size,
             final List<OrderByClause> orderBy, final List<String> realms, final boolean details) {
@@ -242,22 +243,21 @@ public class UserLogic extends AbstractAnyLogic<UserTO, UserMod> {
         return updatedTO;
     }
 
-    protected Map.Entry<Long, List<PropagationStatus>> setStatusOnWfAdapter(final User user,
-            final StatusMod statusMod) {
+    protected Map.Entry<Long, List<PropagationStatus>> setStatusOnWfAdapter(final StatusMod statusMod) {
         Map.Entry<Long, List<PropagationStatus>> updated;
 
         switch (statusMod.getType()) {
             case SUSPEND:
-                updated = provisioningManager.suspend(user, statusMod);
+                updated = provisioningManager.suspend(statusMod);
                 break;
 
             case REACTIVATE:
-                updated = provisioningManager.reactivate(user, statusMod);
+                updated = provisioningManager.reactivate(statusMod);
                 break;
 
             case ACTIVATE:
             default:
-                updated = provisioningManager.activate(user, statusMod);
+                updated = provisioningManager.activate(statusMod);
                 break;
 
         }
@@ -266,11 +266,8 @@ public class UserLogic extends AbstractAnyLogic<UserTO, UserMod> {
     }
 
     @PreAuthorize("hasRole('" + Entitlement.USER_UPDATE + "')")
-    @Transactional(rollbackFor = { Throwable.class })
     public UserTO status(final StatusMod statusMod) {
-        User user = userDAO.authFind(statusMod.getKey());
-
-        Map.Entry<Long, List<PropagationStatus>> updated = setStatusOnWfAdapter(user, statusMod);
+        Map.Entry<Long, List<PropagationStatus>> updated = setStatusOnWfAdapter(statusMod);
         final UserTO savedTO = binder.getUserTO(updated.getKey());
         savedTO.getPropagationStatusTOs().addAll(updated.getValue());
         return savedTO;
@@ -304,7 +301,7 @@ public class UserLogic extends AbstractAnyLogic<UserTO, UserMod> {
         if (user == null) {
             throw new NotFoundException("User with token " + token);
         }
-        provisioningManager.confirmPasswordReset(user, token, password);
+        provisioningManager.confirmPasswordReset(user.getKey(), token, password);
     }
 
     @PreAuthorize("isAuthenticated() and not(hasRole('" + Entitlement.ANONYMOUS + "'))")
@@ -332,9 +329,8 @@ public class UserLogic extends AbstractAnyLogic<UserTO, UserMod> {
 
         List<PropagationStatus> statuses = provisioningManager.delete(key);
 
-        final UserTO deletedTO;
-        User deleted = userDAO.find(key);
-        if (deleted == null) {
+        UserTO deletedTO;
+        if (userDAO.find(key) == null) {
             deletedTO = new UserTO();
             deletedTO.setKey(key);
         } else {
@@ -346,39 +342,35 @@ public class UserLogic extends AbstractAnyLogic<UserTO, UserMod> {
     }
 
     @PreAuthorize("hasRole('" + Entitlement.USER_UPDATE + "')")
-    @Transactional(rollbackFor = { Throwable.class })
     @Override
     public UserTO unlink(final Long key, final Collection<String> resources) {
-        final UserMod userMod = new UserMod();
+        UserMod userMod = new UserMod();
         userMod.setKey(key);
         userMod.getResourcesToRemove().addAll(resources);
-        Long updatedKey = provisioningManager.unlink(userMod);
 
-        return binder.getUserTO(updatedKey);
+        return binder.getUserTO(provisioningManager.unlink(userMod));
     }
 
     @PreAuthorize("hasRole('" + Entitlement.USER_UPDATE + "')")
-    @Transactional(rollbackFor = { Throwable.class })
     @Override
     public UserTO link(final Long key, final Collection<String> resources) {
-        final UserMod userMod = new UserMod();
+        UserMod userMod = new UserMod();
         userMod.setKey(key);
         userMod.getResourcesToAdd().addAll(resources);
+
         return binder.getUserTO(provisioningManager.link(userMod));
     }
 
     @PreAuthorize("hasRole('" + Entitlement.USER_UPDATE + "')")
-    @Transactional(rollbackFor = { Throwable.class })
     @Override
     public UserTO unassign(final Long key, final Collection<String> resources) {
-        final UserMod userMod = new UserMod();
+        UserMod userMod = new UserMod();
         userMod.setKey(key);
         userMod.getResourcesToRemove().addAll(resources);
         return update(userMod);
     }
 
     @PreAuthorize("hasRole('" + Entitlement.USER_UPDATE + "')")
-    @Transactional(rollbackFor = { Throwable.class })
     @Override
     public UserTO assign(
             final Long key,
@@ -386,7 +378,7 @@ public class UserLogic extends AbstractAnyLogic<UserTO, UserMod> {
             final boolean changepwd,
             final String password) {
 
-        final UserMod userMod = new UserMod();
+        UserMod userMod = new UserMod();
         userMod.setKey(key);
         userMod.getResourcesToAdd().addAll(resources);
 
@@ -402,20 +394,16 @@ public class UserLogic extends AbstractAnyLogic<UserTO, UserMod> {
     }
 
     @PreAuthorize("hasRole('" + Entitlement.USER_UPDATE + "')")
-    @Transactional(rollbackFor = { Throwable.class })
     @Override
     public UserTO deprovision(final Long key, final Collection<String> resources) {
-        User user = userDAO.authFind(key);
-
         List<PropagationStatus> statuses = provisioningManager.deprovision(key, resources);
 
-        final UserTO updatedUserTO = binder.getUserTO(user, true);
-        updatedUserTO.getPropagationStatusTOs().addAll(statuses);
-        return updatedUserTO;
+        UserTO updatedTO = binder.getUserTO(key);
+        updatedTO.getPropagationStatusTOs().addAll(statuses);
+        return updatedTO;
     }
 
     @PreAuthorize("hasRole('" + Entitlement.USER_UPDATE + "')")
-    @Transactional(readOnly = true)
     @Override
     public UserTO provision(
             final Long key,
@@ -423,14 +411,9 @@ public class UserLogic extends AbstractAnyLogic<UserTO, UserMod> {
             final boolean changePwd,
             final String password) {
 
-        final UserTO original = binder.getUserTO(key);
-
-        //trick: assign and retrieve propagation statuses ...
-        original.getPropagationStatusTOs().addAll(
-                assign(key, resources, changePwd, password).getPropagationStatusTOs());
+        UserTO original = binder.getUserTO(key);
+        original.getPropagationStatusTOs().addAll(provisioningManager.provision(key, changePwd, password, resources));
 
-        // .... rollback.
-        TransactionInterceptor.currentTransactionStatus().setRollbackOnly();
         return original;
     }
 


Mime
View raw message