removing @Autowired, which is not JSR complaint.

initializing the bean 'GlobalLoadBalancingRulesServiceImpl' through the componentContext.xml
This commit is contained in:
Murali Reddy 2013-03-29 14:02:57 +05:30
parent 6a7156ad9a
commit b585fa11c1
3 changed files with 11 additions and 5 deletions

View File

@ -333,4 +333,6 @@
<bean id="ClassicalPrimaryDataStoreProvider" class="org.apache.cloudstack.storage.datastore.provider.CloudStackPrimaryDataStoreProviderImpl">
</bean>
<bean id="GlobalLoadBalancingRulesServiceImpl" class ="org.apache.cloudstack.region.gslb.GlobalLoadBalancingRulesServiceImpl" />
</beans>

View File

@ -47,6 +47,11 @@
</property>
</bean>
<bean id="GlobalLoadBalancingRulesServiceImpl" class ="org.apache.cloudstack.region.gslb.GlobalLoadBalancingRulesServiceImpl" >
<property name="GslbServiceProvider">
<ref bean="Netscaler"/>
</property>
</bean>
<bean id ="AccountManagerImpl" class="com.cloud.user.AccountManagerImpl">
<property name="UserAuthenticators">
<list>

View File

@ -44,8 +44,6 @@ import org.apache.cloudstack.api.command.user.region.ha.gslb.*;
import org.apache.cloudstack.region.Region;
import org.apache.cloudstack.region.dao.RegionDao;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.ejb.Local;
import javax.inject.Inject;
@ -54,7 +52,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Component
@Local(value = {GlobalLoadBalancingRulesService.class})
public class GlobalLoadBalancingRulesServiceImpl implements GlobalLoadBalancingRulesService {
@ -80,9 +77,11 @@ public class GlobalLoadBalancingRulesServiceImpl implements GlobalLoadBalancingR
IPAddressDao _ipAddressDao;
@Inject
AgentManager _agentMgr;
@Autowired(required=false)
protected GslbServiceProvider _gslbProvider;
protected GslbServiceProvider _gslbProvider=null;
public void setGslbServiceProvider(GslbServiceProvider provider) {
this._gslbProvider = provider;
}
@Override
@DB