Outside the Dublin tenement that is the setting for Sean O'Casey's "The Shadow of a Gunman," the heroic fight for Irish independence is raging. But inside, not a hero is stirring -- only dunces, drunks and dreamers, and they are beside themselves with fear. O'Casey was never charitable toward his countrymen, but he did write with lusty vigor and raucous poetry about their cowardly and superstitious natures.

There is perhaps more color in "Gunman" than is seeping through the revival that opened Tuesday night for a three-week run at Olney Theatre, but on the whole this is a competent production of a work that is trickier than it may seem. The predominant tone is comical, and "Gunman" could almost qualify as a farce if a British soldier didn't come rapping at the door in the second act, bringing with him a strong charge of melodrama.

Boastful cowards have always been a mainstay of farce, from Roman times on down. But in O'Casey's brawling world, they run the risk of more than a beating from the master. Death is the punishment, and it's lurking out there in the streets, just waiting to pounce. Farce this may be, but it is farce perched on a time bomb.

The shabby room in question is inhabited by Seumas Shields (Raymond Hardie), a shiftless peddler, whose head is as full of braggadocio as his suitcase is of spoons and hairpins; and by Donal Davoren (Jarlath Conroy), an impoverished poet who consoles himself with the singular loftiness of his role in society as he pecks out romantic verse -- not unlike Shelley's, but not as good -- on a rickety typewriter. Drifting in and out are various specimens of Dublin low life -- the cantankerous landlord, residents from across the hall, and a flirty young woman, who excites herself with the notion that the poor poet is, in fact, a secret gunman for the Irish Republican Army.

The casual drift of bodies is what there is in the way of plot. And the talk, focused on the petty affairs and grievances of daily life, assiduously avoids the subject on everyone's minds: the terror just outside the door. When the characters do discuss the prospects of a free Ireland, it is with an inflated pomp that collapses quicker than a punctured tire at the mere echo of gunfire. Therein lies the comedy. One moment, O'Casey's creatures are cocky with confidence; the next, they are diving under the bedclothes. Director James Waring clearly relishes the contradiction.

Olney's cast is a bit uneven and not yet an ensemble, although a few more performances ought to take care of that. What the production does have is two solid actors in the central roles, and a splendid actress, Brigid Cleary, as the next-door doxy who will pay the price for everyone else's lily heart.

From the repeated jutting of his chin and the precise strut he uses to pick his way across the room, it would appear that Hardie has taken the rooster as his role model. The performance is full of cock-a-doodle preening, even though Hardie is dressed most of the time in a pair of dingy long johns. The false bravura makes the inevitable moments of abject apology doubly effective; you are apt to find this poltroon more touching than you'd suspect from initial appearances.

Conroy's spindly poet, by contrast, is less flamboyant, preoccupied with the rhymes taking shape in his reveries, although there's a certain slyness in the tilt of his head when he contemplates the passing circus. And when Cleary's doxy drops by for a cup of milk and a little flirtation, you can see the glimmers of male vanity in his eyes. If the poet thinks himself a bit superior to the common throng, Conroy removes the curse by making him a bit self-conscious as well.

Among the supporting players, Cleary is a vivid incarnation of the not-so-pretty girl trying to look good for the world. The actress gets the vulgarity just right, but she also gets the timidity and the gallantry. And, as a neighboring souse, Terrence Currier takes drunkenness to the point that he appears to be reeling on a storm-tossed ship. The performance, however, never goes overboard.

The others are not quite so sharply delineated, but they do no grave damage to O'Casey's text. "Shadow of a Gunman" still pulsates with vitality. These characters are clinging furiously to life, even if they give the distinct impression they are clinging to mother's skirts. SHADOW OF A GUNMAN. By Sean O'Casey. Directed by James D. Waring. Sets and lighting, James D. Waring; costumes, Harriet L. Weil. With Jarlath Conroy, Raymond Hardie, Terrence Currier, Paddy Croft, Brigid Cleary, Michael Rothhaar, Nancy Linehan. At Olney Theatre through Sept. 19.