instance = new JmsConnectionFactory(implementation.getName(),
properties, null);
} else if (factory instanceof XAConnectionFactory
|| factory instanceof XAQueueConnectionFactory
|| factory instanceof XATopicConnectionFactory) {
instance = new JmsXAConnectionFactory(
implementation.getName(), properties);
} else {
throw new IllegalArgumentException(
"Unknown connection factory type: " +
factory.getClass().getName());