{
AbstractTreeNode node = (AbstractTreeNode) component;
if (node instanceof ConnectionFactoryTreeNode)
{
ContextTreeNode ctxNode = (ContextTreeNode) node.getParent();
ConnectionFactoryTreeNode cfNode = (ConnectionFactoryTreeNode) node;
String binding = getAbsoluteBinding(cfNode);
Class clazz = null;
if (cfNode.getBean() instanceof QueueConnectionFactory && cfNode.getBean() instanceof TopicConnectionFactory)
{
clazz = JNDIConnectionFactory.class;
}
else if (cfNode.getBean() instanceof QueueConnectionFactory)
{
clazz = JNDIQueueConnectionFactory.class;
}
else
{
clazz = JNDITopicConnectionFactory.class;
}
FactoryConfig factoryConfig = HermesBrowser.getConfigDAO().createJNDIFactoryConfig(ctxNode.getConfig().getClasspathId(), "S:" + System.currentTimeMillis()
+ ":" + node.getId(), binding, ctxNode.getConfig().getProperties(), clazz.getName());
rval.add(factoryConfig);
}
}
}