{
try
{
currentSessionId = sessionId;
FactoryConfig factoryConfig = getFactoryConfigBySessionId(sessionId);
if (factoryConfig == null)
{
factoryConfig = HermesBrowser.getConfigDAO().createDefaultFactoryConfig(sessionId);
factoryConfig.getDestination().addAll(destinationConfigPanel.getDestinations());
sessionToFactoryMap.put(sessionId, factoryConfig);
newFactories.add(factoryConfig);
setDirty();
}
connectionFactoryConfigPanel.setFactoryConfig(model, factoryConfig);
destinationConfigPanel.setFactoryConfig(factoryConfig);
connectionConfigPanel.setConnectionConfig((ConnectionConfig) factoryConfig.getConnection().get(0));
sessionConfigPanel.setSessionConfig((SessionConfig) connectionConfigPanel.getConnectionConfig().getSession().get(0));
if (model.isDisplayFactoryAdmin() && adminConfigPanel != null)
{
adminConfigPanel.setConfig(factoryConfig.getClasspathId(), factoryConfig.getExtension());
}
}
catch (Throwable ex)
{
cat.error(ex.getMessage(), ex);