* @throws NamingException if the factory cannot be bound
*/
private static void bind(Context context, ConnectionFactoryType factory,
Class implementation, Map properties)
throws NamingException {
JmsConnectionFactory instance = null;
if (factory instanceof ConnectionFactory
|| factory instanceof QueueConnectionFactory
|| factory instanceof TopicConnectionFactory) {
instance = new JmsConnectionFactory(implementation.getName(),
properties, null);
} else if (factory instanceof XAConnectionFactory
|| factory instanceof XAQueueConnectionFactory
|| factory instanceof XATopicConnectionFactory) {
instance = new JmsXAConnectionFactory(