In 54 years I have been hit by bear only once and that yard was in town and not protected at all.
Now, I keep my few hives in total wilderness, (nobody around for miles) I do have a good bear fance - a permanent one.
That is: Thick wooden posts, cemented in the ground. Seven strands of barbed wire: Bottom one is live and about 4-5" from the ground and each additional one is about 10" above the previous one. From first one, live one, every second one is live!
So, if bear tries to push through, it will shock him good, cause he is well grounded - by more ways than one!
Around the fence, on the ground, I laid a 36' wide chicken wire and that is pegged to the ground with "tent pegs" but where there is rock - chicken wire is looped with a peace of copper wire and this cemented to the rock. All live wires are on two opposite corners wired together with insulated wire. Of course the insulation is striped off, where wires are connected/wrapped around fence wire.
The negative wires are also on two corners connected/wired together and than one end is stripped of insulation and threaded back and forth through the chicken wire on the ground. Thus the negative/grounding arrangement is foolproof!
(But grass should be regularly clipped under the fence that can't short out your fence!)
If clipping is too much of a chore, spread some Calcium, salt, vinegar or some other way prevent the grass from growing to the bottom wire - or any live wire for that matter.
There is of course a gate area, where barbed wire is connected to a spring-loaded plastic gate handles. By the gate is the fencer, which is mounted on the inside of a wooden post and covered to keep off the rain. Marine/RV batery is hidden in a small box whic resembles a nuc. One can house the batery in a normal hive. (to hide it from the thieves)
Live wires on the posts are of course mounted on insulators.
Some warning signs hung on all sides are a good idea maybe even a requirement in your parts?
If you have children about, it is a good idea that the negative wires be hung on the outside of the fence posts, live wires on the inside. (in case the kid gets stuck on a wire)
In such cases the wires should be arranged a bit closer together, say six inches apart, to prevent small rodents - like raccoons and skunks from crawling through.
This fence is powered by the biggest fencer you can find! 6000 to 7000 volts is good.
Now the contraversial part?!:
Most people, magazines, books and even supply houses will propagate baiting the fence wires?
Most bear experts and those of us who live in dense bear country, will tell you that that is not a smart thing to do.
I should mention that I live in perhaps the most saturated bear habitat in north America. We have here an estimated 200,000 bears?! They are as thick as black flies - (since our government banned the Spring hunt!?)
If you have a mind to bait the fence, that is your business? But I wouldn't!
If baiting is your thing, than one might as well forget the fence?
The idea here is: To build a fence that will keep the bear out! Now, why on earth would one want to advertise and even attract the bears to come? To feed on bacon or peanut butter?
By attracting the bear, to the fence, one is asking for trouble.
It is a proven fact that when a curious bear, who has his mind on a bait and nothing else, gets shocked - that in itself is a huge surprise for him?!
Cause he did not expect it?!
Such bear might just charge ahead, from surprise that he was caught with his guard down!
Not from pain -as most mistakenly think? Bears are very, very tough creatures and pain is to them almost unknown.
When bears are wounded (caused pain) they do not retreat like a chicken - they go in an immediate rage/attack mode and they will blindly attack everything around them... They will mercilessly trash, uproot and bite tear nearby trees apart, or whatever else stands up around them!
They will charge through the smooth wired fence, or plastic netting, like no-body's business!
Cause they have thick and long fur and smooth wire does them no harm. (That is why the idea arose to shock them in the mouth)
One needs barbed wire, which parts their thick fur and shocks them repeatedly in to retreat.
Bears also know very well, that the fence is energized and will stay clear. They will even passionately wait, until it dies, or for the time when beek forgets to turn it on. That is the time that they will strike.
Bears are very smart creatures, when left to their own devices. But fog up their mind with a few strips of bacon - they will throw all caution to the wind and will do their darndest to get to the food and consequently the food inside the enclosure.
They will come to the bait from far and wide?
Here, in Canada, they claim, that a bear will smell bacon grease, frying in a frying pan, for 15 miles?! Bears will congregate around and driven by hunger, curiosity and constant irritation by bacon bait and believe you me, bears are perhaps the smartest creatures in the woods, they will find the way to get to your hives just for simple reason that one has invited them. . .
If bacon (bait) was not there, they would not have a clue that something good is hidden there. Only the usual passers-by will go by on their daily - whatever is that they do?
(hundreds of bears from miles around will stay put in their own neck of the woods)
Don't forget that bears are also fiercely territorial and only one is the boss around your yard, all the other are trespassers and on edge (scared) that they will get caught. So, they have no time to mess around with something what is not theirs.
Another thing to do is: To Pee on at least 4 corners, or locations where you see trails, or seing that bear, or some other creature has been passing. Pee has to be from a man - woman's P is an attractant...
I had a bear marking his territory mere 10 feet from my hives on an oak tree right in my driveway. When I noticed this - claw marks on the trunk, I immediately grabbed a garden rake and marked the trunk about two feet higher. That tels the bear that I am bigger than him! Around the bottom I had Peed and this bear has immediately changed his daily patern. He realized that a bigger "bear" has claimed that spot and not wanting to chance a fight - he moved over.
Also important is your train of thought! When you walk around, have it in your mind that if damage is done, the bear will pay for his indiscretion. Animals poses an unique ability, ESP if you will, and will stay clear. . .
Another thing to get is a Critter-Gitter, an electronic device which, when something moves, it will emit loud chirping noises and blink red eyes. . .
It works. It scares two legged creatures too.
I had hand raised two bears and they, and others, walk by my hives several times daily. I had to cut down some trees this year, cause they were too close to the house and our dog refused to get down from the deck, from fear of them. (bear was hiding in the trees and enjoyed the sweet smells from the kitchen)
But the hives are still intact, touch wood. . . Even though the bear broke one corner post, this last summer... Which I will have to change next year.
If the fance is well constructed, with barbed wire, no bear will get through.
See some links, down bellow, to read words of wisdom from experts, cause I sense that mare words from an cantankerous old man have little meaning on this thread.
http://www.kencove.com/fence/76_Bear+Fence_resource.php
http://margosupplies.com/public/canadian1/bear_deterrents/critter_extra.htm
http://www.beebehavior.com/bee_yard_protection.php