Java Thread Security.