You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by ju...@apache.org on 2019/10/09 07:39:06 UTC

[fineract-cn-async] branch develop updated (83f825c -> 6a65d01)

This is an automated email from the ASF dual-hosted git repository.

juhan pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git.


    from 83f825c  Merge pull request #8 from ebenezergraham/FINCN-157
     new 69b79fd  FINCN-179 gradle to 4.10.3, FINCN-178 make Travis build forks
     new 710daed  FINCN-179 upgrade dependency management plugin version
     new 6a65d01  Merge pull request #9 from aasaru/gradle_4.10.3

The 33 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 build.gradle                             |  12 ++++--------
 gradle/wrapper/gradle-wrapper.jar        | Bin 54212 -> 54212 bytes
 gradle/wrapper/gradle-wrapper.properties |   4 ++--
 travis.sh                                |  16 ++++++++++++----
 4 files changed, 18 insertions(+), 14 deletions(-)


[fineract-cn-async] 33/33: Merge pull request #9 from aasaru/gradle_4.10.3

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit 6a65d017ce8cd320dc9cff857ebb62c8178e5b47
Merge: 83f825c 710daed
Author: aasaru <aa...@gmail.com>
AuthorDate: Wed Oct 9 10:39:02 2019 +0300

    Merge pull request #9 from aasaru/gradle_4.10.3
    
    FINCN-179 gradle to 4.10.3, FINCN-178 make Travis build forks

 build.gradle                             |  12 ++++--------
 gradle/wrapper/gradle-wrapper.jar        | Bin 54212 -> 54212 bytes
 gradle/wrapper/gradle-wrapper.properties |   4 ++--
 travis.sh                                |  16 ++++++++++++----
 4 files changed, 18 insertions(+), 14 deletions(-)


[fineract-cn-async] 25/33: Removing last references to mifos

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit 7b3dae9c23b178b5f62c7af81ab751876eceb90a
Author: Myrle Krantz <my...@apache.org>
AuthorDate: Thu Apr 12 12:21:07 2018 +0200

    Removing last references to mifos
---
 README.md | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 09fd548..ec1b381 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,6 @@
 # Apache Fineract CN Async
 
