If you assume the ???userService??? is transactional, we???re on a database that spans multiple methods, and that the user ID must be unique, the above pseudo-code should fail as we???re trying to create two users with the same ID. If, however, there was a transaction wrapping both methods, and that transaction was rolled back, we???d be fine.