im going to assume your the Q Q?
if not you played it fine got your money in way ahead and had no fold
equity in the slightest
If your the J J, maybe played it slightly badly but the result would of been the same, he raised it pre, and hes got no fold equity, so no matter what hes getting it all in by the river, since hes only person that is left to act should of been a shove
but as i said not sure which player you are lol and cant see anybody being able to get away from that result regardless