-[![Join the chat at https://gitter.im/mifos-initiative/mifos.io](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mifos-initiative/mifos.io?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-
-This project is an umbrella for all Mifos I/O Core components.
+This contains the code necessary for asynchronous execution of commands with the correct user permissions.
 
 ## Abstract
 Apache Fineract CN is an application framework for digital financial services, a system to support nationwide and cross-national financial transactions and help to level and speed the creation of an inclusive, interconnected digital economy for every nation in the world.


[fineract-cn-async] 16/33: Update copyright information

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit 07c0f48ff4369fcd8605b727651b09b10909ef2a
Author: Isaac Kamga <u2...@gmail.com>
AuthorDate: Fri Mar 2 11:07:06 2018 +0100

    Update copyright information
---
 HEADER                                             | 25 ++++++++++++----------
 NOTICE.txt                                         |  5 +++++
 README.md                                          |  4 ++--
 build.gradle                                       |  2 +-
 .../config/AsyncProcessingJavaConfiguration.java   | 25 ++++++++++++----------
 .../io/mifos/core/async/config/EnableAsync.java    | 25 ++++++++++++----------
 .../core/async/core/DelegatingContextCallable.java | 18 ++++++++++++++++
 .../core/async/core/DelegatingContextExecutor.java | 18 ++++++++++++++++
 .../core/async/core/DelegatingContextRunnable.java | 18 ++++++++++++++++
 .../io/mifos/core/async/util/AsyncConstants.java   | 25 ++++++++++++----------
 10 files changed, 118 insertions(+), 47 deletions(-)

diff --git a/HEADER b/HEADER
index d47a70e..60b675e 100644
--- a/HEADER
+++ b/HEADER
@@ -1,13 +1,16 @@
-Copyright ${year} ${name}.
+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
 
-Licensed 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
 
-   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.
+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.
diff --git a/NOTICE.txt b/NOTICE.txt
new file mode 100644
index 0000000..559cf6e
--- /dev/null
+++ b/NOTICE.txt
@@ -0,0 +1,5 @@
+Apache Fineract CN Async
+Copyright [2017-2018] The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
\ No newline at end of file
diff --git a/README.md b/README.md
index dec4b7d..09fd548 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,11 @@
-# Mifos I/O Core Async
+# Apache Fineract CN Async
 
 [![Join the chat at https://gitter.im/mifos-initiative/mifos.io](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mifos-initiative/mifos.io?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
 
 This project is an umbrella for all Mifos I/O Core components.
 
 ## Abstract
-Mifos I/O is an application framework for digital financial services, a system to support nationwide and cross-national financial transactions and help to level and speed the creation of an inclusive, interconnected digital economy for every nation in the world.
+Apache Fineract CN is an application framework for digital financial services, a system to support nationwide and cross-national financial transactions and help to level and speed the creation of an inclusive, interconnected digital economy for every nation in the world.
 
 ## Prerequisites
 ### Runtime
diff --git a/build.gradle b/build.gradle
index d2fb6fc..04b42af 100644
--- a/build.gradle
+++ b/build.gradle
@@ -76,5 +76,5 @@ license {
         java = 'SLASHSTAR_STYLE'
     }
     ext.year = Calendar.getInstance().get(Calendar.YEAR)
-    ext.name = 'The Mifos Initiative'
+    ext.name = 'The Apache Software Foundation'
 }
diff --git a/src/main/java/io/mifos/core/async/config/AsyncProcessingJavaConfiguration.java b/src/main/java/io/mifos/core/async/config/AsyncProcessingJavaConfiguration.java
index b15e4cd..1190042 100644
--- a/src/main/java/io/mifos/core/async/config/AsyncProcessingJavaConfiguration.java
+++ b/src/main/java/io/mifos/core/async/config/AsyncProcessingJavaConfiguration.java
@@ -1,17 +1,20 @@
 /*
- * Copyright 2017 The Mifos Initiative.
+ * 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
  *
- * Licensed 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
  *
- *    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.
+ * 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 io.mifos.core.async.config;
 
diff --git a/src/main/java/io/mifos/core/async/config/EnableAsync.java b/src/main/java/io/mifos/core/async/config/EnableAsync.java
index 2141924..d1a8da5 100644
--- a/src/main/java/io/mifos/core/async/config/EnableAsync.java
+++ b/src/main/java/io/mifos/core/async/config/EnableAsync.java
@@ -1,17 +1,20 @@
 /*
- * Copyright 2017 The Mifos Initiative.
+ * 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
  *
- * Licensed 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
  *
- *    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.
+ * 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 io.mifos.core.async.config;
 
diff --git a/src/main/java/io/mifos/core/async/core/DelegatingContextCallable.java b/src/main/java/io/mifos/core/async/core/DelegatingContextCallable.java
index 9af1bf3..3c064dd 100644
--- a/src/main/java/io/mifos/core/async/core/DelegatingContextCallable.java
+++ b/src/main/java/io/mifos/core/async/core/DelegatingContextCallable.java
@@ -1,3 +1,21 @@
+/*
+ * 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 io.mifos.core.async.core;
 
 import io.mifos.core.api.util.UserContext;
diff --git a/src/main/java/io/mifos/core/async/core/DelegatingContextExecutor.java b/src/main/java/io/mifos/core/async/core/DelegatingContextExecutor.java
index 2ea9f77..0267244 100644
--- a/src/main/java/io/mifos/core/async/core/DelegatingContextExecutor.java
+++ b/src/main/java/io/mifos/core/async/core/DelegatingContextExecutor.java
@@ -1,3 +1,21 @@
+/*
+ * 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 io.mifos.core.async.core;
 
 import io.mifos.core.api.util.UserContext;
diff --git a/src/main/java/io/mifos/core/async/core/DelegatingContextRunnable.java b/src/main/java/io/mifos/core/async/core/DelegatingContextRunnable.java
index ae5b620..6977120 100644
--- a/src/main/java/io/mifos/core/async/core/DelegatingContextRunnable.java
+++ b/src/main/java/io/mifos/core/async/core/DelegatingContextRunnable.java
@@ -1,3 +1,21 @@
+/*
+ * 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 io.mifos.core.async.core;
 
 import io.mifos.core.api.util.UserContext;
diff --git a/src/main/java/io/mifos/core/async/util/AsyncConstants.java b/src/main/java/io/mifos/core/async/util/AsyncConstants.java
index 5d452ab..c780258 100644
--- a/src/main/java/io/mifos/core/async/util/AsyncConstants.java
+++ b/src/main/java/io/mifos/core/async/util/AsyncConstants.java
@@ -1,17 +1,20 @@
 /*
- * Copyright 2017 The Mifos Initiative.
+ * 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
  *
- * Licensed 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
  *
- *    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.
+ * 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 io.mifos.core.async.util;
 


[fineract-cn-async] 06/33: Add null checks for tenant identifier

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit 25dd7affcb0fb36f7fefa8420c48e7eba83b57af
Author: Mark <ma...@gmail.com>
AuthorDate: Wed Apr 19 14:36:20 2017 +0200

    Add null checks for tenant identifier
---
 .../mifos/core/async/core/DelegatingTenantContextCallable.java |  9 ++++++++-
 .../mifos/core/async/core/DelegatingTenantContextExecutor.java | 10 ++++++++--
 .../mifos/core/async/core/DelegatingTenantContextRunnable.java |  9 ++++++++-
 3 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/src/main/java/io/mifos/core/async/core/DelegatingTenantContextCallable.java b/src/main/java/io/mifos/core/async/core/DelegatingTenantContextCallable.java
index d473b24..139c1ff 100644
--- a/src/main/java/io/mifos/core/async/core/DelegatingTenantContextCallable.java
+++ b/src/main/java/io/mifos/core/async/core/DelegatingTenantContextCallable.java
@@ -9,6 +9,11 @@ public class DelegatingTenantContextCallable<V> implements Callable<V> {
   private final Callable<V> delegate;
   private final String tenantIdentifier;
 
+  DelegatingTenantContextCallable(Callable<V> delegate) {
+    this.delegate = delegate;
+    this.tenantIdentifier = null;
+  }
+
   DelegatingTenantContextCallable(final Callable<V> delegate, final String tenantIdentifier) {
     super();
     this.delegate = delegate;
@@ -19,7 +24,9 @@ public class DelegatingTenantContextCallable<V> implements Callable<V> {
   public V call() throws Exception {
     try {
       TenantContextHolder.clear();
-      TenantContextHolder.setIdentifier(this.tenantIdentifier);
+      if(this.tenantIdentifier != null) {
+        TenantContextHolder.setIdentifier(this.tenantIdentifier);
+      }
       return this.delegate.call();
     } finally {
       TenantContextHolder.clear();
diff --git a/src/main/java/io/mifos/core/async/core/DelegatingTenantContextExecutor.java b/src/main/java/io/mifos/core/async/core/DelegatingTenantContextExecutor.java
index 67e6322..1061822 100644
--- a/src/main/java/io/mifos/core/async/core/DelegatingTenantContextExecutor.java
+++ b/src/main/java/io/mifos/core/async/core/DelegatingTenantContextExecutor.java
@@ -41,10 +41,16 @@ public class DelegatingTenantContextExecutor implements AsyncTaskExecutor {
   }
 
   private Runnable wrap(final Runnable task) {
-    return new DelegatingTenantContextRunnable(task, TenantContextHolder.checkedGetIdentifier());
+    if(TenantContextHolder.identifier().isPresent()) {
+      return new DelegatingTenantContextRunnable(task, TenantContextHolder.checkedGetIdentifier());
+    }
+    return new DelegatingTenantContextRunnable(task);
   }
 
   private <T> Callable<T> wrap(final Callable<T> task) {
-    return new DelegatingTenantContextCallable<>(task, TenantContextHolder.checkedGetIdentifier());
+    if(TenantContextHolder.identifier().isPresent()) {
+      return new DelegatingTenantContextCallable<>(task, TenantContextHolder.checkedGetIdentifier());
+    }
+    return new DelegatingTenantContextCallable<>(task);
   }
 }
diff --git a/src/main/java/io/mifos/core/async/core/DelegatingTenantContextRunnable.java b/src/main/java/io/mifos/core/async/core/DelegatingTenantContextRunnable.java
index e0471d1..37d8ba6 100644
--- a/src/main/java/io/mifos/core/async/core/DelegatingTenantContextRunnable.java
+++ b/src/main/java/io/mifos/core/async/core/DelegatingTenantContextRunnable.java
@@ -7,6 +7,11 @@ public class DelegatingTenantContextRunnable implements Runnable {
   private final Runnable delegate;
   private final String tenantIdentifier;
 
+  DelegatingTenantContextRunnable(final Runnable delegate) {
+    this.delegate = delegate;
+    this.tenantIdentifier = null;
+  }
+
   DelegatingTenantContextRunnable(final Runnable delegate, final String tenantIdentifier) {
     super();
     this.delegate = delegate;
@@ -17,7 +22,9 @@ public class DelegatingTenantContextRunnable implements Runnable {
   public void run() {
     try {
       TenantContextHolder.clear();
-      TenantContextHolder.setIdentifier(this.tenantIdentifier);
+      if(this.tenantIdentifier != null) {
+        TenantContextHolder.setIdentifier(this.tenantIdentifier);
+      }
       this.delegate.run();
     } finally {
       TenantContextHolder.clear();


[fineract-cn-async] 01/33: Open sourcing core.async.

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit c4457353cbd67859b11e931d2c179643cc453bb1
Author: myrle-krantz <mk...@mifos.org>
AuthorDate: Tue Mar 14 09:51:12 2017 +0100

    Open sourcing core.async.
---
 .gitignore                                         |  14 ++
 HEADER                                             |  13 ++
 LICENSE                                            | 201 +++++++++++++++++++++
 README.md                                          |  28 +++
 build.gradle                                       |  70 +++++++
 gradle/wrapper/gradle-wrapper.jar                  | Bin 0 -> 54212 bytes
 gradle/wrapper/gradle-wrapper.properties           |   6 +
 gradlew                                            | 172 ++++++++++++++++++
 gradlew.bat                                        |  84 +++++++++
 settings.gradle                                    |   1 +
 .../config/AsyncProcessingJavaConfiguration.java   |  62 +++++++
 .../io/mifos/core/async/config/EnableAsync.java    |  35 ++++
 .../io/mifos/core/async/util/AsyncConstants.java   |  28 +++
 13 files changed, 714 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..536de5a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,14 @@
+/.gradle
+.idea
+build/
+target/
+
+# Ignore Gradle GUI config
+gradle-app.setting
+
+# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
+!gradle-wrapper.jar
+
+*.iml
+
+*.log
\ No newline at end of file
diff --git a/HEADER b/HEADER
new file mode 100644
index 0000000..d47a70e
--- /dev/null
+++ b/HEADER
@@ -0,0 +1,13 @@
+Copyright ${year} ${name}.
+
+Licensed 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.
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..8dada3e
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "{}"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright {yyyy} {name of copyright owner}
+
+   Licensed 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.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..dec4b7d
--- /dev/null
+++ b/README.md
@@ -0,0 +1,28 @@
+# Mifos I/O Core Async
+
+[![Join the chat at https://gitter.im/mifos-initiative/mifos.io](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mifos-initiative/mifos.io?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+
+This project is an umbrella for all Mifos I/O Core components.
+
+## Abstract
+Mifos I/O is an application framework for digital financial services, a system to support nationwide and cross-national financial transactions and help to level and speed the creation of an inclusive, interconnected digital economy for every nation in the world.
+
+## Prerequisites
+### Runtime
+Install Java 8 as described at https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html.
+
+## Versioning
+The version numbers follow the [Semantic Versioning](http://semver.org/) scheme.
+
+In addition to MAJOR.MINOR.PATCH the following postfixes are used to indicate the development state.
+
+* BUILD-SNAPSHOT - A release currently in development. 
+* RELEASE - _General availability_ indicates that this release is the best available version and is recommended for all usage.
+
+The versioning layout is {MAJOR}.{MINOR}.{PATCH}-{INDICATOR}[.{PATCH}]. Only milestones and release candidates can  have patch versions. Some examples:
+
+1.2.3-BUILD-SNAPSHOT  
+1.3.5-RELEASE  
+
+## License
+See [LICENSE](LICENSE) file.
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..7436af0
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,70 @@
+buildscript {
+    repositories {
+        jcenter();
+    }
+    dependencies {
+        classpath 'io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE'
+    }
+}
+
+plugins {
+    id 'com.github.hierynomus.license' version '0.13.1'
+}
+
+group 'io.mifos.core'
+version '0.1.0-BUILD-SNAPSHOT'
+
+ext.versions = [
+        springcontext        : '4.3.3.RELEASE',
+        springboot           : '1.4.1.RELEASE',
+        findbugs             : '3.0.1',
+]
+
+apply plugin: 'java'
+apply plugin: 'idea'
+apply plugin: 'maven'
+apply plugin: 'maven-publish'
+apply plugin: 'license'
+apply plugin: 'io.spring.dependency-management'
+
+tasks.withType(JavaCompile) {
+    sourceCompatibility = JavaVersion.VERSION_1_8
+    targetCompatibility = JavaVersion.VERSION_1_8
+}
+
+repositories {
+    jcenter()
+    mavenLocal()
+}
+
+dependencies {
+    compile(
+            [group: 'org.springframework', name: 'spring-context', version: versions.springcontext],
+            [group: 'com.google.code.findbugs', name: 'jsr305', version: versions.findbugs]
+    )
+
+    testCompile(
+            [group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: versions.springboot]
+    )
+}
+
+publishing {
+    publications {
+        asyncPublication(MavenPublication) {
+            from components.java
+            groupId project.group
+            artifactId project.name
+            version project.version
+        }
+    }
+}
+
+license {
+    header rootProject.file('HEADER')
+    strictCheck true
+    mapping {
+        java = 'SLASHSTAR_STYLE'
+    }
+    ext.year = Calendar.getInstance().get(Calendar.YEAR)
+    ext.name = 'The Mifos Initiative'
+}
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..01143ae
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..7c2a52f
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Mon Mar 13 18:40:21 CET 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-bin.zip
diff --git a/gradlew b/gradlew
new file mode 100755
index 0000000..4453cce
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+    echo "$*"
+}
+
+die ( ) {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+  NONSTOP* )
+    nonstop=true
+    ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+    JAVACMD=`cygpath --unix "$JAVACMD"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Escape application args
+save ( ) {
+    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+    echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+  cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..e95643d
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem  Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..2c3ca4d
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1 @@
+rootProject.name = 'async'
\ No newline at end of file
diff --git a/src/main/java/io/mifos/core/async/config/AsyncProcessingJavaConfiguration.java b/src/main/java/io/mifos/core/async/config/AsyncProcessingJavaConfiguration.java
new file mode 100644
index 0000000..32e7d68
--- /dev/null
+++ b/src/main/java/io/mifos/core/async/config/AsyncProcessingJavaConfiguration.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2017 The Mifos Initiative.
+ *
+ * Licensed 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 io.mifos.core.async.config;
+
+import io.mifos.core.async.util.AsyncConstants;
+import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
+import org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.env.Environment;
+import org.springframework.scheduling.annotation.AsyncConfigurer;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
+
+import java.util.concurrent.Executor;
+
+@Configuration
+@EnableAsync
+public class AsyncProcessingJavaConfiguration
+    implements AsyncConfigurer {
+
+  private final Environment env;
+
+  @Autowired
+  public AsyncProcessingJavaConfiguration(final Environment env) {
+    super();
+    this.env = env;
+  }
+
+  @Override
+  public Executor getAsyncExecutor() {
+    ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
+    executor.setCorePoolSize(
+        Integer.valueOf(this.env.getProperty(AsyncConstants.CORE_POOL_SIZE_PROP, AsyncConstants.CORE_POOL_SIZE_DEFAULT)));
+    executor.setMaxPoolSize(
+        Integer.valueOf(this.env.getProperty(AsyncConstants.MAX_POOL_SIZE_PROP, AsyncConstants.MAX_POOL_SIZE_DEFAULT)));
+    executor.setQueueCapacity(
+        Integer.valueOf(this.env.getProperty(AsyncConstants.QUEUE_CAPACITY_PROP, AsyncConstants.QUEUE_CAPACITY_DEFAULT)));
+    executor.setThreadNamePrefix(
+        this.env.getProperty(AsyncConstants.THREAD_NAME_PROP, AsyncConstants.THREAD_NAME_DEFAULT));
+    executor.initialize();
+    return executor;
+  }
+
+  @Override
+  public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
+    return new SimpleAsyncUncaughtExceptionHandler();
+  }
+}
diff --git a/src/main/java/io/mifos/core/async/config/EnableAsync.java b/src/main/java/io/mifos/core/async/config/EnableAsync.java
new file mode 100644
index 0000000..2141924
--- /dev/null
+++ b/src/main/java/io/mifos/core/async/config/EnableAsync.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2017 The Mifos Initiative.
+ *
+ * Licensed 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 io.mifos.core.async.config;
+
+import org.springframework.context.annotation.Import;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@SuppressWarnings("unused")
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+@Inherited
+@Import({AsyncProcessingJavaConfiguration.class})
+public @interface EnableAsync {
+
+}
diff --git a/src/main/java/io/mifos/core/async/util/AsyncConstants.java b/src/main/java/io/mifos/core/async/util/AsyncConstants.java
new file mode 100644
index 0000000..5d452ab
--- /dev/null
+++ b/src/main/java/io/mifos/core/async/util/AsyncConstants.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2017 The Mifos Initiative.
+ *
+ * Licensed 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 io.mifos.core.async.util;
+
+public interface AsyncConstants {
+
+  String CORE_POOL_SIZE_PROP = "async.corePoolSize";
+  String CORE_POOL_SIZE_DEFAULT = "32";
+  String MAX_POOL_SIZE_PROP = "async.maxPoolSize";
+  String MAX_POOL_SIZE_DEFAULT = "16384";
+  String QUEUE_CAPACITY_PROP = "async.queueCapacity";
+  String QUEUE_CAPACITY_DEFAULT = "0";
+  String THREAD_NAME_PROP = "async.threadName";
+  String THREAD_NAME_DEFAULT = "async-processor-";
+}


[fineract-cn-async] 31/33: FINCN-179 gradle to 4.10.3, FINCN-178 make Travis build forks

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit 69b79fd5faf4ce6d856d8542184b0ffe319dc453
Author: Juhan Aasaru <Ju...@nortal.com>
AuthorDate: Tue Oct 1 09:10:35 2019 +0300

    FINCN-179 gradle to 4.10.3, FINCN-178 make Travis build forks
---
 build.gradle                             |  10 ++++------
 gradle/wrapper/gradle-wrapper.jar        | Bin 54212 -> 54212 bytes
 gradle/wrapper/gradle-wrapper.properties |   4 ++--
 travis.sh                                |  16 ++++++++++++----
 4 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/build.gradle b/build.gradle
index ccd2fe4..7e64872 100644
--- a/build.gradle
+++ b/build.gradle
@@ -20,7 +20,7 @@ buildscript {
         jcenter()
     }
     dependencies {
-        classpath 'io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE'
+        classpath 'io.spring.gradle:dependency-management-plugin:0.6.1.RELEASE'
     }
 }
 
@@ -28,6 +28,9 @@ plugins {
     id 'com.github.hierynomus.license' version '0.13.1'
     id("org.nosphere.apache.rat") version "0.3.1"
     id "com.jfrog.artifactory" version "4.9.5"
+    id 'maven-publish'
+    id 'idea'
+    id 'java'
 }
 
 group 'org.apache.fineract.cn'
@@ -42,11 +45,6 @@ ext.versions = [
         findbugs      : '3.0.1',
 ]
 
-apply plugin: 'java'
-apply plugin: 'idea'
-apply plugin: 'maven'
-apply plugin: 'maven-publish'
-apply plugin: 'license'
 apply plugin: 'io.spring.dependency-management'
 
 tasks.withType(JavaCompile) {
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index 01143ae..af7a4fe 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 7c2a52f..aeea1f0 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Mon Mar 13 18:40:21 CET 2017
+#Tue Oct 01 09:00:23 EEST 2019
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
diff --git a/travis.sh b/travis.sh
index 03a75ee..d54330d 100755
--- a/travis.sh
+++ b/travis.sh
@@ -36,6 +36,12 @@ function build_pullrequest() {
   ./gradlew publishToMavenLocal rat || EXIT_STATUS=$?
 }
 
+# Builds Forked (non-apache) Repository
+function build_fork() {
+  echo -e "Building branch $TRAVIS_BRANCH of fork $TRAVIS_REPO_SLUG. Won't publish anything to Artifactory."
+  ./gradlew publishToMavenLocal rat || EXIT_STATUS=$?
+}
+
 # For other branches we need to add branch name as prefix
 function build_otherbranch() {
   echo -e "Building a snapshot out of branch [$TRAVIS_BRANCH] and publishing it with prefix '${TRAVIS_BRANCH}-SNAPSHOT'"
@@ -49,17 +55,19 @@ function build_tag() {
 
 }
 
+echo -e "TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG"
 echo -e "TRAVIS_BRANCH=$TRAVIS_BRANCH"
 echo -e "TRAVIS_TAG=$TRAVIS_TAG"
 echo -e "TRAVIS_COMMIT=${TRAVIS_COMMIT::7}"
 echo -e "TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST"
 
-# Build Logic
-if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
+if [[ $TRAVIS_REPO_SLUG != apache* ]]; then
+  build_fork
+elif [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
   build_pullrequest
-elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" != "$BUILD_SNAPSHOTS_BRANCH" ] && [ "$TRAVIS_TAG" == "" ]  ; then
+elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" != "$BUILD_SNAPSHOTS_BRANCH" ] && [ "$TRAVIS_TAG" == "" ]; then
   build_otherbranch
-elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "$BUILD_SNAPSHOTS_BRANCH" ] && [ "$TRAVIS_TAG" == "" ] ; then
+elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "$BUILD_SNAPSHOTS_BRANCH" ] && [ "$TRAVIS_TAG" == "" ]; then
   build_snapshot
 elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
   build_tag


[fineract-cn-async] 21/33: Adding rat checks.

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit fc657785d66b624375d9fbd887dc6587d6dfe71f
Author: Myrle Krantz <my...@apache.org>
AuthorDate: Mon Apr 9 16:11:01 2018 +0200

    Adding rat checks.
---
 build.gradle    | 24 ++++++++++++++++++++++++
 settings.gradle | 17 +++++++++++++++++
 2 files changed, 41 insertions(+)

diff --git a/build.gradle b/build.gradle
index fa1f253..53a128b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
 buildscript {
     repositories {
         jcenter()
@@ -9,6 +26,7 @@ buildscript {
 
 plugins {
     id 'com.github.hierynomus.license' version '0.13.1'
+    id("org.nosphere.apache.rat") version "0.3.1"
 }
 
 group 'org.apache.fineract.cn'
@@ -76,3 +94,9 @@ license {
         java = 'SLASHSTAR_STYLE'
     }
 }
+
+rat {
+    // List of exclude directives, defaults to ['**/.gradle/**']
+    excludes = [ ".idea/**", ".gradle/**", "gradle/**", "build/**", "gradlew", "gradlew.bat", "README.md" ]
+
+}
diff --git a/settings.gradle b/settings.gradle
index 2c3ca4d..368a527 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1 +1,18 @@
+/*
+ * 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.
+ */
+
 rootProject.name = 'async'
\ No newline at end of file


[fineract-cn-async] 24/33: Change package names from mifos to apache fineract.

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit dc9c53f091fe795632f1936a6e28a85527e2fd10
Author: Myrle Krantz <my...@apache.org>
AuthorDate: Thu Apr 12 12:18:59 2018 +0200

    Change package names from mifos to apache fineract.
---
 .../fineract/cn}/async/config/AsyncProcessingJavaConfiguration.java | 6 +++---
 .../core => org/apache/fineract/cn}/async/config/EnableAsync.java   | 2 +-
 .../apache/fineract/cn}/async/core/DelegatingContextCallable.java   | 2 +-
 .../apache/fineract/cn}/async/core/DelegatingContextExecutor.java   | 2 +-
 .../apache/fineract/cn}/async/core/DelegatingContextRunnable.java   | 2 +-
 .../core => org/apache/fineract/cn}/async/util/AsyncConstants.java  | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/main/java/io/mifos/core/async/config/AsyncProcessingJavaConfiguration.java b/src/main/java/org/apache/fineract/cn/async/config/AsyncProcessingJavaConfiguration.java
