This patch is wrong.
It should be constructing the InitialContext from the
JMSProviderAdapterJNDI activation config property when using JBoss's jms rar.
In the event of a thirdparty jms rar, you've got no clue what to do.
If there is both a local jms and a remote jms (or a thirdparty jms)
you could actually get the wrong result if the destination exists locally
of a different type to the one that should be used in the remote or thirdparty jms.
The correct place for this patch is
org.jboss.resource.adapter.jms.inflow.JmsActivation, i.e. rework how
setUpDestination() does things and remove the reliance on
JmsActivationSpec.isTopic() from setUpConnection()
Coupled with removal of destiantionType as a mandatory activation config property
from the ra.xml