JSVC简介

JSVC简介及原理 - 掘金 (juejin.cn)

jsvc可以理解为类unix系统下的启动并守护java进程的可执行程序,属于Apache Commons Daemon项目。

包括一下方法:
void init(String[] arguments): Here open configuration files, create a trace file, create ServerSockets, Threads
void start(): Start the Thread, accept incoming connections
void stop(): Inform the Thread to terminate the run(), close the ServerSockets
void destroy(): Destroy any object created in init()

jsvc会启动3个进程:启动进程、控制进程、java服务进程。
通常ps -ef|grep xxx服务,只会看见1个进程信息;用jsvc能看见3条进程信息,并且启动命令是一样的(至少我这边测试是的)
posted @ 2023-10-17 15:49  你说夕阳很美  阅读(412)  评论(0)    收藏  举报