similarity index 94%
rename from src/main/java/io/mifos/core/async/config/AsyncProcessingJavaConfiguration.java
rename to src/main/java/org/apache/fineract/cn/async/config/AsyncProcessingJavaConfiguration.java
index 1190042..99ca635 100644
--- a/src/main/java/io/mifos/core/async/config/AsyncProcessingJavaConfiguration.java
+++ b/src/main/java/org/apache/fineract/cn/async/config/AsyncProcessingJavaConfiguration.java
@@ -16,10 +16,10 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package io.mifos.core.async.config;
+package org.apache.fineract.cn.async.config;
 
-import io.mifos.core.async.core.DelegatingContextExecutor;
-import io.mifos.core.async.util.AsyncConstants;
+import org.apache.fineract.cn.async.core.DelegatingContextExecutor;
+import org.apache.fineract.cn.async.util.AsyncConstants;
 import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
 import org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler;
 import org.springframework.beans.factory.annotation.Autowired;
diff --git a/src/main/java/io/mifos/core/async/config/EnableAsync.java b/src/main/java/org/apache/fineract/cn/async/config/EnableAsync.java
similarity index 96%
rename from src/main/java/io/mifos/core/async/config/EnableAsync.java
rename to src/main/java/org/apache/fineract/cn/async/config/EnableAsync.java
index d1a8da5..3eddbd1 100644
--- a/src/main/java/io/mifos/core/async/config/EnableAsync.java
+++ b/src/main/java/org/apache/fineract/cn/async/config/EnableAsync.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package io.mifos.core.async.config;
+package org.apache.fineract.cn.async.config;
 
 import org.springframework.context.annotation.Import;
 
diff --git a/src/main/java/io/mifos/core/async/core/DelegatingContextCallable.java b/src/main/java/org/apache/fineract/cn/async/core/DelegatingContextCallable.java
similarity index 97%
rename from src/main/java/io/mifos/core/async/core/DelegatingContextCallable.java
rename to src/main/java/org/apache/fineract/cn/async/core/DelegatingContextCallable.java
index 8b1f617..d2baf49 100644
--- a/src/main/java/io/mifos/core/async/core/DelegatingContextCallable.java
+++ b/src/main/java/org/apache/fineract/cn/async/core/DelegatingContextCallable.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package io.mifos.core.async.core;
+package org.apache.fineract.cn.async.core;
 
 
 import java.util.Optional;
diff --git a/src/main/java/io/mifos/core/async/core/DelegatingContextExecutor.java b/src/main/java/org/apache/fineract/cn/async/core/DelegatingContextExecutor.java
similarity index 98%
rename from src/main/java/io/mifos/core/async/core/DelegatingContextExecutor.java
rename to src/main/java/org/apache/fineract/cn/async/core/DelegatingContextExecutor.java
index f82fc9d..394c003 100644
--- a/src/main/java/io/mifos/core/async/core/DelegatingContextExecutor.java
+++ b/src/main/java/org/apache/fineract/cn/async/core/DelegatingContextExecutor.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package io.mifos.core.async.core;
+package org.apache.fineract.cn.async.core;
 
 import org.apache.fineract.cn.api.util.UserContext;
 import org.apache.fineract.cn.api.util.UserContextHolder;
diff --git a/src/main/java/io/mifos/core/async/core/DelegatingContextRunnable.java b/src/main/java/org/apache/fineract/cn/async/core/DelegatingContextRunnable.java
similarity index 97%
rename from src/main/java/io/mifos/core/async/core/DelegatingContextRunnable.java
rename to src/main/java/org/apache/fineract/cn/async/core/DelegatingContextRunnable.java
index 14cf0fe..ce48113 100644
--- a/src/main/java/io/mifos/core/async/core/DelegatingContextRunnable.java
+++ b/src/main/java/org/apache/fineract/cn/async/core/DelegatingContextRunnable.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package io.mifos.core.async.core;
+package org.apache.fineract.cn.async.core;
 
 
 import java.util.Optional;
diff --git a/src/main/java/io/mifos/core/async/util/AsyncConstants.java b/src/main/java/org/apache/fineract/cn/async/util/AsyncConstants.java
similarity index 96%
rename from src/main/java/io/mifos/core/async/util/AsyncConstants.java
rename to src/main/java/org/apache/fineract/cn/async/util/AsyncConstants.java
index c780258..0edb87d 100644
--- a/src/main/java/io/mifos/core/async/util/AsyncConstants.java
+++ b/src/main/java/org/apache/fineract/cn/async/util/AsyncConstants.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package io.mifos.core.async.util;
+package org.apache.fineract.cn.async.util;
 
 public interface AsyncConstants {
 


[fineract-cn-async] 26/33: Merge pull request #6 from myrle-krantz/develop

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit 42680f35ba1e69d8b74c47c092af21dfbc48ab94
Merge: 0625c45 7b3dae9
Author: Myrle Krantz <my...@apache.org>
AuthorDate: Mon Apr 16 21:24:43 2018 +0200

    Merge pull request #6 from myrle-krantz/develop
    
    Updating package names.

 README.md                                                         | 4 +---
 .../cn}/async/config/AsyncProcessingJavaConfiguration.java        | 6 +++---
 .../core => org/apache/fineract/cn}/async/config/EnableAsync.java | 2 +-
 .../apache/fineract/cn}/async/core/DelegatingContextCallable.java | 8 ++++----
 .../apache/fineract/cn}/async/core/DelegatingContextExecutor.java | 8 ++++----
 .../apache/fineract/cn}/async/core/DelegatingContextRunnable.java | 8 ++++----
 .../apache/fineract/cn}/async/util/AsyncConstants.java            | 2 +-
 7 files changed, 18 insertions(+), 20 deletions(-)


