[
https://issues.jboss.org/browse/JGRP-1871?page=com.atlassian.jira.plugin....
]
Paul Ferraro commented on JGRP-1871:
------------------------------------
That said, it may be worth addressing this anyway. It one were to make runtime
modifications to a given protocol property, unless that property is volatile, or some
other memory synchronization is in place, its visibility to other threads is not
guaranteed by the java memory model.
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)