Cannabis in a shoe tread weighing less than a grain of sugar, three poppy seeds on one's clothes from a bagel eaten at an airport, codeine in one's system prescribed for pain - these have lead to detention and/or up to four years in jail for travelers unfortunate enough to travel to Dubai's airport. Read more about this here.
Possession means jail - no intent required!
The message to foreigners is clear in my opinion - stay away. Don't let all of their buildings, golf tournaments and desire to be a world financial center fool you.
Send a message to Dubai and don't go there - Dubai should be about as likely to be on your travel list as Burma! And if you do go to Dubai - for goodness sakes don't eat poppy seeds for several months, in case you get a random drug screen.