[fineract-cn-async] 19/33: Merge branch 'develop' of https://github.com/apache/fineract-cn-async into develop

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit d2328333625f964cc66e38a365265d05ab426339
Merge: 7f3dcb4 5667a5e
Author: Isaac Kamga <u2...@gmail.com>
AuthorDate: Fri Mar 9 12:26:06 2018 +0100

    Merge branch 'develop' of https://github.com/apache/fineract-cn-async into develop



[fineract-cn-async] 11/33: Merge pull request #5 from mgeiss/develop

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit cdcdf2a927498526779a80b5eeb4b9930581eb84
Merge: d645c62 1b95bd7
Author: Markus Geiß <ma...@apache.org>
AuthorDate: Wed Jun 14 11:33:47 2017 +0200

    Merge pull request #5 from mgeiss/develop
    
    added UserContext to context delegating

 build.gradle                                       |  2 +
 .../config/AsyncProcessingJavaConfiguration.java   |  4 +-
 ...allable.java => DelegatingContextCallable.java} | 17 +++++++--
 ...xecutor.java => DelegatingContextExecutor.java} | 21 +++++++----
 .../core/async/core/DelegatingContextRunnable.java | 44 ++++++++++++++++++++++
 .../core/DelegatingTenantContextRunnable.java      | 33 ----------------
 6 files changed, 75 insertions(+), 46 deletions(-)


[fineract-cn-async] 02/33: added DelegatingSecurityContextAsyncTaskExecutor to delegate security context to child threads created via @Async

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit 0e4bd4c3dbfa04f441ef5f6844d6b551b0db9634
Author: mgeiss <mg...@mifos.org>
AuthorDate: Wed Apr 12 07:45:08 2017 +0200

    added DelegatingSecurityContextAsyncTaskExecutor to delegate
    security context to child threads created via @Async
---
 build.gradle                                                           | 2 ++
 .../io/mifos/core/async/config/AsyncProcessingJavaConfiguration.java   | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/build.gradle b/build.gradle
index 7436af0..59040c4 100644
--- a/build.gradle
+++ b/build.gradle
@@ -16,6 +16,7 @@ version '0.1.0-BUILD-SNAPSHOT'
 
 ext.versions = [
         springcontext        : '4.3.3.RELEASE',
+        springsecurity       : '4.2.2.RELEASE',
         springboot           : '1.4.1.RELEASE',
         findbugs             : '3.0.1',
 ]
@@ -40,6 +41,7 @@ repositories {
 dependencies {
     compile(
             [group: 'org.springframework', name: 'spring-context', version: versions.springcontext],
+            [group: 'org.springframework.security', name: 'spring-security-web', version: versions.springsecurity],
             [group: 'com.google.code.findbugs', name: 'jsr305', version: versions.findbugs]
     )
 
diff --git a/src/main/java/io/mifos/core/async/config/AsyncProcessingJavaConfiguration.java b/src/main/java/io/mifos/core/async/config/AsyncProcessingJavaConfiguration.java
index 32e7d68..1b966c0 100644
--- a/src/main/java/io/mifos/core/async/config/AsyncProcessingJavaConfiguration.java
+++ b/src/main/java/io/mifos/core/async/config/AsyncProcessingJavaConfiguration.java
@@ -24,6 +24,7 @@ import org.springframework.core.env.Environment;
 import org.springframework.scheduling.annotation.AsyncConfigurer;
 import org.springframework.scheduling.annotation.EnableAsync;
 import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
+import org.springframework.security.task.DelegatingSecurityContextAsyncTaskExecutor;
 
 import java.util.concurrent.Executor;
 
@@ -52,7 +53,7 @@ public class AsyncProcessingJavaConfiguration
     executor.setThreadNamePrefix(
         this.env.getProperty(AsyncConstants.THREAD_NAME_PROP, AsyncConstants.THREAD_NAME_DEFAULT));
     executor.initialize();
-    return executor;
+    return new DelegatingSecurityContextAsyncTaskExecutor(executor);
   }
 
   @Override


[fineract-cn-async] 10/33: added UserContext to context delegating

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit 1b95bd735447b208fb68f37a8b336ecaa1c96092
Author: mgeiss <mg...@mifos.org>
AuthorDate: Wed Jun 14 11:32:29 2017 +0200

    added UserContext to context delegating
---
 build.gradle                                       |  2 +
 .../config/AsyncProcessingJavaConfiguration.java   |  4 +-
 ...allable.java => DelegatingContextCallable.java} | 17 +++++++--
 ...xecutor.java => DelegatingContextExecutor.java} | 21 +++++++----
 .../core/async/core/DelegatingContextRunnable.java | 44 ++++++++++++++++++++++
 .../core/DelegatingTenantContextRunnable.java      | 33 ----------------
 6 files changed, 75 insertions(+), 46 deletions(-)

