Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 604AD200CA3 for ; Thu, 1 Jun 2017 17:10:52 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5EC85160BB5; Thu, 1 Jun 2017 15:10:52 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A67A2160BC4 for ; Thu, 1 Jun 2017 17:10:51 +0200 (CEST) Received: (qmail 36019 invoked by uid 500); 1 Jun 2017 15:10:50 -0000 Mailing-List: contact commits-help@openwebbeans.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openwebbeans.apache.org Delivered-To: mailing list commits@openwebbeans.apache.org Received: (qmail 36008 invoked by uid 99); 1 Jun 2017 15:10:50 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Jun 2017 15:10:50 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 0E9F13A0354 for ; Thu, 1 Jun 2017 15:10:50 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1797231 - in /openwebbeans/trunk: webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java webbeans-tck/testng-dev.xml Date: Thu, 01 Jun 2017 15:10:50 -0000 To: commits@openwebbeans.apache.org From: rmannibucau@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20170601151050.0E9F13A0354@svn01-us-west.apache.org> archived-at: Thu, 01 Jun 2017 15:10:52 -0000 Author: rmannibucau Date: Thu Jun 1 15:10:49 2017 New Revision: 1797231 URL: http://svn.apache.org/viewvc?rev=1797231&view=rev Log: making back async event async Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java openwebbeans/trunk/webbeans-tck/testng-dev.xml Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java?rev=1797231&r1=1797230&r2=1797231&view=diff ============================================================================== --- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java (original) +++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java Thu Jun 1 15:10:49 2017 @@ -40,6 +40,7 @@ import java.util.concurrent.ConcurrentHa import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.concurrent.ForkJoinPool; import java.util.stream.Stream; import javax.enterprise.context.RequestScoped; @@ -799,15 +800,17 @@ public final class NotificationManager NotificationOptions notificationOptions) { CompletableFuture future = new CompletableFuture<>(); - try - { - runAsync(event, metadata, observer); - future.complete(null); - } - catch (final WebBeansException wbe) - { - future.completeExceptionally(wbe.getCause()); - } + CompletableFuture.runAsync(() -> { + try + { + runAsync(event, metadata, observer); + future.complete(null); + } + catch (final WebBeansException wbe) + { + future.completeExceptionally(wbe.getCause()); + } + }, notificationOptions.getExecutor() == null ? ForkJoinPool.commonPool() : notificationOptions.getExecutor()); return future; } Modified: openwebbeans/trunk/webbeans-tck/testng-dev.xml URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tck/testng-dev.xml?rev=1797231&r1=1797230&r2=1797231&view=diff ============================================================================== --- openwebbeans/trunk/webbeans-tck/testng-dev.xml (original) +++ openwebbeans/trunk/webbeans-tck/testng-dev.xml Thu Jun 1 15:10:49 2017 @@ -18,7 +18,7 @@ - +