We had the same problem with our son at the exact same age.
We talked to Timmy about it with the teachers, and the teachers agreed that if you feel the urge to hug anyone, find a teacher! The teachers were also given "written" permission to hug Timmy when they thought he was getting close to the urge.......since teachers arn't suppose to hug kids.
For Timmy, it was an outlet for some cooped up energy.
I would also like to think that that raised our kids in a loving, family environment!