JGRP-1893 for master

Address thread safety issues discussed in JGRP-1893