The real issue is:
Country X is traditionally and primarily of X culture. They have their bars, their customs, their dirty hand gestures and so forth. Suddenly, People Y start moving in in large number, legally or otherwise (it really doesn't make too much difference). Suddenly, its not a matter of Culture X and Culture Y existing side by side, but Culture Y is actually supplanting Culture X as the primary national culture.
Like I said, Canada is pretty much unique in the world since its national identity has been defined for almost 50 years by diversity. Its not so much a matter of hating foreign people, as preffering "your people" to any other, which I think is fine.
However, I forsee this becoming less and less of an issue, since the younger generations identify less and less with national idenity in the face of the global village and all that crap. In a hundred years, my guess is that people will think of themselves merely as human, instead of Chinese or Jamaican or whatever.,