Ulcers can be transmitted by salvia too, usually, most of us would have got it by the time we are adults from sharing of spoons or kissing. Usually stress and weakening of the immune system is can cause an outbreak of ulcers.
Use mouth rinse, clean your teeth more often. There are a lot of germs and bacteria in our mouth. Hopes that helps. In the mean time, try not to kiss too much!
Drink more water and have some good rest