Should the barrel being discarded when hit - Bang
As you can see in this answer on BGG, the barrel stays until it is removed by another card.

Also, from the official rules: 


  Blue-bordered cards are played face up in front of  you  (exception: Jail).  Blue  cards  in  front  of you are hence defined to be “in play”. The effect of  these  cards  lasts  until  they  are  discarded  or removed somehow (e.g. through the play of a Cat Balou), or a special event occurs (e.g. in the case of Dynamite). There is no limit  on  the  cards  you  can  have  in  front  of  you  provided  that  they  do  not share the same name.


The Barrel is a blue card. So you can use it as long as it is on your side of the table.