[
https://issues.jboss.org/browse/JGRP-1871?page=com.atlassian.jira.plugin....
]
Paul Ferraro commented on JGRP-1871:
------------------------------------
"What's the time between creating the channel and calling connect() on it
?"
I mean new JChannel(...) vs channel.connect(...). In WildFly I have one service that
creates and closes a channel, and a child service that connects and disconnects a channel.
This way a single channel instance can be connected, disconnected, and reconnected
without having to destroy and recreate it. These 2 services are started by different
threads and are completely managed by WildFly's service container.
Given the right architecture, I'm sure that this could be reproduced fairly easily.
Traditionally, both Infinispan and JBoss AS will create and connect a channel in the same
thread. The separation of the two is unique to WF8.
My workaround, which so far seems to work, is here:
https://github.com/pferraro/wildfly/commit/99d18fffcae310dfc69c6d6abfe01f...
I'm relying on WF's ServiceContainer itself to perform synchronization of the
thread memory spaces. I haven't seen this issue in our CI jobs since this fix went
into place.
NPEs due to non-volatile Protocol variables
-------------------------------------------
Key: JGRP-1871
URL:
https://issues.jboss.org/browse/JGRP-1871
Project: JGroups
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 3.4.5, 3.5
Reporter: Paul Ferraro
Assignee: Paul Ferraro
In WildFly a given channel is created in one thread, but is potentially started in a
different thread. Unfortunately, many of the protocol variables that are set during
Protocol.init() are non-volatile. This can cause unexpected behavior as seen in
WFLY-3727.
To ensure clean initialization for multi-threaded environments like WF, all non-final
variables within every JGroups' Protocol should be volatile.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)