AVMNodeService now points at AVMLockingAwareService.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6023 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park 2007-06-19 19:03:10 +00:00
parent d8050806af
commit 63680c700f
5 changed files with 30 additions and 21 deletions

View File

@ -67,6 +67,9 @@
<ref bean="layerIssuer" />
</list>
</property>
<property name="avmLockingAwareService">
<ref bean="avmLockingAwareService"/>
</property>
</bean>
<!-- Bootstrap AVM Locking Service. -->

View File

@ -73,7 +73,7 @@
<ref bean="dictionaryService"/>
</property>
<property name="avmService">
<ref bean="avmService"/>
<ref bean="avmLockingAwareService"/>
</property>
<property name="policyComponent">
<ref bean="policyComponent"/>

View File

@ -751,15 +751,8 @@
<!-- The AVMLockingAwareService -->
<bean id="avmLockingAwareService" class="org.alfresco.repo.avm.AVMLockingAwareService">
<property name="avmService">
<ref bean="avmService"/>
</property>
<property name="avmLockingService">
<ref bean="avmLockingService"/>
</property>
<property name="authenticationService">
<ref bean="authenticationService"/>
</property>
<!-- Because of circular dependendencies, this bean's dependencies
are grabbed at bootstrap time. -->
</bean>
<bean id="AVMLockingAwareService" class="org.springframework.aop.framework.ProxyFactoryBean">

View File

@ -49,12 +49,15 @@ import org.alfresco.service.cmr.repository.ContentWriter;
import org.alfresco.service.cmr.security.AuthenticationService;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.Pair;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
/**
* An AVMLockingService aware implemantation of AVMService.
* @author britt
*/
public class AVMLockingAwareService implements AVMService
public class AVMLockingAwareService implements AVMService, ApplicationContextAware
{
private AVMService fService;
@ -62,23 +65,25 @@ public class AVMLockingAwareService implements AVMService
private AuthenticationService fAuthenticationService;
private ApplicationContext fContext;
public AVMLockingAwareService()
{
}
public void setAvmService(AVMService service)
/* (non-Javadoc)
* @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
*/
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
{
fService = service;
fContext = applicationContext;
}
public void setAvmLockingService(AVMLockingService service)
public void init()
{
fLockingService = service;
}
public void setAuthenticationService(AuthenticationService service)
{
fAuthenticationService = service;
fService = (AVMService)fContext.getBean("avmService");
fLockingService = (AVMLockingService)fContext.getBean("avmLockingService");
fAuthenticationService = (AuthenticationService)fContext.getBean("authenticationService");
}
/* (non-Javadoc)

View File

@ -44,11 +44,18 @@ public class AvmBootstrap extends AbstractLifecycleBean
{
private List<Issuer> issuers;
private AVMLockingAwareService avmLockingAwareService;
public AvmBootstrap()
{
issuers = new ArrayList<Issuer>(0);
}
public void setAvmLockingAwareService(AVMLockingAwareService service)
{
avmLockingAwareService = service;
}
/**
* Provide a list of {@link Issuer issuers} to bootstrap on context initialization.
*
@ -69,6 +76,7 @@ public class AvmBootstrap extends AbstractLifecycleBean
{
issuer.initialize();
}
avmLockingAwareService.init();
}
/** NO-OP */