TRUNK-3181

I have changed setUserContext method to make it thread safe.