If the cockpit door is secured, how is an attacker supposed to get in, and if he did rush the door if it was opened for other reasons, how would the pilot manage to get a gun out of his clothing/holster fast enough to do something useful with it? It also lets the hijacker know where the weapons are on the aircraft - if the captain comes out into the main cabin to visit the toilet, does he keep his gun with him or leave it with the copilot?
I don't expect full details of security measures to be given in a public forum, but there seems to be a lot of holes to address before it's even a vaguely sensible idea. I guess it comes down to the concept of whether the pilot's job is to fly the plane or be its security guard.