Do not hammer on the rod the impact could explode the powder.
Won't happen, can't happen. Smokeless powder will not ignite from a "blow". Smokeless powder, unlike black powder, is a flammable solid, it is not in any way explosive. That a material is explosive has to do with the rate of speed a shock wave travels through it. Smokeless powder burns, plain and simple. While it can burn very fast and can even mimick an explosion (witness the common pipe bomb and burst barrels) it is not a true explosive and will not ignite from being hit.
The primer on the other hand is a true explosive and all caution should be taken to insure that the primer is not struck or hit, nor comes into a heavy, sharp contact with anything.
An explosive is used in the primer as a true explosive will ignite from a striking blow such as that provided from the firing pin. On exploding, the component of the primer creates/erupts a flame which ignites the powder. the primer creates as much as 5000 psi of energy, and it is because of this that primers should not be substituted willy nilly nce a load has been developed.
I would suggest that your first remove the barrel from the frame, hold it over but not against several folded towels, and strike the cleaning rod smartly with a mallet untill the case is dislodged. Do this outdoors and keep your head clear of the bore. If you wish, place the towels in the bottom of a 5 gallon metal (NOT PLASTIC) bucket as you perform this task, being sure to keep the breech lowered into the bucket but not in contact with the towels.
I'm sure at this point in time you probably feel a bit foolish, but in future remember that a case that a corroded case can be quite dangerous. It may well be that this experience is safer than a ruptured case on firing. Military ammo is rejected for this reason. There is no qualifier for an acceptable amount of corrosion, any is cause for rejection. They don't do this to spend our tax dollars, they do it because of saftey reasons. Bad enough to have folks shooting at you. Worse to have your own ammunition failing on you at the moment of need. The cost of a bit of brass is never so great as to risk one's saftey
OK, I'm off my soap box now. Be careful, good luck. Hope I said all that well and didn't unnessicarily hurt any feelings.