1998 honda crv. awd. standard shift

my passanger side front cv shaft has alot of play in it, where it goes into the transmission. i replaced the cv shaft but it is still has play in it and it pops out of place even after i made sure it locked into the transmission. is my transmission bad or is it a bearing or is my cv shaft bad?