Resonant dipole-dipole interaction in a cavity.