本文整理了Java中com.sun.enterprise.config.serverbeans.Server.isRunning()
方法的一些代码示例,展示了Server.isRunning()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Server.isRunning()
方法的具体详情如下:
包路径:com.sun.enterprise.config.serverbeans.Server
类名称:Server
方法名:isRunning
暂无
代码示例来源:origin: org.glassfish.main.cluster/cluster-admin
private String pollForDeath() {
int counter = 0; // 120 seconds
while (++counter < 240) {
if (!instance.isRunning())
return null;
try {
Thread.sleep(500);
}
catch (Exception e) {
// ignore
}
}
return Strings.get("stop.instance.timeout", instanceName);
}
代码示例来源:origin: org.glassfish.main.ejb/ejb-container
private boolean isServerRunning(String serverName) {
Server server = domain.getServerNamed(serverName);
return (server == null) ? false : server.isRunning();
}
代码示例来源:origin: org.glassfish.ejb/ejb-container
private boolean isServerRunning(String serverName) {
Server server = domain.getServerNamed(serverName);
return (server == null) ? false : server.isRunning();
}
}
代码示例来源:origin: org.glassfish.cluster/cluster-admin
private String pollForDeath() {
int counter = 0; // 120 seconds
while (++counter < 240) {
if (!instance.isRunning())
return null;
try {
Thread.sleep(500);
}
catch (Exception e) {
// ignore
}
}
return Strings.get("stop.instance.timeout", instanceName);
}
代码示例来源:origin: org.glassfish.main.core/kernel
private boolean isInstanceRunning() {
boolean rs = false;
int num = 0;
List<Server> allServers = targetService.getAllInstances();
for (Server server : allServers) {
if (server.isRunning()) {
num++;
}
}
if (num >= 2)
rs = true;
return rs;
}
代码示例来源:origin: org.glassfish.main.cluster/cluster-admin
private String pollForLife(Server instance) {
int counter = 0; // 120 seconds
while (++counter < 240) {
if (instance.isRunning())
return null;
try {
Thread.sleep(500);
}
catch (Exception e) {
// ignore
}
}
return Strings.get("start.instance.timeout", instanceName);
}
代码示例来源:origin: org.glassfish.cluster/cluster-admin
private String pollForLife() {
int counter = 0; // 120 seconds
while (++counter < 240) {
if (instance.isRunning())
return null;
try {
Thread.sleep(500);
}
catch (Exception e) {
// ignore
}
}
return Strings.get("start.instance.timeout", instanceName);
}
代码示例来源:origin: org.glassfish.main.transaction/jts
private boolean isServerRunning(String serverName) {
boolean rs = false;
for(Server server : servers.getServer()) {
if(serverName.equals(server.getName())) {
rs = server.isRunning();
break;
}
}
return rs;
}
代码示例来源:origin: org.glassfish.main.transaction/jts
private boolean isInstanceRunning(String instance) {
boolean rs = false;
for(Server server : servers.getServer()) {
if(instance.equals(server.getName())) {
rs = server.isRunning();
break;
}
}
return rs;
}
}
代码示例来源:origin: org.glassfish.ejb/ejb-container
private String getOwnerId(String target) {
// If target is a cluster, replace it with the instance
ReferenceContainer ref = domain.getReferenceContainerNamed(target);
if(ref != null && ref.isCluster()) {
Cluster cluster = (Cluster) ref; // guaranteed safe cast!!
List<Server> instances = cluster.getInstances();
// Try a random instance in a cluster
int useInstance = random.nextInt(instances.size());
Server s0 = instances.get(useInstance);
if (s0.isRunning()) {
return s0.getName();
} else {
// Pick the first running instead
for (Server s : instances) {
if (s.isRunning()) {
return s.getName();
}
}
}
}
return target;
}
代码示例来源:origin: org.glassfish.main.ejb/ejb-container
private String getOwnerId(String target) {
// If target is a cluster, replace it with the instance
ReferenceContainer ref = domain.getReferenceContainerNamed(target);
if(ref != null && ref.isCluster()) {
Cluster cluster = (Cluster) ref; // guaranteed safe cast!!
List<Server> instances = cluster.getInstances();
// Try a random instance in a cluster
int useInstance = random.nextInt(instances.size());
Server s0 = instances.get(useInstance);
if (s0.isRunning()) {
return s0.getName();
} else {
// Pick the first running instead
for (Server s : instances) {
if (s.isRunning()) {
return s.getName();
}
}
}
// If none of the instances is running, return a random instance in a
// cluster
return s0.getName();
}
return target;
}
代码示例来源:origin: org.glassfish.main.cluster/cluster-admin
return Strings.get("stop.instance.noPort", instanceName);
if(!instance.isRunning())
return null;
代码示例来源:origin: org.glassfish.ejb/ejb-container
List<Server> instances = fromServerCluster.getInstances();
for(Server instance : instances) {
if(instance.isRunning()) {
target = instance.getName();
needRedirect = true;
代码示例来源:origin: org.glassfish.main.ejb/ejb-container
List<Server> instances = fromServerCluster.getInstances();
for(Server instance : instances) {
if(instance.isRunning()) {
target = instance.getName();
needRedirect = true;
代码示例来源:origin: org.glassfish.cluster/cluster-admin
return Strings.get("stop.instance.noPort", instanceName);
if(!instance.isRunning())
return null;
代码示例来源:origin: org.glassfish.main.orb/orb-iiop
if (!server.isRunning()) {
return null ;
代码示例来源:origin: org.glassfish.main.cluster/cluster-admin
if (instance.isRunning()) {
msg = Strings.get("start.instance.already.running", instanceName);
logger.info(msg);
代码示例来源:origin: org.glassfish.cluster/cluster-admin
if (instance.isRunning()) {
msg = Strings.get("start.instance.already.running", instanceName);
logger.info(msg);
代码示例来源:origin: org.glassfish.cluster/cluster-admin
if (instance.isRunning()){
msg = Strings.get("instance.shutdown", instanceName);
logger.warning(msg);
代码示例来源:origin: org.glassfish.main.cluster/cluster-admin
if (instance.isRunning()){
msg = Strings.get("instance.shutdown", instanceName);
logger.warning(msg);
内容来源于网络,如有侵权,请联系作者删除!