Have you taken him to a Pediatric Urologist? It could be that he has bladder/bowel incontinence and doesn't realize he has to go or is going. Before you start thinking it just a bad habit with him, I would first make sure it isn't medical. I belong to a group that has a lot of children with this issue and they have all been diagnosed with Spina Bifida Occulta and/or Tethered Cord Syndrome. This defect affects the bladder/bowel nerves and these children do not know any better.
I would be happy to give you more information on these subjects if you are interested.
The bigger the issue you make out of him NOT using the potty, the more some children tend to rebel against it. Try some positive reinforcements (not candy!)....
I know it may sound rather silly, but when I toilet trained my children I made up a rather silly "pee pee dance" and showed them my extreme happiness and praise when they 'went'.....
If your son goes on the potty once and has 6 accidents, only praise the one time he got it right....
Please try not to give him 'negative' feedback when he makes a mistake, but always give the positive reinforcement for doing something good!
Good luck! It will happen....My son was much harder to train than my daughter was..
T.