Entomologist Dopers: A Hymenoptera Question

Okay, the stinger of wasps, bees and some ants is a modified ovipositor. Does it still act as an ovipositor in the queens of bees and ants and in wasps (since wasps don’t actually have a large sterile class like bees and ants do)? If not, how do queen bees and ants and female wasps lay eggs?

It does in honeybees; I don’t know about the others but I assume it must.