XMPP over JMS (or other transport mechanisms)

I need to implement XMPP over JMS (and perhaps other mechanisms later). Is this possible, and what would be a good approach?

I assume a modification is needed both in Smack and OpenFire, to change the transport mechanism.

Another solution may be some kind of proxy, which intercepts TCP/XMPP connections and forwards the packets onto JMS queues.

Any hints and suggestions are highly appreciated!