I think there should be a military-wide referendum posing these two questions:
1) would feel comfortable serving alongside with gays
2) do you want gays serving in the military
If 50+% say yes to question 2, case closed, no restrictions for gays.
If not, but 20% say no to question 2 then there should be no gays in military whatsoever.
The military is no place to exercise your rights. Everyone in the military makes sacrifices, some ultimate ones. Those people give a lot. The society should return a favor and make it more comfortable for them, not less. This is NOT an issue about gays, this is a matter of a well being of military personnel and, in turn, a matter of national security, the only opinion that should matter is of those who serve.