Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)

57489: Merged V4.2-BUG-FIX (4.2.1) to HEAD-BUG-FIX (Cloud/4.3)
      57321: Merged V4.2.0 (4.2) to V4.2-BUG-FIX (4.2.1)
         57219: Fix for     ALF-20360 (MNT-9858) Alfresco with wcm web project not started if enabled index.recovery.mode=FULL


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@61831 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2014-02-11 20:53:59 +00:00
parent ff22f0b9b5
commit 9ae4e47b50
3 changed files with 50 additions and 4 deletions

View File

@@ -1104,7 +1104,7 @@
</property> </property>
</bean> </bean>
<bean id="lucene" class="org.alfresco.repo.management.subsystems.ChildApplicationContextFactory" parent="abstractPropertyBackedBean"> <bean id="lucene" class="org.alfresco.repo.management.subsystems.LuceneChildApplicationContextFactory" parent="abstractPropertyBackedBean">
<property name="autoStart"> <property name="autoStart">
<value>false</value> <value>false</value>
</property> </property>

View File

@@ -293,7 +293,7 @@ public class ChildApplicationContextFactory extends AbstractPropertyBackedBean i
@Override @Override
protected PropertyBackedBeanState createInitialState() throws IOException protected PropertyBackedBeanState createInitialState() throws IOException
{ {
return new ApplicationContextState(); return new ApplicationContextState(false);
} }
/* /*
@@ -565,7 +565,8 @@ public class ChildApplicationContextFactory extends AbstractPropertyBackedBean i
*/ */
protected class ApplicationContextState implements PropertyBackedBeanState protected class ApplicationContextState implements PropertyBackedBeanState
{ {
private boolean allowInitAccess = false;
/** The properties to be used in placeholder expansion. */ /** The properties to be used in placeholder expansion. */
private Properties properties; private Properties properties;
@@ -584,8 +585,9 @@ public class ChildApplicationContextFactory extends AbstractPropertyBackedBean i
* @throws IOException * @throws IOException
* Signals that an I/O exception has occurred. * Signals that an I/O exception has occurred.
*/ */
protected ApplicationContextState() throws IOException protected ApplicationContextState(boolean allowInitAccess ) throws IOException
{ {
this.allowInitAccess = allowInitAccess;
// Load the property defaults // Load the property defaults
PropertiesFactoryBean factory = new PropertiesFactoryBean(); PropertiesFactoryBean factory = new PropertiesFactoryBean();
factory.setPropertiesPersister(getPersister()); factory.setPropertiesPersister(getPersister());
@@ -800,6 +802,10 @@ public class ChildApplicationContextFactory extends AbstractPropertyBackedBean i
try try
{ {
if(allowInitAccess)
{
this.applicationContext = applicationContext;
}
applicationContext.refresh(); applicationContext.refresh();
this.applicationContext = applicationContext; this.applicationContext = applicationContext;
ChildApplicationContextFactory.logger.info("Startup of '" + getCategory() + "' subsystem, ID: " ChildApplicationContextFactory.logger.info("Startup of '" + getCategory() + "' subsystem, ID: "

View File

@@ -0,0 +1,40 @@
/*
* Copyright (C) 2005-2013 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.repo.management.subsystems;
import java.io.IOException;
/**
* @author Andy
*
*/
public class LuceneChildApplicationContextFactory extends ChildApplicationContextFactory
{
/* (non-Javadoc)
* @see org.alfresco.repo.management.subsystems.ChildApplicationContextFactory#createInitialState()
*/
@Override
protected PropertyBackedBeanState createInitialState() throws IOException
{
return new ApplicationContextState(true);
}
}