There's no perfect way to play the hand, but it seems to me that you could have thought ahead more before you raised. For starters, how likely did you think it was that he'd fold given the pot odds
you set for him? Assuming that the probability he'd fold was quite small, his other options were calling to take a flop in position and shoving. Had you thought about what you'd do in these cases?
If he called, you'd miss the flop most of the time. Were you planning to check-fold? If so, it can be argued that you'd be better to check pre- and to see the flop for free. If you were going to cbet after missing, then why give him such pot odds
to call pre-, especially since his stack size after calling your raise pre- is shove or fold? And with your stack, could you cbet then fold to a shove?
Also, it's easy if you flop and A. You're going to get it all in if he's willing. But half the time you hit the flop, you'll hit your J. Then what?
As for what to do in the actual situation where he limp-shoved, his stack was right in the range for this. So, you should have known if you were going to call before you raised. And if you were going to call, then why not shove preemptively?