Got it to work finally.
I removed ejb-jar.xml completely and left the sun-ejb-jar.xml untouched. Then I annotated the class foo.QueueListenerMDB as follows:
@MessageDriven(name = "QueueListener", mappedName = "QueueListener")
public class QueueListenerMDB implements MessageListener {
...
}