mirror of https://github.com/apache/archiva.git
this optimisation was very crappy in fact so remove it: too much synchronization were needed
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1447476 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
95f86b2fe2
commit
907ffd42d8
archiva-modules/archiva-base/archiva-repository-admin
archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans
archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime
|
@ -118,10 +118,6 @@ public class RedbackRuntimeConfiguration
|
|||
|
||||
public List<PropertyEntry> getConfigurationPropertiesEntries()
|
||||
{
|
||||
if ( configurationPropertiesEntries != null )
|
||||
{
|
||||
return configurationPropertiesEntries;
|
||||
}
|
||||
configurationPropertiesEntries = new ArrayList<PropertyEntry>( getConfigurationProperties().size() );
|
||||
for ( Map.Entry<String, String> entry : getConfigurationProperties().entrySet() )
|
||||
{
|
||||
|
|
|
@ -55,7 +55,7 @@ import java.util.Set;
|
|||
*/
|
||||
@Service( "userConfiguration#archiva" )
|
||||
public class DefaultRedbackRuntimeConfigurationAdmin
|
||||
implements RedbackRuntimeConfigurationAdmin, UserConfiguration, ConfigurationListener
|
||||
implements RedbackRuntimeConfigurationAdmin, UserConfiguration
|
||||
{
|
||||
|
||||
protected Logger log = LoggerFactory.getLogger( getClass() );
|
||||
|
@ -71,8 +71,6 @@ public class DefaultRedbackRuntimeConfigurationAdmin
|
|||
@Named( value = "cache#users" )
|
||||
private Cache usersCache;
|
||||
|
||||
private volatile RedbackRuntimeConfiguration currentRedbackRuntimeConfiguration;
|
||||
|
||||
@PostConstruct
|
||||
public void initialize()
|
||||
throws UserConfigurationException
|
||||
|
@ -221,8 +219,6 @@ public class DefaultRedbackRuntimeConfigurationAdmin
|
|||
updateRedbackRuntimeConfiguration( redbackRuntimeConfiguration );
|
||||
}
|
||||
|
||||
this.currentRedbackRuntimeConfiguration = redbackRuntimeConfiguration;
|
||||
|
||||
}
|
||||
catch ( RepositoryAdminException e )
|
||||
{
|
||||
|
@ -232,7 +228,7 @@ public class DefaultRedbackRuntimeConfigurationAdmin
|
|||
|
||||
public RedbackRuntimeConfiguration getRedbackRuntimeConfiguration()
|
||||
{
|
||||
return build( archivaConfiguration.getConfiguration().getRedbackRuntimeConfiguration(), false );
|
||||
return build( archivaConfiguration.getConfiguration().getRedbackRuntimeConfiguration() );
|
||||
}
|
||||
|
||||
public void updateRedbackRuntimeConfiguration( RedbackRuntimeConfiguration redbackRuntimeConfiguration )
|
||||
|
@ -245,7 +241,6 @@ public class DefaultRedbackRuntimeConfigurationAdmin
|
|||
try
|
||||
{
|
||||
archivaConfiguration.save( configuration );
|
||||
this.currentRedbackRuntimeConfiguration = redbackRuntimeConfiguration;
|
||||
}
|
||||
catch ( RegistryException e )
|
||||
{
|
||||
|
@ -258,12 +253,8 @@ public class DefaultRedbackRuntimeConfigurationAdmin
|
|||
}
|
||||
|
||||
private RedbackRuntimeConfiguration build(
|
||||
org.apache.archiva.configuration.RedbackRuntimeConfiguration runtimeConfiguration, boolean force )
|
||||
org.apache.archiva.configuration.RedbackRuntimeConfiguration runtimeConfiguration )
|
||||
{
|
||||
if ( this.currentRedbackRuntimeConfiguration != null && !force )
|
||||
{
|
||||
return this.currentRedbackRuntimeConfiguration;
|
||||
}
|
||||
RedbackRuntimeConfiguration redbackRuntimeConfiguration =
|
||||
new BeanReplicator().replicateBean( runtimeConfiguration, RedbackRuntimeConfiguration.class );
|
||||
|
||||
|
@ -294,8 +285,6 @@ public class DefaultRedbackRuntimeConfigurationAdmin
|
|||
|
||||
cleanupProperties( redbackRuntimeConfiguration );
|
||||
|
||||
this.currentRedbackRuntimeConfiguration = redbackRuntimeConfiguration;
|
||||
|
||||
return redbackRuntimeConfiguration;
|
||||
}
|
||||
|
||||
|
@ -629,8 +618,5 @@ public class DefaultRedbackRuntimeConfigurationAdmin
|
|||
return keysSet;
|
||||
}
|
||||
|
||||
public void configurationEvent( ConfigurationEvent event )
|
||||
{
|
||||
build( archivaConfiguration.getConfiguration().getRedbackRuntimeConfiguration(), true );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue