closeVirtualHostIfExist();
getConfigurationStore().upgradeStoreStructure();
getEventLogger().message(getConfigurationStoreLogSubject(), ConfigStoreMessages.RECOVERY_START());
VirtualHostStoreUpgraderAndRecoverer upgraderAndRecoverer = new VirtualHostStoreUpgraderAndRecoverer(this);
upgraderAndRecoverer.perform(getConfigurationStore());
getEventLogger().message(getConfigurationStoreLogSubject(), ConfigStoreMessages.RECOVERY_COMPLETE());
VirtualHost<?,?,?> host = getVirtualHost();
if (host == null)
{
if (LOGGER.isDebugEnabled())
{
LOGGER.debug("Creating new virtualhost with name : " + getGroupName());
}
ConfiguredObjectRecord[] initialRecords = getInitialRecords();
if(initialRecords != null && initialRecords.length > 0)
{
getConfigurationStore().update(true, initialRecords);
getEventLogger().message(getConfigurationStoreLogSubject(), ConfigStoreMessages.RECOVERY_START());
upgraderAndRecoverer = new VirtualHostStoreUpgraderAndRecoverer(this);
upgraderAndRecoverer.perform(getConfigurationStore());
getEventLogger().message(getConfigurationStoreLogSubject(), ConfigStoreMessages.RECOVERY_COMPLETE());
setAttribute(VIRTUALHOST_INITIAL_CONFIGURATION, getVirtualHostInitialConfiguration(), "{}" );
host = getVirtualHost();
if(host != null)
{