[WFLY-1982] use synchronized