Jim Webb's tantrum as he flounced off the job of secretary of the Navy last week was not altogether becoming. But Webb is a hard-nosed ex-Marine, decorated for valor in Vietnam, fiercely loyal to the Navy. And resignations in a fit of pique as a way of protesting policy sometimes serve useful purposes.

Webb's is a case in point. He should be thanked, not spanked, and never mind the intemperance of his suggestion that his boss, Secretary of Defense Frank Carlucci, was not only playing politics by insisting on cuts in the Navy's budget but also sorely lacking in leadership. Carlucci, after all, was merely passing along White House orders to trim the defense budget as part of a bipartisan, across-the-board effort to deal with the problem of restoring solvency at home and American economic power abroad.

A week earlier, in a speech to the National Press Club, Webb seemed to understand Carlucci's problem. ''National resources, changes in world economic structure, recent political changes and the improved capabilities of many of our allies,'' he said, ''dictate that we must, perhaps for the first time since the late 1940s, seriously debate the posture of the U.S. military around the world, and the roles and missions assigned to our military services.''

Precisely so. It could hardly have been said better by any of a number of scholars, defense experts in Congress and former officials with experience in national security affairs who have already joined a developing debate over the proper U.S. role in today's world. It is in this sense that Webb's loud leap overboard may have done a greater service than any he was able to render in his troubled eight-month tour as secretary.

Now, it is true that Webb, in encouraging a wide-ranging debate, had not the slightest doubt how it should come out -- in favor of demanding more from our allies and of a shift in U.S. emphasis from Europe to Asia and to the Pacific Basin (a natural habitat for a navy). In the same Press Club speech, he sketched a strategy for defense and deterrence that would give our naval forces a predominant if not decisive role -- ready to strike back, not necessarily at the point of a Soviet attack but wherever an opportunity presented itself for use of naval power.

''It would seem illogical to reduce the size of our sea services at the very moment in history when they should be assuming an even greater role in our international security posture,'' he said, ''unless our leaders wish to consciously acknowledge that we will be unable to meet the contingencies of the future.''

Right there Webb creeps up to -- but falls short of -- the central question in the debate: When we review our military strength in relation to our economic resources, should we not also reassess the ''contingencies'' that have to be taken into account -- the commitments, roles and missions that we have undertaken? Even Carlucci doesn't sound ready for that -- ''I'm not sure which part of the world we'd give up.''

But the question of commitments is increasingly the focus of the rethinking and reappraising now under way. It is a major theme in a much-talked-about new book, ''The Rise and Fall of the Great Powers,'' by military historian Paul Kennedy.

The argument in his book, as Kennedy paraphrased it on the MacNeil/Lehrer Newshour the other night, is that you have to ''balance {commitments} against your economic and productive base.'' The next administration, he argues, will have to develop an ''integrated, long-term strategy which is not just a military policy. It's to do with. . . burden-sharing with allies and a consideration of prudent measures to withdraw American commitments overseas.'' The alternative, he says, is ''trying to be strong all over the globe and instead being weak all over the globe.''

Webb would go at it just the opposite way, understandably; for six years his predecessor, John Lehman, had been the relentless Horatio Hornblower of an arbitrary, round-numbered ''600-ship Navy''; all other considerations -- resources, the needs of other services, contrary strategic concepts -- were incidental to this sacred goal. Given that legacy, his own mind-set and the predictable budgetary constraints, Webb was bound to lose -- to Congress if not to Carlucci.

The damage to the Navy (a cutback of 16 frigates while still short of the magic 600 figure) will be minimal. This is all the more so when you consider the compensating contribution even so modest a triumph of reason over dogma could make to constructive debate in Congress, in the presidential campaign and in the policy-making of the next presidency.