PL-8867 ClusterManager implementation class is used directly by other platform beans

This commit is contained in:
Konstantin Krivopustov 2017-03-31 15:44:31 +04:00
parent 5af93fc75f
commit fe0e212115
4 changed files with 7 additions and 8 deletions

View File

@ -20,7 +20,6 @@ package com.haulmont.cuba.core.app.scheduling;
import com.haulmont.cuba.core.EntityManager;
import com.haulmont.cuba.core.Persistence;
import com.haulmont.cuba.core.Transaction;
import com.haulmont.cuba.core.app.ClusterManager;
import com.haulmont.cuba.core.app.MiddlewareStatisticsAccumulator;
import com.haulmont.cuba.core.app.ServerConfig;
import com.haulmont.cuba.core.app.ServerInfoAPI;

View File

@ -20,7 +20,7 @@ package com.haulmont.cuba.core.sys.entitycache;
import com.haulmont.bali.util.ReflectionHelper;
import com.haulmont.chile.core.model.MetaClass;
import com.haulmont.cuba.core.app.ClusterListenerAdapter;
import com.haulmont.cuba.core.app.ClusterManager;
import com.haulmont.cuba.core.app.ClusterManagerAPI;
import com.haulmont.cuba.core.global.AppBeans;
import com.haulmont.cuba.core.global.Metadata;
import org.eclipse.persistence.internal.helper.Helper;
@ -37,9 +37,9 @@ public class EntityCacheConnection extends BroadcastRemoteConnection {
protected Metadata metadata;
protected QueryCacheManager queryCacheManager;
protected ClusterManager clusterManager;
protected ClusterManagerAPI clusterManager;
public EntityCacheConnection(RemoteCommandManager rcm, ClusterManager clusterManager) {
public EntityCacheConnection(RemoteCommandManager rcm, ClusterManagerAPI clusterManager) {
super(rcm);
this.metadata = AppBeans.get(Metadata.NAME);
this.queryCacheManager = AppBeans.get(QueryCacheManager.NAME);

View File

@ -17,7 +17,7 @@
package com.haulmont.cuba.core.sys.entitycache;
import com.haulmont.cuba.core.app.ClusterManager;
import com.haulmont.cuba.core.app.ClusterManagerAPI;
import com.haulmont.cuba.core.global.AppBeans;
import org.eclipse.persistence.exceptions.RemoteCommandManagerException;
import org.eclipse.persistence.internal.sessions.coordination.RemoteConnection;
@ -37,7 +37,7 @@ public class EntityCacheTransportManager extends BroadcastTransportManager {
protected EntityCacheConnection createConnection() throws RemoteCommandManagerException {
try {
ClusterManager clusterManager = AppBeans.get(ClusterManager.class);
ClusterManagerAPI clusterManager = AppBeans.get(ClusterManagerAPI.class);
return new EntityCacheConnection(this.rcm, clusterManager);
} catch (Exception ex) {
throw new RemoteCommandManagerException(ex.getMessage());

View File

@ -23,7 +23,7 @@ import com.haulmont.chile.core.model.MetadataObject;
import com.haulmont.cuba.core.EntityManager;
import com.haulmont.cuba.core.Persistence;
import com.haulmont.cuba.core.app.ClusterListenerAdapter;
import com.haulmont.cuba.core.app.ClusterManager;
import com.haulmont.cuba.core.app.ClusterManagerAPI;
import com.haulmont.cuba.core.entity.BaseGenericIdEntity;
import com.haulmont.cuba.core.global.Metadata;
import com.haulmont.cuba.core.global.View;
@ -47,7 +47,7 @@ public class QueryCacheManager {
@Inject
protected QueryCacheConfig queryCacheConfig;
@Inject
protected ClusterManager clusterManager;
protected ClusterManagerAPI clusterManager;
@Inject
protected Persistence persistence;
@Inject