I agree with the others, the barrel won't get hot enough to melt the solder.
I repaired a gun for a friend using a 96% tin, 4% silver solder, which has a higher strength than lead based solders. It hasn't come off since. I got this from Brownells. It melts a little under 500F and is easy to use.
Hope this helps,
Andy