摘要: 以下内容基于Centos 6.3版本。java开发的时候,需要注意以下几点:在main中,建立额外线程以保证一直运行;注册runtime的shutdownhook,以执行服务线程的退出前清理工作;其他内容,都用shell脚本来控制,主要有:$APP_HOME/bin/daemon.sh,该shell,支持link到服务目录,负责协调服务。 1 #!/bin/sh 2 # 3 # chkconfig: - 20 80 4 # description: Starts and stops the redis daemon. 5 # 6 # Source function library. 7 #.. 阅读全文
posted @ 2013-09-11 17:35 jdragon 阅读(981) 评论(0) 推荐(0)