I think the ConnectionFactoryUnwrapper class introduced in #39816 may fail if pooled-jms.jar is missing from the classpath. I'm not sure if that's a common setup or not, but we should probably guard against it.

Comment From: philwebb

I wonder if we should also use SingleConnectionFactory as the cast check rather than CachingConnectionFactory.

Comment From: philwebb

It turns out things are fine because of the try/catch block.