I had a 9hr stay in Abu Dhabi and I got a transit visa on the spot for no charge. I was back 2hrs before my flight comfortably and even got some shut eye before my flight.
I haven't been to the airport in Dubai but at the airport in Abu Dhabi they had smoking rooms all around with TV's and...