diff --git a/build.gradle b/build.gradle
index 6a14e06..deb397d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -16,6 +16,7 @@ version '0.1.0-BUILD-SNAPSHOT'
 
 ext.versions = [
         frameworklang        : '0.1.0-BUILD-SNAPSHOT',
+        frameworkapi         : '0.1.0-BUILD-SNAPSHOT',
         springcontext        : '4.3.3.RELEASE',
         springsecurity       : '4.2.2.RELEASE',
         springboot           : '1.4.1.RELEASE',
@@ -42,6 +43,7 @@ repositories {
 dependencies {
     compile(
             [group: 'io.mifos.core', name: 'lang', version: versions.frameworklang],
+            [group: 'io.mifos.core', name: 'api', version: versions.frameworkapi],
             [group: 'org.springframework', name: 'spring-context', version: versions.springcontext],
             [group: 'org.springframework.security', name: 'spring-security-web', version: versions.springsecurity],
             [group: 'com.google.code.findbugs', name: 'jsr305', version: versions.findbugs]
diff --git a/src/main/java/io/mifos/core/async/config/AsyncProcessingJavaConfiguration.java b/src/main/java/io/mifos/core/async/config/AsyncProcessingJavaConfiguration.java
index 272f37f..b15e4cd 100644
--- a/src/main/java/io/mifos/core/async/config/AsyncProcessingJavaConfiguration.java
+++ b/src/main/java/io/mifos/core/async/config/AsyncProcessingJavaConfiguration.java
@@ -15,7 +15,7 @@
  */
 package io.mifos.core.async.config;
 
-import io.mifos.core.async.core.DelegatingTenantContextExecutor;
+import io.mifos.core.async.core.DelegatingContextExecutor;
 import io.mifos.core.async.util.AsyncConstants;
 import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
 import org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler;
@@ -55,7 +55,7 @@ public class AsyncProcessingJavaConfiguration
         this.env.getProperty(AsyncConstants.THREAD_NAME_PROP, AsyncConstants.THREAD_NAME_DEFAULT));
     executor.initialize();
 
-    return new DelegatingTenantContextExecutor(new DelegatingSecurityContextAsyncTaskExecutor(executor));
+    return new DelegatingContextExecutor(new DelegatingSecurityContextAsyncTaskExecutor(executor));
   }
 
   @Override
diff --git a/src/main/java/io/mifos/core/async/core/DelegatingTenantContextCallable.java b/src/main/java/io/mifos/core/async/core/DelegatingContextCallable.java
similarity index 51%
rename from src/main/java/io/mifos/core/async/core/DelegatingTenantContextCallable.java
rename to src/main/java/io/mifos/core/async/core/DelegatingContextCallable.java
index 139c1ff..2a7d050 100644
--- a/src/main/java/io/mifos/core/async/core/DelegatingTenantContextCallable.java
+++ b/src/main/java/io/mifos/core/async/core/DelegatingContextCallable.java
@@ -1,23 +1,29 @@
 package io.mifos.core.async.core;
 
+import io.mifos.core.api.util.UserContext;
+import io.mifos.core.api.util.UserContextHolder;
 import io.mifos.core.lang.TenantContextHolder;
 
 import java.util.concurrent.Callable;
 
-public class DelegatingTenantContextCallable<V> implements Callable<V> {
+public class DelegatingContextCallable<V> implements Callable<V> {
 
   private final Callable<V> delegate;
   private final String tenantIdentifier;
+  private final UserContext userContext;
 
-  DelegatingTenantContextCallable(Callable<V> delegate) {
+  DelegatingContextCallable(Callable<V> delegate) {
     this.delegate = delegate;
     this.tenantIdentifier = null;
+    this.userContext = null;
   }
 
-  DelegatingTenantContextCallable(final Callable<V> delegate, final String tenantIdentifier) {
+  DelegatingContextCallable(final Callable<V> delegate, final String tenantIdentifier,
+                            final UserContext userContext) {
     super();
     this.delegate = delegate;
     this.tenantIdentifier = tenantIdentifier;
+    this.userContext = userContext;
   }
 
   @Override
@@ -27,9 +33,14 @@ public class DelegatingTenantContextCallable<V> implements Callable<V> {
       if(this.tenantIdentifier != null) {
         TenantContextHolder.setIdentifier(this.tenantIdentifier);
       }
+      UserContextHolder.clear();
+      if (this.userContext != null) {
+        UserContextHolder.setUserContext(this.userContext);
+      }
       return this.delegate.call();
     } finally {
       TenantContextHolder.clear();
+      UserContextHolder.clear();
     }
   }
 }
diff --git a/src/main/java/io/mifos/core/async/core/DelegatingTenantContextExecutor.java b/src/main/java/io/mifos/core/async/core/DelegatingContextExecutor.java
similarity index 59%
rename from src/main/java/io/mifos/core/async/core/DelegatingTenantContextExecutor.java
rename to src/main/java/io/mifos/core/async/core/DelegatingContextExecutor.java
index 1061822..316fc1b 100644
--- a/src/main/java/io/mifos/core/async/core/DelegatingTenantContextExecutor.java
+++ b/src/main/java/io/mifos/core/async/core/DelegatingContextExecutor.java
@@ -1,5 +1,6 @@
 package io.mifos.core.async.core;
 
+import io.mifos.core.api.util.UserContextHolder;
 import io.mifos.core.lang.TenantContextHolder;
 import org.springframework.core.task.AsyncTaskExecutor;
 import org.springframework.security.task.DelegatingSecurityContextAsyncTaskExecutor;
@@ -7,11 +8,11 @@ import org.springframework.security.task.DelegatingSecurityContextAsyncTaskExecu
 import java.util.concurrent.Callable;
 import java.util.concurrent.Future;
 
-public class DelegatingTenantContextExecutor implements AsyncTaskExecutor {
+public class DelegatingContextExecutor implements AsyncTaskExecutor {
 
   private final DelegatingSecurityContextAsyncTaskExecutor delegate;
 
-  public DelegatingTenantContextExecutor(final DelegatingSecurityContextAsyncTaskExecutor delegate) {
+  public DelegatingContextExecutor(final DelegatingSecurityContextAsyncTaskExecutor delegate) {
     super();
     this.delegate = delegate;
   }
@@ -41,16 +42,20 @@ public class DelegatingTenantContextExecutor implements AsyncTaskExecutor {
   }
 
   private Runnable wrap(final Runnable task) {
-    if(TenantContextHolder.identifier().isPresent()) {
-      return new DelegatingTenantContextRunnable(task, TenantContextHolder.checkedGetIdentifier());
+    if(TenantContextHolder.identifier().isPresent()
+        || UserContextHolder.getUserContext().isPresent()) {
+      return new DelegatingContextRunnable(task, TenantContextHolder.checkedGetIdentifier(),
+          UserContextHolder.getUserContext().get());
     }
-    return new DelegatingTenantContextRunnable(task);
+    return new DelegatingContextRunnable(task);
   }
 
   private <T> Callable<T> wrap(final Callable<T> task) {
-    if(TenantContextHolder.identifier().isPresent()) {
-      return new DelegatingTenantContextCallable<>(task, TenantContextHolder.checkedGetIdentifier());
+    if(TenantContextHolder.identifier().isPresent()
+        || UserContextHolder.getUserContext().isPresent()) {
+      return new DelegatingContextCallable<>(task, TenantContextHolder.checkedGetIdentifier(),
+          UserContextHolder.getUserContext().get());
     }
-    return new DelegatingTenantContextCallable<>(task);
+    return new DelegatingContextCallable<>(task);
   }
 }
diff --git a/src/main/java/io/mifos/core/async/core/DelegatingContextRunnable.java b/src/main/java/io/mifos/core/async/core/DelegatingContextRunnable.java
new file mode 100644
index 0000000..51d0e34
--- /dev/null
+++ b/src/main/java/io/mifos/core/async/core/DelegatingContextRunnable.java
@@ -0,0 +1,44 @@
+package io.mifos.core.async.core;
+
+import io.mifos.core.api.util.UserContext;
+import io.mifos.core.api.util.UserContextHolder;
+import io.mifos.core.lang.TenantContextHolder;
+
+public class DelegatingContextRunnable implements Runnable {
+
+  private final Runnable delegate;
+  private final String tenantIdentifier;
+  private final UserContext userContext;
+
+  DelegatingContextRunnable(final Runnable delegate) {
+    this.delegate = delegate;
+    this.tenantIdentifier = null;
+    this.userContext = null;
+  }
+
+  DelegatingContextRunnable(final Runnable delegate, final String tenantIdentifier,
+                            final UserContext userContext) {
+    super();
+    this.delegate = delegate;
+    this.tenantIdentifier = tenantIdentifier;
+    this.userContext = userContext;
+  }
+
+  @Override
+  public void run() {
+    try {
+      TenantContextHolder.clear();
+      if(this.tenantIdentifier != null) {
+        TenantContextHolder.setIdentifier(this.tenantIdentifier);
+      }
+      UserContextHolder.clear();
+      if (this.userContext != null) {
+        UserContextHolder.setUserContext(this.userContext);
+      }
+      this.delegate.run();
+    } finally {
+      TenantContextHolder.clear();
+      UserContextHolder.clear();;
+    }
+  }
+}
diff --git a/src/main/java/io/mifos/core/async/core/DelegatingTenantContextRunnable.java b/src/main/java/io/mifos/core/async/core/DelegatingTenantContextRunnable.java
deleted file mode 100644
index 37d8ba6..0000000
--- a/src/main/java/io/mifos/core/async/core/DelegatingTenantContextRunnable.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package io.mifos.core.async.core;
-
-import io.mifos.core.lang.TenantContextHolder;
-
-public class DelegatingTenantContextRunnable implements Runnable {
-
-  private final Runnable delegate;
-  private final String tenantIdentifier;
-
-  DelegatingTenantContextRunnable(final Runnable delegate) {
-    this.delegate = delegate;
-    this.tenantIdentifier = null;
-  }
-
-  DelegatingTenantContextRunnable(final Runnable delegate, final String tenantIdentifier) {
-    super();
-    this.delegate = delegate;
-    this.tenantIdentifier = tenantIdentifier;
-  }
-
-  @Override
-  public void run() {
-    try {
-      TenantContextHolder.clear();
-      if(this.tenantIdentifier != null) {
-        TenantContextHolder.setIdentifier(this.tenantIdentifier);
-      }
-      this.delegate.run();
-    } finally {
-      TenantContextHolder.clear();
-    }
-  }
-}


[fineract-cn-async] 09/33: Merge pull request #4 from myrle-krantz/develop

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit d645c62fc08d47bea757e47d005cf4fe7f4dcd32
Merge: 68b4f0c a237e81
Author: Myrle Krantz <my...@apache.org>
AuthorDate: Tue May 16 13:21:52 2017 +0200

    Merge pull request #4 from myrle-krantz/develop
    
    Including source in published artifact.  Makes debugging easier.

 build.gradle | 4 ++++
 1 file changed, 4 insertions(+)


[fineract-cn-async] 23/33: Adjusting to package name changes in upstream repositories.

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit e69271e56687c24712edc2646c3d8e0db59c02e8
Author: Myrle Krantz <my...@apache.org>
AuthorDate: Thu Apr 12 12:03:53 2018 +0200

    Adjusting to package name changes in upstream repositories.
---
 .../java/io/mifos/core/async/core/DelegatingContextCallable.java    | 6 +++---
 .../java/io/mifos/core/async/core/DelegatingContextExecutor.java    | 6 +++---
 .../java/io/mifos/core/async/core/DelegatingContextRunnable.java    | 6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/main/java/io/mifos/core/async/core/DelegatingContextCallable.java b/src/main/java/io/mifos/core/async/core/DelegatingContextCallable.java
index 3c064dd..8b1f617 100644
--- a/src/main/java/io/mifos/core/async/core/DelegatingContextCallable.java
+++ b/src/main/java/io/mifos/core/async/core/DelegatingContextCallable.java
@@ -18,12 +18,12 @@
  */
 package io.mifos.core.async.core;
 
-import io.mifos.core.api.util.UserContext;
-import io.mifos.core.api.util.UserContextHolder;
-import io.mifos.core.lang.TenantContextHolder;
 
 import java.util.Optional;
 import java.util.concurrent.Callable;
+import org.apache.fineract.cn.api.util.UserContext;
+import org.apache.fineract.cn.api.util.UserContextHolder;
+import org.apache.fineract.cn.lang.TenantContextHolder;
 
 @SuppressWarnings("OptionalUsedAsFieldOrParameterType")
 public class DelegatingContextCallable<V> implements Callable<V> {
diff --git a/src/main/java/io/mifos/core/async/core/DelegatingContextExecutor.java b/src/main/java/io/mifos/core/async/core/DelegatingContextExecutor.java
index 0267244..f82fc9d 100644
--- a/src/main/java/io/mifos/core/async/core/DelegatingContextExecutor.java
+++ b/src/main/java/io/mifos/core/async/core/DelegatingContextExecutor.java
@@ -18,9 +18,9 @@
  */
 package io.mifos.core.async.core;
 
-import io.mifos.core.api.util.UserContext;
-import io.mifos.core.api.util.UserContextHolder;
-import io.mifos.core.lang.TenantContextHolder;
+import org.apache.fineract.cn.api.util.UserContext;
+import org.apache.fineract.cn.api.util.UserContextHolder;
+import org.apache.fineract.cn.lang.TenantContextHolder;
 import org.springframework.core.task.AsyncTaskExecutor;
 import org.springframework.security.task.DelegatingSecurityContextAsyncTaskExecutor;
 
diff --git a/src/main/java/io/mifos/core/async/core/DelegatingContextRunnable.java b/src/main/java/io/mifos/core/async/core/DelegatingContextRunnable.java
index 6977120..14cf0fe 100644
--- a/src/main/java/io/mifos/core/async/core/DelegatingContextRunnable.java
+++ b/src/main/java/io/mifos/core/async/core/DelegatingContextRunnable.java
@@ -18,11 +18,11 @@
  */
 package io.mifos.core.async.core;
 
-import io.mifos.core.api.util.UserContext;
-import io.mifos.core.api.util.UserContextHolder;
-import io.mifos.core.lang.TenantContextHolder;
 
 import java.util.Optional;
+import org.apache.fineract.cn.api.util.UserContext;
+import org.apache.fineract.cn.api.util.UserContextHolder;
+import org.apache.fineract.cn.lang.TenantContextHolder;
 
 @SuppressWarnings("OptionalUsedAsFieldOrParameterType")
 public class DelegatingContextRunnable implements Runnable {


[fineract-cn-async] 15/33: Merge pull request #1 from myrle-krantz/develop

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit 19e93972f34335bb2e534ec5ee1be8294462a7a1
Merge: a28cd1e 3126ddb
Author: Myrle Krantz <my...@apache.org>
AuthorDate: Mon Feb 26 18:26:38 2018 +0100

    Merge pull request #1 from myrle-krantz/develop
    
    updating artifact ids to apache fineract from mifos io

 build.gradle | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)


[fineract-cn-async] 04/33: created DelegatingTenantContextExecutor to assure tenant inheritance for pooled threads

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit 2e4f5c3939720b530b9517e08ff9d4de4a24ad66
Author: mgeiss <mg...@mifos.org>
AuthorDate: Wed Apr 19 09:53:50 2017 +0200

    created DelegatingTenantContextExecutor to assure tenant inheritance for pooled threads
---
 build.gradle                                       |  4 +-
 .../config/AsyncProcessingJavaConfiguration.java   |  4 +-
 .../core/DelegatingTenantContextCallable.java      | 28 ++++++++++++
 .../core/DelegatingTenantContextExecutor.java      | 50 ++++++++++++++++++++++
 .../core/DelegatingTenantContextRunnable.java      | 26 +++++++++++
 5 files changed, 110 insertions(+), 2 deletions(-)

diff --git a/build.gradle b/build.gradle
index 59040c4..9fb26c5 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,6 +1,6 @@
 buildscript {
     repositories {
-        jcenter();
+        jcenter()
     }
     dependencies {
         classpath 'io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE'
@@ -15,6 +15,7 @@ group 'io.mifos.core'
 version '0.1.0-BUILD-SNAPSHOT'
 
 ext.versions = [
+        frameworklang        : '0.1.0-BUILD-SNAPSHOT',
         springcontext        : '4.3.3.RELEASE',
         springsecurity       : '4.2.2.RELEASE',
         springboot           : '1.4.1.RELEASE',
@@ -40,6 +41,7 @@ repositories {
 
 dependencies {
     compile(
+            [group: 'io.mifos.core', name: 'lang', version: versions.frameworklang],
             [group: 'org.springframework', name: 'spring-context', version: versions.springcontext],
             [group: 'org.springframework.security', name: 'spring-security-web', version: versions.springsecurity],
             [group: 'com.google.code.findbugs', name: 'jsr305', version: versions.findbugs]
diff --git a/src/main/java/io/mifos/core/async/config/AsyncProcessingJavaConfiguration.java b/src/main/java/io/mifos/core/async/config/AsyncProcessingJavaConfiguration.java
index 1b966c0..272f37f 100644
--- a/src/main/java/io/mifos/core/async/config/AsyncProcessingJavaConfiguration.java
+++ b/src/main/java/io/mifos/core/async/config/AsyncProcessingJavaConfiguration.java
@@ -15,6 +15,7 @@
  */
 package io.mifos.core.async.config;
 
+import io.mifos.core.async.core.DelegatingTenantContextExecutor;
 import io.mifos.core.async.util.AsyncConstants;
 import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
 import org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler;
@@ -53,7 +54,8 @@ public class AsyncProcessingJavaConfiguration
     executor.setThreadNamePrefix(
         this.env.getProperty(AsyncConstants.THREAD_NAME_PROP, AsyncConstants.THREAD_NAME_DEFAULT));
     executor.initialize();
-    return new DelegatingSecurityContextAsyncTaskExecutor(executor);
+
+    return new DelegatingTenantContextExecutor(new DelegatingSecurityContextAsyncTaskExecutor(executor));
   }
 
   @Override
diff --git a/src/main/java/io/mifos/core/async/core/DelegatingTenantContextCallable.java b/src/main/java/io/mifos/core/async/core/DelegatingTenantContextCallable.java
new file mode 100644
index 0000000..d473b24
--- /dev/null
+++ b/src/main/java/io/mifos/core/async/core/DelegatingTenantContextCallable.java
@@ -0,0 +1,28 @@
+package io.mifos.core.async.core;
+
+import io.mifos.core.lang.TenantContextHolder;
+
+import java.util.concurrent.Callable;
+
+public class DelegatingTenantContextCallable<V> implements Callable<V> {
+
+  private final Callable<V> delegate;
+  private final String tenantIdentifier;
+
+  DelegatingTenantContextCallable(final Callable<V> delegate, final String tenantIdentifier) {
+    super();
+    this.delegate = delegate;
+    this.tenantIdentifier = tenantIdentifier;
+  }
+
+  @Override
+  public V call() throws Exception {
+    try {
+      TenantContextHolder.clear();
+      TenantContextHolder.setIdentifier(this.tenantIdentifier);
+      return this.delegate.call();
+    } finally {
+      TenantContextHolder.clear();
+    }
+  }
+}
diff --git a/src/main/java/io/mifos/core/async/core/DelegatingTenantContextExecutor.java b/src/main/java/io/mifos/core/async/core/DelegatingTenantContextExecutor.java
new file mode 100644
index 0000000..67e6322
--- /dev/null
+++ b/src/main/java/io/mifos/core/async/core/DelegatingTenantContextExecutor.java
@@ -0,0 +1,50 @@
+package io.mifos.core.async.core;
+
+import io.mifos.core.lang.TenantContextHolder;
+import org.springframework.core.task.AsyncTaskExecutor;
+import org.springframework.security.task.DelegatingSecurityContextAsyncTaskExecutor;
+
+import java.util.concurrent.Callable;
+import java.util.concurrent.Future;
+
+public class DelegatingTenantContextExecutor implements AsyncTaskExecutor {
+
+  private final DelegatingSecurityContextAsyncTaskExecutor delegate;
+
+  public DelegatingTenantContextExecutor(final DelegatingSecurityContextAsyncTaskExecutor delegate) {
+    super();
+    this.delegate = delegate;
+  }
+
+  @Override
+  public void execute(final Runnable task, final long startTimeout) {
+    final Runnable taskWrapper = this.wrap(task);
+    this.delegate.execute(taskWrapper, startTimeout);
+  }
+
+  @Override
+  public Future<?> submit(final Runnable task) {
+    final Runnable taskWrapper = this.wrap(task);
+    return this.delegate.submit(taskWrapper);
+  }
+
+  @Override
+  public <T> Future<T> submit(final Callable<T> task) {
+    final Callable<T> taskWrapper = this.wrap(task);
+    return this.delegate.submit(taskWrapper);
+  }
+
+  @Override
+  public void execute(final Runnable task) {
+    final Runnable taskWrapper = this.wrap(task);
+    this.delegate.execute(taskWrapper);
+  }
+
+  private Runnable wrap(final Runnable task) {
+    return new DelegatingTenantContextRunnable(task, TenantContextHolder.checkedGetIdentifier());
+  }
+
+  private <T> Callable<T> wrap(final Callable<T> task) {
+    return new DelegatingTenantContextCallable<>(task, TenantContextHolder.checkedGetIdentifier());
+  }
+}
diff --git a/src/main/java/io/mifos/core/async/core/DelegatingTenantContextRunnable.java b/src/main/java/io/mifos/core/async/core/DelegatingTenantContextRunnable.java
new file mode 100644
index 0000000..e0471d1
--- /dev/null
+++ b/src/main/java/io/mifos/core/async/core/DelegatingTenantContextRunnable.java
@@ -0,0 +1,26 @@
+package io.mifos.core.async.core;
+
+import io.mifos.core.lang.TenantContextHolder;
+
+public class DelegatingTenantContextRunnable implements Runnable {
+
+  private final Runnable delegate;
+  private final String tenantIdentifier;
+
+  DelegatingTenantContextRunnable(final Runnable delegate, final String tenantIdentifier) {
+    super();
+    this.delegate = delegate;
+    this.tenantIdentifier = tenantIdentifier;
+  }
+
+  @Override
+  public void run() {
+    try {
+      TenantContextHolder.clear();
+      TenantContextHolder.setIdentifier(this.tenantIdentifier);
+      this.delegate.run();
+    } finally {
+      TenantContextHolder.clear();
+    }
+  }
+}


[fineract-cn-async] 18/33: Removed unused year and name variables

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit 7f3dcb4e6bc1e51a21b65f2c0fa86b02da83f487
Author: Isaac Kamga <u2...@gmail.com>
AuthorDate: Mon Mar 5 21:59:54 2018 +0100

    Removed unused year and name variables
---
 build.gradle | 2 --
 1 file changed, 2 deletions(-)

diff --git a/build.gradle b/build.gradle
index 04b42af..fa1f253 100644
--- a/build.gradle
+++ b/build.gradle
@@ -75,6 +75,4 @@ license {
     mapping {
         java = 'SLASHSTAR_STYLE'
     }
-    ext.year = Calendar.getInstance().get(Calendar.YEAR)
-    ext.name = 'The Apache Software Foundation'
 }


[fineract-cn-async] 05/33: Merge pull request #2 from mgeiss/develop

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit 0b71ce25b8268223f7b7b6eb8a424642d1450109
Merge: 723d58a 2e4f5c3
Author: Mark <cr...@users.noreply.github.com>
AuthorDate: Wed Apr 19 11:22:25 2017 +0200

    Merge pull request #2 from mgeiss/develop
    
    created DelegatingTenantContextExecutor to assure tenant inheritance …

 build.gradle                                       |  4 +-
 .../config/AsyncProcessingJavaConfiguration.java   |  4 +-
 .../core/DelegatingTenantContextCallable.java      | 28 ++++++++++++
 .../core/DelegatingTenantContextExecutor.java      | 50 ++++++++++++++++++++++
 .../core/DelegatingTenantContextRunnable.java      | 26 +++++++++++
 5 files changed, 110 insertions(+), 2 deletions(-)


[fineract-cn-async] 12/33: fixed possible NoSuchElementException when retrieving user context

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit 91d3ac16be246cc7c6b0e481d2e7d3635954a1be
Author: mgeiss <mg...@mifos.org>
AuthorDate: Fri Jun 16 11:28:57 2017 +0200

    fixed possible NoSuchElementException when retrieving user context
---
 .../core/async/core/DelegatingContextCallable.java | 26 ++++++++-----------
 .../core/async/core/DelegatingContextExecutor.java | 19 ++++++--------
 .../core/async/core/DelegatingContextRunnable.java | 29 +++++++++-------------
 3 files changed, 29 insertions(+), 45 deletions(-)

diff --git a/src/main/java/io/mifos/core/async/core/DelegatingContextCallable.java b/src/main/java/io/mifos/core/async/core/DelegatingContextCallable.java
index 2a7d050..9af1bf3 100644
--- a/src/main/java/io/mifos/core/async/core/DelegatingContextCallable.java
+++ b/src/main/java/io/mifos/core/async/core/DelegatingContextCallable.java
@@ -4,39 +4,33 @@ import io.mifos.core.api.util.UserContext;
 import io.mifos.core.api.util.UserContextHolder;
 import io.mifos.core.lang.TenantContextHolder;
 
+import java.util.Optional;
 import java.util.concurrent.Callable;
 
+@SuppressWarnings("OptionalUsedAsFieldOrParameterType")
 public class DelegatingContextCallable<V> implements Callable<V> {
 
   private final Callable<V> delegate;
-  private final String tenantIdentifier;
-  private final UserContext userContext;
-
-  DelegatingContextCallable(Callable<V> delegate) {
-    this.delegate = delegate;
-    this.tenantIdentifier = null;
-    this.userContext = null;
-  }
+  private final Optional<String> optionalTenantIdentifier;
+  private final Optional<UserContext> optionalUserContext;
 
   DelegatingContextCallable(final Callable<V> delegate, final String tenantIdentifier,
                             final UserContext userContext) {
     super();
     this.delegate = delegate;
-    this.tenantIdentifier = tenantIdentifier;
-    this.userContext = userContext;
+    this.optionalTenantIdentifier = Optional.ofNullable(tenantIdentifier);
+    this.optionalUserContext = Optional.ofNullable(userContext);
   }
 
   @Override
   public V call() throws Exception {
     try {
       TenantContextHolder.clear();
-      if(this.tenantIdentifier != null) {
-        TenantContextHolder.setIdentifier(this.tenantIdentifier);
-      }
+      optionalTenantIdentifier.ifPresent(TenantContextHolder::setIdentifier);
+
       UserContextHolder.clear();
-      if (this.userContext != null) {
-        UserContextHolder.setUserContext(this.userContext);
-      }
+      optionalUserContext.ifPresent(UserContextHolder::setUserContext);
+
       return this.delegate.call();
     } finally {
       TenantContextHolder.clear();
diff --git a/src/main/java/io/mifos/core/async/core/DelegatingContextExecutor.java b/src/main/java/io/mifos/core/async/core/DelegatingContextExecutor.java
index 316fc1b..2ea9f77 100644
--- a/src/main/java/io/mifos/core/async/core/DelegatingContextExecutor.java
+++ b/src/main/java/io/mifos/core/async/core/DelegatingContextExecutor.java
@@ -1,5 +1,6 @@
 package io.mifos.core.async.core;
 
+import io.mifos.core.api.util.UserContext;
 import io.mifos.core.api.util.UserContextHolder;
 import io.mifos.core.lang.TenantContextHolder;
 import org.springframework.core.task.AsyncTaskExecutor;
@@ -42,20 +43,14 @@ public class DelegatingContextExecutor implements AsyncTaskExecutor {
   }
 
   private Runnable wrap(final Runnable task) {
-    if(TenantContextHolder.identifier().isPresent()
-        || UserContextHolder.getUserContext().isPresent()) {
-      return new DelegatingContextRunnable(task, TenantContextHolder.checkedGetIdentifier(),
-          UserContextHolder.getUserContext().get());
-    }
-    return new DelegatingContextRunnable(task);
+    final String tenantIdentifier = TenantContextHolder.identifier().orElse(null);
+    final UserContext userContext = UserContextHolder.getUserContext().orElse(null);
+    return new DelegatingContextRunnable(task, tenantIdentifier, userContext);
   }
 
   private <T> Callable<T> wrap(final Callable<T> task) {
-    if(TenantContextHolder.identifier().isPresent()
-        || UserContextHolder.getUserContext().isPresent()) {
-      return new DelegatingContextCallable<>(task, TenantContextHolder.checkedGetIdentifier(),
-          UserContextHolder.getUserContext().get());
-    }
-    return new DelegatingContextCallable<>(task);
+    final String tenantIdentifier = TenantContextHolder.identifier().orElse(null);
+    final UserContext userContext = UserContextHolder.getUserContext().orElse(null);
+    return new DelegatingContextCallable<>(task, tenantIdentifier, userContext);
   }
 }
diff --git a/src/main/java/io/mifos/core/async/core/DelegatingContextRunnable.java b/src/main/java/io/mifos/core/async/core/DelegatingContextRunnable.java
index 51d0e34..ae5b620 100644
--- a/src/main/java/io/mifos/core/async/core/DelegatingContextRunnable.java
+++ b/src/main/java/io/mifos/core/async/core/DelegatingContextRunnable.java
@@ -4,41 +4,36 @@ import io.mifos.core.api.util.UserContext;
 import io.mifos.core.api.util.UserContextHolder;
 import io.mifos.core.lang.TenantContextHolder;
 
+import java.util.Optional;
+
+@SuppressWarnings("OptionalUsedAsFieldOrParameterType")
 public class DelegatingContextRunnable implements Runnable {
 
   private final Runnable delegate;
-  private final String tenantIdentifier;
-  private final UserContext userContext;
-
-  DelegatingContextRunnable(final Runnable delegate) {
-    this.delegate = delegate;
-    this.tenantIdentifier = null;
-    this.userContext = null;
-  }
+  private final Optional<String> optionalTenantIdentifier;
+  private final Optional<UserContext> optionalUserContext;
 
   DelegatingContextRunnable(final Runnable delegate, final String tenantIdentifier,
                             final UserContext userContext) {
     super();
     this.delegate = delegate;
-    this.tenantIdentifier = tenantIdentifier;
-    this.userContext = userContext;
+    this.optionalTenantIdentifier = Optional.ofNullable(tenantIdentifier);
+    this.optionalUserContext = Optional.ofNullable(userContext);
   }
 
   @Override
   public void run() {
     try {
       TenantContextHolder.clear();
-      if(this.tenantIdentifier != null) {
-        TenantContextHolder.setIdentifier(this.tenantIdentifier);
-      }
+      optionalTenantIdentifier.ifPresent(TenantContextHolder::setIdentifier);
+
       UserContextHolder.clear();
-      if (this.userContext != null) {
-        UserContextHolder.setUserContext(this.userContext);
-      }
+      optionalUserContext.ifPresent(UserContextHolder::setUserContext);
+
       this.delegate.run();
     } finally {
       TenantContextHolder.clear();
-      UserContextHolder.clear();;
+      UserContextHolder.clear();
     }
   }
 }


[fineract-cn-async] 27/33: FINCN-148 build with travis-ci.com and upload artifacts to Artifactory

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit d13e2e69e2d2f879b16cf23111f6eb73aab6534d
Author: Juhan Aasaru <Ju...@nortal.com>
AuthorDate: Thu Apr 25 11:47:48 2019 +0300

    FINCN-148 build with travis-ci.com and upload artifacts to Artifactory
---
 .travis.yml  | 30 +++++++++++++++++++++++++
 README.md    |  2 +-
 build.gradle | 20 ++++++++++++++++-
 travis.sh    | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 121 insertions(+), 2 deletions(-)

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..f2d2c5d
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,30 @@
+#
+# 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.
+#
+language: java
+sudo: false
+jdk:
+- openjdk8
+install: true
+script: "./travis.sh"
+env:
+  global:
+    - BUILD_SNAPSHOTS_BRANCH=develop
+    - ARTIFACTORY_URL=https://mifos.jfrog.io/mifos
+    - ARTIFACTORY_USER=travis-ci
+    - secure: "gv9hDpE7T7X8gSxQsvlKLzZMIw2dW2AFuZmdycMa6f0/QIMF6NRgQVCK8Yno/eUABrECmUAlkA6c+IvMSvQ2+OMZ9BJ63seT4AA3OJTmbwZbnNWXZ7WIogf62P+5jqeUs2ZWqLu3o9syH3/73JZeJ5g5wSIYnjap/afPYPy5e47cf06OZ6u4sr05TXAB20FDPx/FkazRp87GkkAOiMNCiDC7C/TzLQWJB+0VLk/+wtSFpEq8eQ7GA1LAIXS8207zePd+Xi+UmGAyvRR5WSI9Jf3s3E60EXP9qjTgSeXmjTmXp7IXoltYLFEqG7IN5d98XOufi4bqSlOh9w7FeTcmyBgzgyD1FcCiM/qIdllHOgf6/TSMnDfJIYQR85fDXmaNbXP2U6qBijOIO8hxOuQvI+bLF22brPnJWhtfXZ1w9DngAi0K4BPkYjSZz4Yjw5C2KOd/2mpMyyhdY+auy+WD8ajiWaRcx [...]
diff --git a/README.md b/README.md
index ec1b381..7d2bc6c 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# Apache Fineract CN Async
+# Apache Fineract CN Async [![Build Status](https://api.travis-ci.com/apache/fineract-cn-async.svg?branch=develop)](https://travis-ci.com/apache/fineract-cn-async)
 
 This contains the code necessary for asynchronous execution of commands with the correct user permissions.
 
diff --git a/build.gradle b/build.gradle
index 53a128b..513d42b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -27,6 +27,7 @@ buildscript {
 plugins {
     id 'com.github.hierynomus.license' version '0.13.1'
     id("org.nosphere.apache.rat") version "0.3.1"
+    id "com.jfrog.artifactory" version "4.9.5"
 }
 
 group 'org.apache.fineract.cn'
@@ -56,6 +57,7 @@ tasks.withType(JavaCompile) {
 repositories {
     jcenter()
     mavenLocal()
+    maven { url 'https://mifos.jfrog.io/mifos/libs-snapshot/' }
 }
 
 dependencies {
@@ -82,11 +84,27 @@ publishing {
             from components.java
             groupId project.group
             artifactId project.name
-            version project.version
+            version project.findProperty('externalVersion') ?: project.version
         }
     }
 }
 
+artifactory {
+    contextUrl = System.getenv("ARTIFACTORY_URL")
+    publish {
+        repository {
+            repoKey = project.findProperty('artifactoryRepoKey')
+            username = System.getenv("ARTIFACTORY_USER")
+            password = System.getenv("ARTIFACTORY_PASSWORD")
+        }
+
+        defaults {
+            publications ('asyncPublication')
+        }
+    }
+}
+artifactoryPublish.dependsOn('clean','publishToMavenLocal')
+
 license {
     header rootProject.file('HEADER')
     strictCheck true
diff --git a/travis.sh b/travis.sh
new file mode 100755
index 0000000..03a75ee
--- /dev/null
+++ b/travis.sh
@@ -0,0 +1,71 @@
+#!/usr/bin/env bash
+#
+# 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.
+#
+
+# Documentation: https://cwiki.apache.org/confluence/display/FINERACT/Fineract-CN+Artifactory
+
+#Exit immediately if a command exits with a non-zero status.
+set -e
+EXIT_STATUS=0
+
+# Builds and Publishes a SNAPSHOT
+function build_snapshot() {
+  echo -e "Building and publishing a snapshot out of branch [$TRAVIS_BRANCH]"
+  ./gradlew -PartifactoryRepoKey=libs-snapshot-local -DbuildInfo.build.number=${TRAVIS_COMMIT::7} artifactoryPublish --stacktrace || EXIT_STATUS=$?
+}
+
+# Builds a Pull Request
+function build_pullrequest() {
+  echo -e "Building pull request #$TRAVIS_PULL_REQUEST of branch [$TRAVIS_BRANCH]. Won't publish anything to Artifactory."
+  ./gradlew publishToMavenLocal rat || EXIT_STATUS=$?
+}
+
+# For other branches we need to add branch name as prefix
+function build_otherbranch() {
+  echo -e "Building a snapshot out of branch [$TRAVIS_BRANCH] and publishing it with prefix '${TRAVIS_BRANCH}-SNAPSHOT'"
+  ./gradlew -PartifactoryRepoKey=libs-snapshot-local -DbuildInfo.build.number=${TRAVIS_COMMIT::7} -PexternalVersion=${TRAVIS_BRANCH}-SNAPSHOT artifactoryPublish --stacktrace || EXIT_STATUS=$?
+}
+
+# Builds and Publishes a Tag
+function build_tag() {
+  echo -e "Building tag [$TRAVIS_TAG] and publishing it as a release"
+  ./gradlew -PartifactoryRepoKey=libs-release-local -PexternalVersion=$TRAVIS_TAG artifactoryPublish --stacktrace || EXIT_STATUS=$?
+
+}
+
+echo -e "TRAVIS_BRANCH=$TRAVIS_BRANCH"
+echo -e "TRAVIS_TAG=$TRAVIS_TAG"
+echo -e "TRAVIS_COMMIT=${TRAVIS_COMMIT::7}"
+echo -e "TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST"
+
+# Build Logic
+if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
+  build_pullrequest
+elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" != "$BUILD_SNAPSHOTS_BRANCH" ] && [ "$TRAVIS_TAG" == "" ]  ; then
+  build_otherbranch
+elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "$BUILD_SNAPSHOTS_BRANCH" ] && [ "$TRAVIS_TAG" == "" ] ; then
+  build_snapshot
+elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
+  build_tag
+else
+  echo -e "WARN: Unexpected env variable values => Branch [$TRAVIS_BRANCH], Tag [$TRAVIS_TAG], Pull Request [#$TRAVIS_PULL_REQUEST]"
+  ./gradlew clean build
+fi
+
+exit ${EXIT_STATUS}


[fineract-cn-async] 29/33: Adding rat report to After Failure procedure

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit 8223b36c7230c9f645127f97047d0d0d48d7ef91
Author: ebenezergraham <eg...@alustudent.com>
AuthorDate: Wed May 29 17:43:40 2019 +0400

    Adding rat report to After Failure procedure
---
 .travis.yml  |  3 +++
 build.gradle | 20 ++++++++++----------
 2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index f2d2c5d..6021f84 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -28,3 +28,6 @@ env:
     - ARTIFACTORY_URL=https://mifos.jfrog.io/mifos
     - ARTIFACTORY_USER=travis-ci
     - secure: "gv9hDpE7T7X8gSxQsvlKLzZMIw2dW2AFuZmdycMa6f0/QIMF6NRgQVCK8Yno/eUABrECmUAlkA6c+IvMSvQ2+OMZ9BJ63seT4AA3OJTmbwZbnNWXZ7WIogf62P+5jqeUs2ZWqLu3o9syH3/73JZeJ5g5wSIYnjap/afPYPy5e47cf06OZ6u4sr05TXAB20FDPx/FkazRp87GkkAOiMNCiDC7C/TzLQWJB+0VLk/+wtSFpEq8eQ7GA1LAIXS8207zePd+Xi+UmGAyvRR5WSI9Jf3s3E60EXP9qjTgSeXmjTmXp7IXoltYLFEqG7IN5d98XOufi4bqSlOh9w7FeTcmyBgzgyD1FcCiM/qIdllHOgf6/TSMnDfJIYQR85fDXmaNbXP2U6qBijOIO8hxOuQvI+bLF22brPnJWhtfXZ1w9DngAi0K4BPkYjSZz4Yjw5C2KOd/2mpMyyhdY+auy+WD8ajiWaRcx [...]
+after_failure:
+  - ./gradlew rat
+  - cat build/reports/rat/rat-report.txt
diff --git a/build.gradle b/build.gradle
index 513d42b..ccd2fe4 100644
--- a/build.gradle
+++ b/build.gradle
@@ -34,12 +34,12 @@ group 'org.apache.fineract.cn'
 version '0.1.0-BUILD-SNAPSHOT'
 
 ext.versions = [
-        frameworklang        : '0.1.0-BUILD-SNAPSHOT',
-        frameworkapi         : '0.1.0-BUILD-SNAPSHOT',
-        springcontext        : '4.3.3.RELEASE',
-        springsecurity       : '4.2.2.RELEASE',
-        springboot           : '1.4.1.RELEASE',
-        findbugs             : '3.0.1',
+        frameworklang : '0.1.0-BUILD-SNAPSHOT',
+        frameworkapi  : '0.1.0-BUILD-SNAPSHOT',
+        springcontext : '4.3.3.RELEASE',
+        springsecurity: '4.2.2.RELEASE',
+        springboot    : '1.4.1.RELEASE',
+        findbugs      : '3.0.1',
 ]
 
 apply plugin: 'java'
@@ -99,11 +99,11 @@ artifactory {
         }
 
         defaults {
-            publications ('asyncPublication')
+            publications('asyncPublication')
         }
     }
 }
-artifactoryPublish.dependsOn('clean','publishToMavenLocal')
+artifactoryPublish.dependsOn('clean', 'publishToMavenLocal')
 
 license {
     header rootProject.file('HEADER')
@@ -115,6 +115,6 @@ license {
 
 rat {
     // List of exclude directives, defaults to ['**/.gradle/**']
-    excludes = [ ".idea/**", ".gradle/**", "gradle/**", "build/**", "gradlew", "gradlew.bat", "README.md" ]
-
+    excludes = [".idea/**", ".gradle/**", "gradle/**", "build/**", "gradlew", "gradlew.bat", "README.md"]
+    plainOutput = true
 }


[fineract-cn-async] 13/33: Merge pull request #6 from mgeiss/develop

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit a28cd1ed14b3a70d0a5f3ccfba2710c6623bf0bf
Merge: cdcdf2a 91d3ac1
Author: Markus Geiß <ma...@apache.org>
AuthorDate: Fri Jun 16 11:29:37 2017 +0200

    Merge pull request #6 from mgeiss/develop
    
    fixed possible NoSuchElementException when retrieving user context

 .../core/async/core/DelegatingContextCallable.java | 26 ++++++++-----------
 .../core/async/core/DelegatingContextExecutor.java | 19 ++++++--------
 .../core/async/core/DelegatingContextRunnable.java | 29 +++++++++-------------
 3 files changed, 29 insertions(+), 45 deletions(-)


[fineract-cn-async] 03/33: Merge pull request #1 from mgeiss/develop

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit 723d58a90b52acfb04aa01a0dced52caaf9a6565
Merge: c445735 0e4bd4c
Author: Markus Geiß <ma...@apache.org>
AuthorDate: Wed Apr 12 07:56:07 2017 +0200

    Merge pull request #1 from mgeiss/develop
    
    added DelegatingSecurityContextAsyncTaskExecutor to delegate

 build.gradle                                                           | 2 ++
 .../io/mifos/core/async/config/AsyncProcessingJavaConfiguration.java   | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)


[fineract-cn-async] 20/33: Merge pull request #3 from Izakey/develop

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit b588f5e5c78a52939856bb8cb1974ea0dbc305bb
Merge: 5667a5e d232833
Author: Myrle Krantz <my...@apache.org>
AuthorDate: Fri Mar 16 11:43:04 2018 +0100

    Merge pull request #3 from Izakey/develop
    
    Removed unused year and name variables

 build.gradle | 2 --
 1 file changed, 2 deletions(-)


[fineract-cn-async] 14/33: updating artifact ids to apache fineract from mifos io

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit 3126ddb2d9f67cb25d90b1b362bdf9579361fe0b
Author: Myrle Krantz <my...@apache.org>
AuthorDate: Mon Feb 26 17:40:32 2018 +0100

    updating artifact ids to apache fineract from mifos io
---
 build.gradle | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/build.gradle b/build.gradle
index deb397d..d2fb6fc 100644
--- a/build.gradle
+++ b/build.gradle
@@ -11,7 +11,7 @@ plugins {
     id 'com.github.hierynomus.license' version '0.13.1'
 }
 
-group 'io.mifos.core'
+group 'org.apache.fineract.cn'
 version '0.1.0-BUILD-SNAPSHOT'
 
 ext.versions = [
@@ -42,8 +42,8 @@ repositories {
 
 dependencies {
     compile(
-            [group: 'io.mifos.core', name: 'lang', version: versions.frameworklang],
-            [group: 'io.mifos.core', name: 'api', version: versions.frameworkapi],
+            [group: 'org.apache.fineract.cn', name: 'lang', version: versions.frameworklang],
+            [group: 'org.apache.fineract.cn', name: 'api', version: versions.frameworkapi],
             [group: 'org.springframework', name: 'spring-context', version: versions.springcontext],
             [group: 'org.springframework.security', name: 'spring-security-web', version: versions.springsecurity],
             [group: 'com.google.code.findbugs', name: 'jsr305', version: versions.findbugs]
@@ -77,4 +77,4 @@ license {
     }
     ext.year = Calendar.getInstance().get(Calendar.YEAR)
     ext.name = 'The Mifos Initiative'
-}
\ No newline at end of file
+}


[fineract-cn-async] 22/33: Merge pull request #5 from myrle-krantz/develop

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit 0625c45e9bb5d701ab31d0ef8534b938a28549f9
Merge: b588f5e fc65778
Author: Myrle Krantz <my...@apache.org>
AuthorDate: Mon Apr 9 16:12:41 2018 +0200

    Merge pull request #5 from myrle-krantz/develop
    
    Adding rat checks.

 build.gradle    | 24 ++++++++++++++++++++++++
 settings.gradle | 17 +++++++++++++++++
 2 files changed, 41 insertions(+)


[fineract-cn-async] 32/33: FINCN-179 upgrade dependency management plugin version

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit 710daed05f5d6dbe8287a82811b6bf32ddb7d4ed
Author: Juhan Aasaru <Ju...@nortal.com>
AuthorDate: Tue Oct 1 09:11:54 2019 +0300

    FINCN-179 upgrade dependency management plugin version
---
 build.gradle | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/build.gradle b/build.gradle
index 7e64872..c54a472 100644
--- a/build.gradle
+++ b/build.gradle
@@ -20,7 +20,7 @@ buildscript {
         jcenter()
     }
     dependencies {
-        classpath 'io.spring.gradle:dependency-management-plugin:0.6.1.RELEASE'
+        classpath 'io.spring.gradle:dependency-management-plugin:1.0.8.RELEASE'
     }
 }
 
@@ -45,8 +45,6 @@ ext.versions = [
         findbugs      : '3.0.1',
 ]
 
-apply plugin: 'io.spring.dependency-management'
-
 tasks.withType(JavaCompile) {
     sourceCompatibility = JavaVersion.VERSION_1_8
     targetCompatibility = JavaVersion.VERSION_1_8


[fineract-cn-async] 07/33: Merge pull request #3 from crain/develop

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit 68b4f0c924b5791edd34ff1186291d4f0a347bf1
Merge: 0b71ce2 25dd7af
Author: Mark <cr...@users.noreply.github.com>
AuthorDate: Wed Apr 19 14:40:02 2017 +0200

    Merge pull request #3 from crain/develop
    
    Add null checks for tenant identifier

 .../mifos/core/async/core/DelegatingTenantContextCallable.java |  9 ++++++++-
 .../mifos/core/async/core/DelegatingTenantContextExecutor.java | 10 ++++++++--
 .../mifos/core/async/core/DelegatingTenantContextRunnable.java |  9 ++++++++-
 3 files changed, 24 insertions(+), 4 deletions(-)


[fineract-cn-async] 30/33: Merge pull request #8 from ebenezergraham/FINCN-157

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit 83f825c24970928b3b0aceb1b4ed8ae6b9454e79
Merge: 3aa86eb 8223b36
Author: Awasum Yannick <aw...@apache.org>
AuthorDate: Mon Jun 3 20:48:18 2019 +0100

    Merge pull request #8 from ebenezergraham/FINCN-157
    
    Adding rat report to After Failure procedure

 .travis.yml  |  3 +++
 build.gradle | 20 ++++++++++----------
 2 files changed, 13 insertions(+), 10 deletions(-)


[fineract-cn-async] 28/33: Merge pull request #7 from aasaru/artifactory

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit 3aa86ebb89fec22226a4d9b75ff944e30e51e0ba
Merge: 42680f3 d13e2e6
Author: Awasum Yannick <aw...@apache.org>
AuthorDate: Tue Apr 30 09:17:50 2019 +0100

    Merge pull request #7 from aasaru/artifactory
    
    FINCN-148 build with travis-ci.com and upload artifacts to Artifactory

 .travis.yml  | 30 +++++++++++++++++++++++++
 README.md    |  2 +-
 build.gradle | 20 ++++++++++++++++-
 travis.sh    | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 121 insertions(+), 2 deletions(-)


[fineract-cn-async] 08/33: Including source in published artifact. Makes debugging easier.

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit a237e811b54ae754693d45f393f98f116db3fd11
Author: myrle-krantz <mk...@mifos.org>
AuthorDate: Tue May 16 13:20:41 2017 +0200

    Including source in published artifact.  Makes debugging easier.
---
 build.gradle | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/build.gradle b/build.gradle
index 9fb26c5..6a14e06 100644
--- a/build.gradle
+++ b/build.gradle
@@ -52,6 +52,10 @@ dependencies {
     )
 }
 
+jar {
+    from sourceSets.main.allSource
+}
+
 publishing {
     publications {
         asyncPublication(MavenPublication) {


[fineract-cn-async] 17/33: Merge pull request #2 from Izakey/develop

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-async.git

commit 5667a5ed9188762a702ea25174f64172ffbb7442
Merge: 19e9397 07c0f48
Author: Myrle Krantz <my...@apache.org>
AuthorDate: Mon Mar 5 12:48:21 2018 +0100

    Merge pull request #2 from Izakey/develop
    
    Update copyright information

 HEADER                                             | 25 ++++++++++++----------
 NOTICE.txt                                         |  5 +++++
 README.md                                          |  4 ++--
 build.gradle                                       |  2 +-
 .../config/AsyncProcessingJavaConfiguration.java   | 25 ++++++++++++----------
 .../io/mifos/core/async/config/EnableAsync.java    | 25 ++++++++++++----------
 .../core/async/core/DelegatingContextCallable.java | 18 ++++++++++++++++
 .../core/async/core/DelegatingContextExecutor.java | 18 ++++++++++++++++
 .../core/async/core/DelegatingContextRunnable.java | 18 ++++++++++++++++
 .../io/mifos/core/async/util/AsyncConstants.java   | 25 ++++++++++++----------
 10 files changed, 118 insertions(+), 47 deletions(-)