Not sure if this has been covered, but several 04 model TJs with the 4.0 had a bad camshaft that has been replaced under warranty.
I took my Jeep in to get the blower resister replaced under warranty, and asked about that specific issue, although I'm experiencing no engine problems at this time. Apparently, DCX was able to identify the Jeeps affected by the bum shafts and if you own one, you should receive a recall notice.
Mine was not on the list.
If you own an '04, and haven't already done this, visit jeep.com and enter your VIN to check for recalls. It's something that should be done regularly, anyway, especially if you are not the original owner.