ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject incubator-ignite git commit: # GG-10385 fix message filter init
Date Mon, 01 Jun 2015 15:03:31 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-gg-10385 c2326312d -> 8dc885955


# GG-10385 fix message filter init


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/8dc88595
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/8dc88595
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/8dc88595

Branch: refs/heads/ignite-gg-10385
Commit: 8dc8859553c3263324cb21ad2a21cf94ecdd1187
Parents: c232631
Author: ptupitsyn <ptupitsyn@gridgain.com>
Authored: Mon Jun 1 17:59:10 2015 +0300
Committer: ptupitsyn <ptupitsyn@gridgain.com>
Committed: Mon Jun 1 17:59:10 2015 +0300

----------------------------------------------------------------------
 .../internal/managers/communication/GridIoManager.java  | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8dc88595/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
index c877d57..6e8d457 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
@@ -1211,6 +1211,11 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
     public void addUserMessageListener(@Nullable final Object topic, @Nullable final IgniteBiPredicate<UUID,
?> p) {
         if (p != null) {
             try {
+                if (p instanceof GridLifecycleAwareMessageFilter)
+                    ((GridLifecycleAwareMessageFilter)p).initialize(ctx);
+                else
+                    ctx.resource().injectGeneric(p);
+
                 addMessageListener(TOPIC_COMM_USER,
                     new GridUserMessageListener(topic, (IgniteBiPredicate<UUID, Object>)p));
             }
@@ -1695,13 +1700,6 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
             throws IgniteCheckedException {
             this.topic = topic;
             this.predLsnr = predLsnr;
-
-            if (predLsnr != null) {
-                if (predLsnr instanceof GridLifecycleAwareMessageFilter)
-                    ((GridLifecycleAwareMessageFilter)predLsnr).initialize(ctx);
-                else
-                    ctx.resource().injectGeneric(predLsnr);
-            }
         }
 
         /** {@inheritDoc} */


Mime
View raw message