My daugher had several guinea pigs, and when they would whistle, I swear it was a borzoi magnet. I always made sure our guinea pigs were up out of harms way, and actually letting him sniff the cage just made it worse.
I used the ignore method with my dogs. I had two at the time, and getting near the cage was off limits. The guinea pigs were happier and I had less of a worry on a accident...
It is normal for a smaller animal to be worried about a dog or cat. And nooooo- they never reallllly accept them up to a certain point. I would worry more about " that one time" then the rest.
Place the hamster high enough to not be in head height of him. It will keep him calmer ( the hamster) and the dog as well.