About three years ago my wife and I and another couple were camping up by BWCA and while my buddy and I were a few miles away giving our .45's a workout, apparently a very good size black bear (he was actually cinammon colored ... afterwards we saw the posted warning at the boat launch) attacked our campsites ... mostly mine ... ate pretty much everything except some fat-free chips and some rice cakes (for the wife).
We got back to find the women and kids locked in his Sunfire (we had the keys and all the guns). We immediately scrounged what little ammo we had left and went looking around. Then, I noticed I was missing a cooler ... we found it about 50 yards away after about 20 minutes of looking.
I kept my LW Combat Commander with me the rest of the day and into the night around the campfire.
While sitting around the campfire, another bear started trying to run off with one of my coolers. I immediately shot over his head. We were on kind of a half-peninsula and the bear couldn't figure out how to get away. After several more rounds and a little bushwacking, he finally got his bearings and took off like a shot (no pun intended).
I didn't know much about bears at the time ... I only presumed that they were supposed to be afraid of me, and, when they weren't, I tried to convince them and, maybe, got lucky. I never once considered actually firing to hit them.
Incidentally, while my buddy and I were gone, others in the campground tried bangin pots and pans and an air-horn with absolutely no effect. If a bear's used to getting free easy grub, it's my, limited, experience that nothing will deter him short of a very loud bang.
I believe the situation could have been much worse had either bear been a sow with a cub.
I don't go into the woods with an overwhelming fear of bears (blacks, anyhow), but, I feel very safe these days with my Glock 20 around.
In the rare event that you actually get a bear givin' ya trouble, I would expect that a .22 would be fine as your first move should be to fire a warning shot, or two, or three ... go ahead and terrorize him ... put the fear of God into him, as it were. However, .45ACP, and even moreso, .357 are going to be more effective due to the louder bang. And, in case the bear isn't as easily persuaded as mine was, I'd be ok with .357 ... moreso in an 8-shot, but, given the odds, I wouldn't bother with a new gun (I can't believe I just said that). As always, it helps if you can actually hit what you're aimin' at with the gun you carry. Which is why I carry my Glock 20 and not my 629 or Anaconda.
Also, of all the food in my coolers and some bread in another bin, the big one still sniffed out an unopened package of 4 nutter-butters in my wife's backpack laying on the ground and tore it open right where they were. In case you haven't heard it before, don't keep food in your tent or in your car (if you like your paint job and windows).
Hope this helps.