Enable the new configuration for testing

revert-70aa11f8
kamidu 7 years ago
parent 2505d4907a
commit 33b27234a0

@ -39,6 +39,7 @@
<PolicyConfiguration>
<monitoringClass>org.wso2.carbon.policy.mgt</monitoringClass>
<monitoringEnable>true</monitoringEnable>
<CacheEnable>true</CacheEnable>
<monitoringFrequency>60000</monitoringFrequency>
<maxRetries>5</maxRetries>
<minRetriesToMarkUnreachable>8</minRetriesToMarkUnreachable>

@ -49,6 +49,7 @@
<PolicyConfiguration>
<MonitoringClass>org.wso2.carbon.policy.mgt</MonitoringClass>
<MonitoringEnable>true</MonitoringEnable>
<CacheEnable>true</CacheEnable>
<MonitoringFrequency>60000</MonitoringFrequency>
<MaxRetries>5</MaxRetries>
<MinRetriesToMarkUnreachable>8</MinRetriesToMarkUnreachable>

@ -49,6 +49,7 @@
<PolicyConfiguration>
<MonitoringClass>org.wso2.carbon.policy.mgt</MonitoringClass>
<MonitoringEnable>true</MonitoringEnable>
<CacheEnable>true</CacheEnable>
<MonitoringFrequency>60000</MonitoringFrequency>
<MaxRetries>5</MaxRetries>
<MinRetriesToMarkUnreachable>8</MinRetriesToMarkUnreachable>

@ -54,6 +54,7 @@
<PolicyConfiguration>
<MonitoringClass>org.wso2.carbon.policy.mgt</MonitoringClass>
<MonitoringEnable>true</MonitoringEnable>
<CacheEnable>true</CacheEnable>
<MonitoringFrequency>60000</MonitoringFrequency>
<MaxRetries>5</MaxRetries>
<MinRetriesToMarkUnreachable>8</MinRetriesToMarkUnreachable>

@ -44,9 +44,6 @@ import org.wso2.carbon.device.mgt.core.service.GroupManagementProviderServiceImp
import org.wso2.carbon.policy.mgt.common.*;
import org.wso2.carbon.policy.mgt.core.cache.impl.PolicyCacheManagerImpl;
import org.wso2.carbon.policy.mgt.core.dao.*;
import org.wso2.carbon.policy.mgt.core.enforcement.PolicyDelegationException;
import org.wso2.carbon.policy.mgt.core.enforcement.PolicyEnforcementDelegator;
import org.wso2.carbon.policy.mgt.core.enforcement.PolicyEnforcementDelegatorImpl;
import org.wso2.carbon.policy.mgt.core.internal.PolicyManagementDataHolder;
import org.wso2.carbon.policy.mgt.core.mgt.PolicyManager;
import org.wso2.carbon.policy.mgt.core.mgt.ProfileManager;
@ -60,7 +57,6 @@ import java.util.*;
public class PolicyManagerImpl implements PolicyManager {
private PolicyDAO policyDAO;
private PolicyManager policyManager;
private ProfileDAO profileDAO;
private FeatureDAO featureDAO;
private ProfileManager profileManager;
@ -73,7 +69,6 @@ public class PolicyManagerImpl implements PolicyManager {
this.featureDAO = PolicyManagementDAOFactory.getFeatureDAO();
this.policyConfiguration = DeviceConfigurationManager.getInstance().getDeviceManagementConfig().getPolicyConfiguration();
this.profileManager = new ProfileManagerImpl();
this.policyManager = new PolicyManagerImpl();
}
@Override
@ -282,7 +277,7 @@ public class PolicyManagerImpl implements PolicyManager {
if (policyConfiguration.getCacheEnable()) {
existingPolicies = PolicyCacheManagerImpl.getInstance().getAllPolicies();
} else {
existingPolicies = policyManager.getPolicies();
existingPolicies = this.getPolicies();
}
PolicyManagementDAOFactory.beginTransaction();
bool = policyDAO.updatePolicyPriorities(policies);
@ -698,7 +693,7 @@ public class PolicyManagerImpl implements PolicyManager {
if (policyConfiguration.getCacheEnable()) {
tempPolicyList = PolicyCacheManagerImpl.getInstance().getAllPolicies();
} else {
tempPolicyList = policyManager.getPolicies();
tempPolicyList = this.getPolicies();
}
for (Policy policy : tempPolicyList) {
@ -723,7 +718,7 @@ public class PolicyManagerImpl implements PolicyManager {
if (policyConfiguration.getCacheEnable()) {
allPolicies = PolicyCacheManagerImpl.getInstance().getAllPolicies();
} else {
allPolicies = policyManager.getPolicies();
allPolicies = this.getPolicies();
}
for (Policy policy : allPolicies) {
@ -770,7 +765,7 @@ public class PolicyManagerImpl implements PolicyManager {
if (policyConfiguration.getCacheEnable()) {
tempPolicyList = PolicyCacheManagerImpl.getInstance().getAllPolicies();
} else {
tempPolicyList = policyManager.getPolicies();
tempPolicyList = this.getPolicies();
}
for (Policy policy : tempPolicyList) {
@ -805,7 +800,7 @@ public class PolicyManagerImpl implements PolicyManager {
if (policyConfiguration.getCacheEnable()) {
tempPolicyList = PolicyCacheManagerImpl.getInstance().getAllPolicies();
} else {
tempPolicyList = policyManager.getPolicies();
tempPolicyList = this.getPolicies();
}
for (Policy policy : tempPolicyList) {

@ -39,6 +39,7 @@
<PolicyConfiguration>
<monitoringClass>org.wso2.carbon.policy.mgt</monitoringClass>
<monitoringEnable>true</monitoringEnable>
<CacheEnable>true</CacheEnable>
<monitoringFrequency>60000</monitoringFrequency>
<maxRetries>5</maxRetries>
<minRetriesToMarkUnreachable>8</minRetriesToMarkUnreachable>

@ -54,6 +54,7 @@
<PolicyConfiguration>
<MonitoringClass>org.wso2.carbon.policy.mgt</MonitoringClass>
<MonitoringEnable>true</MonitoringEnable>
<CacheEnable>true</CacheEnable>
<MonitoringFrequency>60000</MonitoringFrequency>
<MaxRetries>5</MaxRetries>
<MinRetriesToMarkUnreachable>8</MinRetriesToMarkUnreachable>

Loading…
Cancel
Save