提交 b98f883a 编写于 作者: W william.liangf

DUBBO-106 Container的properties加载

git-svn-id: http://code.alibabatech.com/svn/dubbo/trunk@490 1a56cb94-b969-4eaa-88fa-be21384802f2
上级 c7579140
......@@ -33,6 +33,8 @@ public class Constants {
public static final List<String> DEFAULT_CHECK_STATUSES = Collections.unmodifiableList(Arrays.asList(new String[] {
"server", "registry", "threadpool", "datasource", "spring", "memory", "load" }));
public static final String DUBBO_PROPERTIES = "dubbo.properties";
public static final String SENT_KEY = "sent";
public static final boolean DEFAULT_SENT = false;
......
......@@ -32,6 +32,7 @@ import com.alibaba.dubbo.common.logger.LoggerFactory;
* @author william.liangf
*/
public class ConfigUtils {
private static final Logger logger = LoggerFactory.getLogger(ConfigUtils.class);
public static boolean isNotEmpty(String value) {
......@@ -85,6 +86,37 @@ public class ConfigUtils {
return names;
}
private static volatile Properties PROPERTIES;
public static Properties getProperties() {
if (PROPERTIES == null) {
synchronized (ConfigUtils.class) {
if (PROPERTIES == null) {
PROPERTIES = ConfigUtils.loadProperties(Constants.DUBBO_PROPERTIES, false);
}
}
}
return PROPERTIES;
}
public static void addProperties(Properties properties) {
if (properties != null) {
getProperties().putAll(properties);
}
}
public static String getProperty(String key) {
return getProperty(key, null);
}
public static String getProperty(String key, String defaultValue) {
String value = System.getProperty(key);
if (value != null && value.length() > 0) {
return value;
}
return getProperties().getProperty(key, defaultValue);
}
/**
* Load properties file to {@link Properties} from class path.
*
......
......@@ -20,7 +20,6 @@ import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.net.URLEncoder;
import java.util.Map;
import java.util.Properties;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
......@@ -28,8 +27,6 @@ import com.alibaba.dubbo.common.Constants;
import com.alibaba.dubbo.common.ExtensionLoader;
import com.alibaba.dubbo.common.logger.Logger;
import com.alibaba.dubbo.common.logger.LoggerFactory;
import com.alibaba.dubbo.common.utils.ConfigUtils;
import com.alibaba.dubbo.rpc.RpcConstants;
/**
* AbstractConfig
......@@ -42,8 +39,6 @@ public abstract class AbstractConfig implements Serializable {
protected static final Logger logger = LoggerFactory.getLogger(AbstractConfig.class);
private static final Properties PROPERTIES = loadProperties();
private static final int MAX_LENGTH = 100;
private static final int MAX_PATH_LENGTH = 200;
......@@ -58,24 +53,6 @@ public abstract class AbstractConfig implements Serializable {
private static final Pattern PATTERN_NAME_HAS_COLON= Pattern.compile("[:\\-._0-9a-zA-Z]+");
protected static String getLegacyProperty(String key) {
String value = System.getProperty(key);
if (value == null || value.length() == 0) {
value = PROPERTIES.getProperty(key);
}
return value;
}
public static void mergeProperties(Properties properties) {
if (properties != null) {
PROPERTIES.putAll(properties);
}
}
private static Properties loadProperties() {
return ConfigUtils.loadProperties(RpcConstants.DEFAULT_DUBBO_CONF_PROPERTIES_FILE, false);
}
protected static void appendParameters(Map<String, String> parameters, Object config) {
appendParameters(parameters, config, null);
}
......
......@@ -98,7 +98,7 @@ public abstract class AbstractReferenceConfig extends AbstractMethodConfig {
protected void checkRegistry() {
// 兼容旧版本
if (registries == null || registries.size() == 0) {
String address = getLegacyProperty("dubbo.registry.address");
String address = ConfigUtils.getProperty("dubbo.registry.address");
if (address != null && address.length() > 0) {
registries = new ArrayList<RegistryConfig>();
String[] as = address.split("\\s*[|]+\\s*");
......@@ -124,7 +124,7 @@ public abstract class AbstractReferenceConfig extends AbstractMethodConfig {
protected void checkApplication() {
// 兼容旧版本
if (application == null) {
String app = getLegacyProperty("dubbo.application.name");
String app = ConfigUtils.getProperty("dubbo.application.name");
if (app != null && app.length() > 0) {
application = new ApplicationConfig();
application.setName(app);
......@@ -136,11 +136,11 @@ public abstract class AbstractReferenceConfig extends AbstractMethodConfig {
}
String wait = getLegacyProperty(RpcConstants.SHUTDOWN_TIMEOUT_KEY);
String wait = ConfigUtils.getProperty(RpcConstants.SHUTDOWN_TIMEOUT_KEY);
if (wait != null && wait.trim().length() > 0) {
System.setProperty(RpcConstants.SHUTDOWN_TIMEOUT_KEY, wait.trim());
} else {
wait = getLegacyProperty(RpcConstants.SHUTDOWN_TIMEOUT_SECONDS_KEY);
wait = ConfigUtils.getProperty(RpcConstants.SHUTDOWN_TIMEOUT_SECONDS_KEY);
if (wait != null && wait.trim().length() > 0) {
System.setProperty(RpcConstants.SHUTDOWN_TIMEOUT_SECONDS_KEY, wait.trim());
}
......
......@@ -407,15 +407,15 @@ public class ReferenceConfig<T> extends AbstractConsumerConfig {
private void checkDefault() {
if (consumer == null) {
consumer = new ConsumerConfig();
String t = getLegacyProperty("dubbo.service.invoke.timeout");
String t = ConfigUtils.getProperty("dubbo.service.invoke.timeout");
if (t != null && t.length() > 0) {
consumer.setTimeout(Integer.parseInt(t.trim()));
}
String r = getLegacyProperty("dubbo.service.max.retry.providers");
String r = ConfigUtils.getProperty("dubbo.service.max.retry.providers");
if (r != null && r.length() > 0) {
consumer.setRetries(Integer.parseInt(r.trim()) - 1);
}
String c = getLegacyProperty("dubbo.service.allow.no.provider");
String c = ConfigUtils.getProperty("dubbo.service.allow.no.provider");
if (c != null && c.length() > 0) {
consumer.setCheck(!Boolean.parseBoolean(c));
}
......
......@@ -438,19 +438,19 @@ public class ServiceConfig<T> extends AbstractServiceConfig {
// 兼容旧版本
if (protocols == null || protocols.size() == 0) {
ProtocolConfig providerBean = new ProtocolConfig();
String p = getLegacyProperty("dubbo.service.protocol");
String p = ConfigUtils.getProperty("dubbo.service.protocol");
if (p != null && p.length() > 0) {
providerBean.setName(p);
}
String h = getLegacyProperty("dubbo.service.server.host");
String h = ConfigUtils.getProperty("dubbo.service.server.host");
if (h != null && h.length() > 0) {
providerBean.setHost(h);
}
String o = getLegacyProperty("dubbo.service.server.port");
String o = ConfigUtils.getProperty("dubbo.service.server.port");
if (o != null && o.length() > 0) {
providerBean.setPort(Integer.parseInt(o.trim()));
}
String t = getLegacyProperty("dubbo.service.max.thread.pool.size");
String t = ConfigUtils.getProperty("dubbo.service.max.thread.pool.size");
if (t != null && t.length() > 0) {
providerBean.setThreads(Integer.parseInt(t.trim()));
}
......
......@@ -38,6 +38,7 @@ import com.alibaba.dubbo.common.Constants;
import com.alibaba.dubbo.common.ExtensionLoader;
import com.alibaba.dubbo.common.logger.Logger;
import com.alibaba.dubbo.common.logger.LoggerFactory;
import com.alibaba.dubbo.common.utils.ConfigUtils;
import com.alibaba.dubbo.config.ArgumentConfig;
import com.alibaba.dubbo.config.MethodConfig;
import com.alibaba.dubbo.config.MonitorConfig;
......@@ -163,12 +164,12 @@ public class DubboBeanDefinitionParser implements BeanDefinitionParser {
&& ! "name".equals(property)
&& ! "interface".equals(property)) {
String sysProperty = element.getPrefix() + "." + element.getLocalName() + "." + id + "." + property;
String sysValue = System.getProperty(sysProperty);
String sysValue = ConfigUtils.getProperty(sysProperty);
if (sysValue != null && sysValue.trim().length() > 0) {
reference = sysValue.trim();
} else {
sysProperty = element.getPrefix() + "." + element.getLocalName() + "." + property;
sysValue = System.getProperty(sysProperty);
sysValue = ConfigUtils.getProperty(sysProperty);
if (sysValue != null && sysValue.trim().length() > 0) {
reference = sysValue.trim();
}
......
......@@ -16,12 +16,16 @@
package com.alibaba.dubbo.container;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import com.alibaba.dubbo.common.Constants;
import com.alibaba.dubbo.common.ExtensionLoader;
import com.alibaba.dubbo.common.logger.Logger;
import com.alibaba.dubbo.common.logger.LoggerFactory;
import com.alibaba.dubbo.common.utils.ConfigUtils;
/**
* Main. (API, Static, ThreadSafe)
......@@ -30,23 +34,25 @@ import com.alibaba.dubbo.common.logger.LoggerFactory;
*/
public class Main {
private static final Logger logger = LoggerFactory.getLogger(Main.class);
private static final Logger logger = LoggerFactory.getLogger(Main.class);
private static final ExtensionLoader<Container> loader = ExtensionLoader.getExtensionLoader(Container.class);
public static final String CONTAINER_KEY = "dubbo.container";
public static void main(String[] args) {
try {
ExtensionLoader<Container> loader = ExtensionLoader.getExtensionLoader(Container.class);
final Container[] containers;
if(null == args || args.length == 0) {
containers = new Container[] {loader.getDefaultExtension()};
logger.info("Use default container type(" + loader.getDefaultExtensionName() + ") to run dubbo serivce.");
} else {
containers = new Container[args.length];
for (int i = 0; i < args.length; i ++) {
containers[i] = loader.getExtension(args[i]);
}
logger.info("Use container type(" + Arrays.toString(args) + ") to run dubbo serivce.");
if (args == null || args.length == 0) {
String config = ConfigUtils.getProperty(CONTAINER_KEY, loader.getDefaultExtensionName());
args = Constants.COMMA_SPLIT_PATTERN.split(config);
}
final List<Container> containers = new ArrayList<Container>();
for (int i = 0; i < args.length; i ++) {
containers.add(loader.getExtension(args[i]));
}
logger.info("Use container type(" + Arrays.toString(args) + ") to run dubbo serivce.");
Runtime.getRuntime().addShutdownHook(new Thread() {
public void run() {
for (Container container : containers) {
......@@ -59,6 +65,7 @@ public class Main {
}
}
});
for (Container container : containers) {
container.start();
logger.info("Dubbo " + container.getClass().getSimpleName() + " started!");
......
......@@ -25,6 +25,7 @@ import com.alibaba.dubbo.common.Constants;
import com.alibaba.dubbo.common.Extension;
import com.alibaba.dubbo.common.logger.Logger;
import com.alibaba.dubbo.common.logger.LoggerFactory;
import com.alibaba.dubbo.common.utils.ConfigUtils;
import com.alibaba.dubbo.common.utils.NetUtils;
import com.alibaba.dubbo.container.Container;
import com.alibaba.dubbo.container.page.PageServlet;
......@@ -44,14 +45,14 @@ public class JettyContainer implements Container {
public static final String JETTY_DIRECTORY = "dubbo.jetty.directory";
public static final String JETTY_PAGES = "dubbo.jetty.pages";
public static final String JETTY_PAGES = "dubbo.jetty.page";
public static final int DEFAULT_JETTY_PORT = 8080;
private SelectChannelConnector connector;
public void start() {
String serverPort = System.getProperty(JETTY_PORT);
String serverPort = ConfigUtils.getProperty(JETTY_PORT);
int port;
if (serverPort == null || serverPort.length() == 0) {
port = DEFAULT_JETTY_PORT;
......@@ -62,7 +63,7 @@ public class JettyContainer implements Container {
connector.setPort(port);
ServletHandler handler = new ServletHandler();
String resources = System.getProperty(JETTY_DIRECTORY);
String resources = ConfigUtils.getProperty(JETTY_DIRECTORY);
if (resources != null && resources.length() > 0) {
String[] directories = Constants.COMMA_SPLIT_PATTERN.split(resources);
ResourceServlet resourceServlet = new ResourceServlet();
......@@ -87,7 +88,7 @@ public class JettyContainer implements Container {
}
ServletHolder pageHolder = handler.addServletWithMapping(PageServlet.class, "/*");
pageHolder.setInitParameter("pages", System.getProperty(JETTY_PAGES));
pageHolder.setInitParameter("pages", ConfigUtils.getProperty(JETTY_PAGES));
pageHolder.setInitOrder(2);
Server server = new Server();
......
/*
* Copyright 1999-2011 Alibaba Group.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.dubbo.container.properties;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
import java.util.Properties;
import com.alibaba.dubbo.common.Extension;
import com.alibaba.dubbo.container.Container;
/**
* PropertiesContainer
*
* @author william.liangf
*/
@Extension("properties")
public class PropertiesContainer implements Container {
public static final String PROPERTIES_FILE = "dubbo.properties.file";
public static final String DEFAULT_PROPERTIES_FILE = "dubbo.properties";
public void start() {
String file = System.getProperty(PROPERTIES_FILE, DEFAULT_PROPERTIES_FILE);
Properties properties = new Properties();
try {
InputStream input = Thread.currentThread().getContextClassLoader().getResourceAsStream(file);
if (input == null) {
throw new FileNotFoundException("Not found file " + file + " in classpath.");
}
properties.load(input);
for (Map.Entry<Object, Object> entry : properties.entrySet()) {
System.setProperty((String) entry.getKey(), (String) entry.getValue());
}
} catch (IOException e) {
throw new IllegalStateException(e.getMessage(), e);
}
}
public void stop() {
}
}
......@@ -21,6 +21,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.alibaba.dubbo.common.Extension;
import com.alibaba.dubbo.common.logger.Logger;
import com.alibaba.dubbo.common.logger.LoggerFactory;
import com.alibaba.dubbo.common.utils.ConfigUtils;
import com.alibaba.dubbo.container.Container;
/**
......@@ -44,7 +45,7 @@ public class SpringContainer implements Container {
}
public void start() {
String configPath = System.getProperty(SPRING_CONFIG);
String configPath = ConfigUtils.getProperty(SPRING_CONFIG);
if (configPath == null || configPath.length() == 0) {
configPath = DEFAULT_SPRING_CONFIG;
}
......
com.alibaba.dubbo.container.spring.SpringContainer
com.alibaba.dubbo.container.jetty.JettyContainer
com.alibaba.dubbo.container.log4j.Log4jContainer
com.alibaba.dubbo.container.properties.PropertiesContainer
\ No newline at end of file
com.alibaba.dubbo.container.log4j.Log4jContainer
\ No newline at end of file
......@@ -52,7 +52,7 @@ fi
LIB_JARS=`ls $LIB_DIR|grep .jar|awk '{print "'$LIB_DIR'/"$0}'|tr "\n" ":"`
echo -e "Starting $SERVER_NAME on $SERVER_PORT \c"
nohup java $JAVA_OPTS $JAVA_MEM_OPTS $JAVA_DEBUG_OPTS -classpath $CONF_DIR:$LIB_JARS com.alibaba.dubbo.container.Main properties log4j spring jetty > $STDOUT_FILE 2>&1 &
nohup java $JAVA_OPTS $JAVA_MEM_OPTS $JAVA_DEBUG_OPTS -classpath $CONF_DIR:$LIB_JARS com.alibaba.dubbo.container.Main > $STDOUT_FILE 2>&1 &
COUNT=0
while [ $COUNT -lt 1 ]; do
......
dubbo.container=log4j,spring,jetty
dubbo.application.name=demo-provider
dubbo.registry.address=multicast://224.5.6.7:1234
#dubbo.registry.address=zookeeper://127.0.0.1:2181
#dubbo.registry.address=dubbo://127.0.0.1:9090
dubbo.protocol.port=20880
dubbo.jetty.port=30880
dubbo.jetty.pages=index,registries,registered,status,log,system
dubbo.jetty.page=index,registries,registered,status,log,system
dubbo.log4j.file=logs/dubbo-monitor-simple.log
dubbo.log4j.level=WARN
\ No newline at end of file
......@@ -18,7 +18,7 @@ package com.alibaba.dubbo.demo.provider;
public class DemoProvider {
public static void main(String[] args) {
com.alibaba.dubbo.container.Main.main(new String[] {"properties", "log4j", "spring", "jetty"});
com.alibaba.dubbo.container.Main.main(args);
}
}
\ No newline at end of file
dubbo.container=log4j,spring,jetty
dubbo.application.name=demo-provider
#dubbo.registry.address=multicast://224.5.6.7:1234
#dubbo.registry.address=zookeeper://127.0.0.1:2181
dubbo.registry.address=dubbo://127.0.0.1:9090
dubbo.protocol.port=2088
dubbo.jetty.port=3088
dubbo.jetty.pages=index,registries,registered,status,log,system
dubbo.jetty.page=index,registries,registered,status,log,system
dubbo.log4j.file=logs/dubbo-monitor-simple.log
dubbo.log4j.level=INFO
\ No newline at end of file
......@@ -52,7 +52,7 @@ fi
LIB_JARS=`ls $LIB_DIR|grep .jar|awk '{print "'$LIB_DIR'/"$0}'|tr "\n" ":"`
echo -e "Starting $SERVER_NAME on $SERVER_PORT \c"
nohup java $JAVA_OPTS $JAVA_MEM_OPTS $JAVA_DEBUG_OPTS -classpath $CONF_DIR:$LIB_JARS com.alibaba.dubbo.container.Main properties log4j registry spring jetty > $STDOUT_FILE 2>&1 &
nohup java $JAVA_OPTS $JAVA_MEM_OPTS $JAVA_DEBUG_OPTS -classpath $CONF_DIR:$LIB_JARS com.alibaba.dubbo.container.Main > $STDOUT_FILE 2>&1 &
COUNT=0
while [ $COUNT -lt 1 ]; do
......
dubbo.container=log4j,spring,registry,jetty
dubbo.application.name=simple-monitor
dubbo.registry.address=multicast://224.5.6.7:1234
#dubbo.registry.address=zookeeper://127.0.0.1:2181
#dubbo.registry.address=dubbo://127.0.0.1:9090
dubbo.protocol.port=7070
dubbo.jetty.port=8080
dubbo.jetty.pages=index,services,providers,consumers,statistics,charts,status,log,system
dubbo.jetty.page=index,services,providers,consumers,statistics,charts,status,log,system
dubbo.jetty.directory=charts
dubbo.monitor.directory=statistics
dubbo.log4j.file=logs/dubbo-monitor-simple.log
......
......@@ -31,6 +31,7 @@ import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.logger.Logger;
import com.alibaba.dubbo.common.logger.LoggerFactory;
import com.alibaba.dubbo.common.utils.ConcurrentHashSet;
import com.alibaba.dubbo.common.utils.ConfigUtils;
import com.alibaba.dubbo.common.utils.NetUtils;
import com.alibaba.dubbo.container.Container;
import com.alibaba.dubbo.registry.NotifyListener;
......@@ -110,7 +111,7 @@ public class RegistryContainer implements Container {
}
public void start() {
String url = System.getProperty(REGISTRY_ADDRESS);
String url = ConfigUtils.getProperty(REGISTRY_ADDRESS);
if (url == null || url.length() == 0) {
throw new IllegalArgumentException("Please set java start argument: -D" + REGISTRY_ADDRESS + "=zookeeper://127.0.0.1:2181");
}
......
......@@ -18,7 +18,7 @@ package com.alibaba.dubbo.monitor.simple;
public class SimpleMonitor {
public static void main(String[] args) {
com.alibaba.dubbo.container.Main.main(new String[] {"properties", "log4j", "registry", "spring", "jetty"});
com.alibaba.dubbo.container.Main.main(args);
}
}
\ No newline at end of file
dubbo.container=log4j,spring,registry,jetty
dubbo.application.name=simple-monitor
#dubbo.registry.address=multicast://224.5.6.7:1234
#dubbo.registry.address=zookeeper://127.0.0.1:2181
dubbo.registry.address=dubbo://127.0.0.1:9090
dubbo.protocol.port=7070
dubbo.jetty.port=8080
dubbo.jetty.pages=index,services,providers,consumers,statistics,charts,status,log,system
dubbo.jetty.page=index,services,providers,consumers,statistics,charts,status,log,system
dubbo.jetty.directory=charts
dubbo.monitor.directory=statistics
dubbo.log4j.file=logs/dubbo-monitor-simple.log
......
......@@ -52,7 +52,7 @@ fi
LIB_JARS=`ls $LIB_DIR|grep .jar|awk '{print "'$LIB_DIR'/"$0}'|tr "\n" ":"`
echo -e "Starting $SERVER_NAME on $SERVER_PORT \c"
nohup java $JAVA_OPTS $JAVA_MEM_OPTS $JAVA_DEBUG_OPTS -classpath $CONF_DIR:$LIB_JARS com.alibaba.dubbo.container.Main properties log4j spring > $STDOUT_FILE 2>&1 &
nohup java $JAVA_OPTS $JAVA_MEM_OPTS $JAVA_DEBUG_OPTS -classpath $CONF_DIR:$LIB_JARS com.alibaba.dubbo.container.Main > $STDOUT_FILE 2>&1 &
COUNT=0
while [ $COUNT -lt 1 ]; do
......
dubbo.container=log4j,spring
dubbo.application.name=simple-registry
dubbo.protocol.port=9090
dubbo.log4j.file=logs/dubbo-simple-registry.log
......
......@@ -18,7 +18,7 @@ package com.alibaba.dubbo.registry.simple;
public class SimpleRegistry {
public static void main(String[] args) {
com.alibaba.dubbo.container.Main.main(new String[] {"properties", "log4j", "spring"});
com.alibaba.dubbo.container.Main.main(args);
}
}
\ No newline at end of file
dubbo.container=log4j,spring
dubbo.application.name=simple-registry
dubbo.protocol.port=9090
dubbo.log4j.file=logs/dubbo-simple-registry.log
......
......@@ -26,8 +26,6 @@ import java.util.List;
*/
public final class RpcConstants {
public static final String DEFAULT_DUBBO_CONF_PROPERTIES_FILE = "dubbo.properties";
public static final List<String> DEFAULT_REFERENCE_FILTERS = Collections.unmodifiableList(Arrays.asList(new String[] {
"consumercontext", "compatible", "deprecated", "collect", "genericimpl", "activelimit", "monitor", "future" }));
......
......@@ -25,6 +25,7 @@ import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.logger.Logger;
import com.alibaba.dubbo.common.logger.LoggerFactory;
import com.alibaba.dubbo.common.utils.ConcurrentHashSet;
import com.alibaba.dubbo.common.utils.ConfigUtils;
import com.alibaba.dubbo.rpc.Exporter;
import com.alibaba.dubbo.rpc.Invoker;
import com.alibaba.dubbo.rpc.Protocol;
......@@ -97,14 +98,14 @@ public abstract class AbstractProtocol implements Protocol {
@SuppressWarnings("deprecation")
protected static int getServerShutdownTimeout() {
int timeout = RpcConstants.DEFAULT_SERVER_SHUTDOWN_TIMEOUT;
String value = System.getProperty(RpcConstants.SHUTDOWN_TIMEOUT_KEY);
String value = ConfigUtils.getProperty(RpcConstants.SHUTDOWN_TIMEOUT_KEY);
if (value != null && value.length() > 0) {
try{
timeout = Integer.parseInt(value);
}catch (Exception e) {
}
} else {
value = System.getProperty(RpcConstants.SHUTDOWN_TIMEOUT_SECONDS_KEY);
value = ConfigUtils.getProperty(RpcConstants.SHUTDOWN_TIMEOUT_SECONDS_KEY);
if (value != null && value.length() > 0) {
try{
timeout = Integer.parseInt(value) * 1000;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册