Inject GslbServiceProvider using @Inject fails in oss build, as it requires an

implemenation by default to autowire but only implementation avaialable
is in nonoss plugin. So using autowired required=false for injecting
GslbServiceProvider that will work with both oss and non-oss builds.
This commit is contained in:
Murali Reddy 2013-03-28 16:10:54 +05:30
parent d437cb6dac
commit f8b8f60977
1 changed files with 3 additions and 2 deletions

View File

@ -44,6 +44,7 @@ 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;
@ -79,8 +80,8 @@ public class GlobalLoadBalancingRulesServiceImpl implements GlobalLoadBalancingR
IPAddressDao _ipAddressDao;
@Inject
AgentManager _agentMgr;
protected GslbServiceProvider _gslbProvider = null;
@Autowired(required=false)
protected GslbServiceProvider _gslbProvider;
@Override