actually this looks like a bug.
There's no relation between javax.jms.ConnectionFactory and
javax.jms.XAConnectionFactory... casting between them is not safe.
this seems to be a irregularity in the spec, as XAQueueConnectionFactory
does extend ConnectionFactory, via QueueConnectionFactory...
james