use of org.apache.geode.admin.AdminException in project geode by apache.
the class RemoteGemFireVM method createSubregion.
public Region createSubregion(CacheInfo c, String parentPath, String regionPath, RegionAttributes attrs) throws AdminException {
RegionResponse resp = (RegionResponse) sendAndWait(RegionRequest.createForCreateSubregion(c, parentPath, regionPath, attrs));
Exception ex = resp.getException();
if (ex != null) {
throw new AdminException(LocalizedStrings.RemoteGemFireVM_WHILE_CREATING_SUBREGION_0_OF_1.toLocalizedString(new Object[] { regionPath, parentPath }), ex);
} else {
return resp.getRegion(this);
}
}
use of org.apache.geode.admin.AdminException in project geode by apache.
the class ConnectionNotificationFilterImpl method initializeHelperMbean.
private void initializeHelperMbean() {
try {
memberInfoWithStatsMBean = new MemberInfoWithStatsMBean(this);
MBeanServer mbs = getMBeanServer();
mbs.registerMBean(memberInfoWithStatsMBean, memberInfoWithStatsMBean.getObjectName());
/*
* We are not re-throwing these exceptions as failure create/register the GemFireTypesWrapper
* will not stop the Agent from working. But we are logging it as it could be an indication of
* some problem. Also not creating Localized String for the exception.
*/
} catch (OperationsException e) {
logger.info(LocalizedMessage.create(LocalizedStrings.AgentImpl_FAILED_TO_INITIALIZE_MEMBERINFOWITHSTATSMBEAN), e);
} catch (MBeanRegistrationException e) {
logger.info(LocalizedMessage.create(LocalizedStrings.AgentImpl_FAILED_TO_INITIALIZE_MEMBERINFOWITHSTATSMBEAN), e);
} catch (AdminException e) {
logger.info(LocalizedMessage.create(LocalizedStrings.AgentImpl_FAILED_TO_INITIALIZE_MEMBERINFOWITHSTATSMBEAN), e);
}
}
use of org.apache.geode.admin.AdminException in project geode by apache.
the class StatisticResourceImpl method refresh.
// -------------------------------------------------------------------------
// Operations
// -------------------------------------------------------------------------
public void refresh() throws org.apache.geode.admin.AdminException {
Stat[] stats = null;
if (this.statResource != null) {
stats = this.statResource.getStats();
}
if (stats == null || stats.length < 1) {
throw new AdminException(LocalizedStrings.StatisticResourceImpl_FAILED_TO_REFRESH_STATISTICS_0_FOR_1.toLocalizedString(getType() + "-" + getName(), getOwner()));
}
if (this.statistics == null || this.statistics.length < 1) {
// define new statistics instances...
List statList = new ArrayList();
for (int i = 0; i < stats.length; i++) {
statList.add(createStatistic(stats[i]));
}
this.statistics = (Statistic[]) statList.toArray(new Statistic[0]);
} else {
// update the existing instances...
for (int i = 0; i < stats.length; i++) {
updateStatistic(stats[i]);
}
}
}
use of org.apache.geode.admin.AdminException in project geode by apache.
the class RemoteGemFireVM method createVMRootRegion.
public Region createVMRootRegion(CacheInfo c, String regionPath, RegionAttributes attrs) throws AdminException {
RegionResponse resp = (RegionResponse) sendAndWait(RegionRequest.createForCreateRoot(c, regionPath, attrs));
Exception ex = resp.getException();
if (ex != null) {
throw new AdminException(LocalizedStrings.RemoteGemFireVM_AN_EXCEPTION_WAS_THROWN_WHILE_CREATING_VM_ROOT_REGION_0.toLocalizedString(regionPath), ex);
} else {
return resp.getRegion(this);
}
}
use of org.apache.geode.admin.AdminException in project geode by apache.
the class RemoteGemFireVM method startBridgeServer.
public AdminBridgeServer startBridgeServer(CacheInfo cache, AdminBridgeServer bridge) throws AdminException {
BridgeServerRequest request = BridgeServerRequest.createForStart(cache, (RemoteBridgeServer) bridge);
BridgeServerResponse response = (BridgeServerResponse) sendAndWait(request);
if (response.getException() != null) {
Exception ex = response.getException();
throw new AdminException(ex.getMessage(), ex);
} else {
return response.getBridgeInfo();
}
}
Aggregations