Military members who have a problem with a change in policy to allow gays to serve openly may find themselves looking for a new job, Adm. Mike Mullen, chairman of the Joint Chiefs of Staff, warned Thursday.

Mullen told a Senate Armed Services Committee hearing that the military is based on meritocracy, "what you do, not who you are." He said if Congress changes the don't ask, don't tell policy then the U.S. military will comply.

And if some people have a problem with that, they may not want to join the service.

"Should repeal occur, some soldiers and Marines may want separate shower facilities. Some may ask for different berthing. Some may even quit the service," Mullen said. "We'll deal with that."

Mullen added that "there is no gray area" in the debate when it comes to standards of conduct in the military.

"We treat each other with respect or we find another place to work. Period," he said.

Mullen, Defense Secretary Robert Gates, Gen. Cater F. Ham, commanding general of U.S. Army Europe, and Pentagon chief counsel Jeh Johnson spoke at the hearing to review the military's recent study on overturning the 17-year ban on openly gay individuals serving in the U.S. Armed Forces.

They argued that not moving quickly leaves the U.S. military to the mercy of U.S. courts that may order a repeal of the policy before the Defense Department can act on its own toward implementing an orderly transition.

"If the law changes, the United States military can do this, even in a time of war," said Ham, who helped lead the working group that conducted the 10-month long study on the impact of openly gay members serving alongside straight troops.

"I do not underestimate the challenges in changing the law, but neither do I underestimate the willingness and capability" of U.S. forces to adapt to change, Ham said.

According to the survey, 67 percent of Marines and nearly 58 percent of Army soldiers in combat units say repeal of don't ask, don't tell would have negative consequences on unit cohesion in the field or at sea.

But Sen. John McCain, R-Ariz., one of the biggest critics of changing current policy, noted that the study of U.S. troops found that combat forces were much more concerned about serving alongside gay members than the military population as a whole and as many as 32 percent of Marines said they would leave the service earlier than planned rather than remain alongside gay troops.

"These views should not be considered lightly, especially considering how much combat our force is facing. Additionally, I am concerned about the impact of a rush to repeal when even this survey has found that such a significant number of our service members feel that it would negatively impact military effectiveness," he said.

McCain added that argument that those opposed to changing the policy are just too young and immature to know what they're saying, trivialize members' ability to think for themselves.

"I think men and women are able to make a choice if they want to fight and die (for the U.S.), I think they're mature enough to make a call on who they are comfortable serving with," he said.

Gates responded that while any loss of troops, particularly those in the field, is "potentially of concern for the force as a whole, I don't think any of us would expect that the numbers would be anything like the survey suggests, just based on experience. Plus you have the reality that they can't just up and leave."

Sen. Joe Lieberman, D-Conn., added that the policy itself had resulted in loss of soldiers -- because thousands had been tossed out for admitting they are gay and because would-be gay service members have been deterred by the policy from signing up for duty.

Mullen, who claimed he worked alongside gay service members through his entire career, said combat units who are most opposed to having gays serve openly in the military could lead the way in a smooth transition to a policy switch.

Saying he expects less turbulence, "even in the combat arms world," than some would predict, Mullen added, "In fact, it may be the combat arms community that proves the most effective at managing this change, disciplined as they are. It's not only because our young ones are more tolerant. It's because they've got far more important things to worry about."

Mullen said that U.S. military members are already working on the battlefield with NATO forces from countries where being gay is not a disqualification from service.

"I don't recall a single instance where the fact that one of them might be openly gay ever led to poor performance on the field," he said. "Gay or straight, their troops patrolled with ours and bled with ours."

McCain said he's not "saying this law should never change. I am simply saying that it may be premature to make such a change at this time and in this manner, without further consideration of this report and further study of the issue by Congress."