SeFetion 部署
1, SeFetion介绍
SeFetion 是jiangwx 使用开源项目MapleFetion飞信项目再次封装而成的短消息报警器,目前适合使用于个人系统报警,或消息警报,系统运行通知,服务器主机网络连接报告,在不久的将来将会免费提供web接口,方便广大程序爱好者调用。
2, SeFetion 目录结构

说明:
Bin:SeFetion启动的可执行文件,现在文件夹为空,以后会拓展
Cjar:此文件夹是程序开发时使用,里面包含快速生成jar包的脚本
Conf:包含配置文件
Lib:SeFetion核心jar包存放处
Logs:SeFetion运行日志
Service:SeFetion以服务方式启动的脚本与可执行文件
3, 配置文件

说明:配置文件共有3个
Logging.properties:系统日志相关的配置文件
Se.properties : SeFetion 系统配置
Wrapper.conf:服务方式启动的配置文件
4, 部署方式
进入service文件夹,修改3_install_wrapper.bat脚本,修改2个地方
1) set _WRAPPER_BASE=wrapper #此处设置wrapper.exe文件名称
2) set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf #设置配置文件名称
进入conf文件夹,修改wrapper.conf文件,修改n个地方
1) wrapper.java.command=java #此处设置java.exe 路径,如果设置了环境变量,则可直接填写 java
2) wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperJarApp #此处填写程序入口类,此处有3种方式填写:详情请看附件1
3) wrapper.java.classpath.1=../lib/wrapper.jar #此处填写各种jar包,有多少个jar包就填多少个,填写方式如下
wrapper.java.classpath.1=../lib/wrapper.jar
wrapper.java.classpath.2=../lib/SeFetionClient-1.0.1.jar
4) wrapper.java.library.path.1=../lib #填写wrapper.dll 所在路径
5) wrapper.app.parameter.1=../lib/SeFetionClient-1.0.1.jar #根据wrapper.java.mainclass配置填写的参数,填写方式请看附件1
在本程序中就是填写入口jar包,jar包中的manifest文件设置了main-calss:
程序加载时就会从这里进去
6) 服务配置
# Name of the service
wrapper.name=SeFetion
# Display name of the service
wrapper.displayname=SeFetion
# Description of the service
wrapper.description=simple msg
# Service dependencies. Add dependencies as needed starting from 1
#wrapper.ntservice.dependency.1=
# Mode in which the service is installed. AUTO_START, DELAY_START or DEMAND_START
wrapper.ntservice.starttype=AUTO_START
7) 还有更多的参数请查看wrapper.conf文件
5, 配置好之后可以执行3_install_wrapper.bat 安装服务,届时,SeFetion部署完毕
附件1:
i. wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
Main Class
The final component of the command used to launch JBoss is the main class, org.jboss.Main. The main class executed by Java when launched is specified by using the wrapper.java.mainclass property. As mentioned above however. Because the JBoss main class does not know how to communicate with the Wrapper, we will set the main class to be the full class name of WrapperSimpleApp. The JBoss main class is then specified as the first application parameter below.
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
Application Parameters
Application parameters are set using the wrapper.app-parameter.<n> properties. Application parameters appear in the Java command line directly after the main class. While JBoss does not have any such parameters, it is still necessary to set one of these properties. This is because we are using the WrapperSimpleApp helper class and as described above, its first parameter is the main class name of the application being run. in this case, org.jboss.Main:
wrapper.app.parameter.1=org.jboss.Main
ii. wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperStartStopApp
Main Class
The next component of the command used to launch Tomcat is the main class, org.apache.catalina.startup.Bootstrap. The main class executed by Java when launched is specified by using the wrapper.java.mainclass property. As mentioned above however. Because we are making use of the WrapperStartStopApp helper class to start and stop Tomcat, we will specify that class's full name as the main class. The Tomcat main classes are then specified as application parameters below.
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperStartStopApp
Application Parameters
Application parameters are set using the wrapper.app-parameter.<n> properties. Application parameters appear in the Java command line directly after the main class.
When using the WrapperStartStopApp helper class, a lot of information needs to be provided about both the "start" and "stop" classes. This information includes each classes' full name, the list of parameters passed to their main methods, and a flag instructing the helper class whether or not it should wait for all non-daemon threads to exit before causing the JVM to exit.
To make it clear how all of this information is encoded, we will start by presenting the property values for the Tomcat application several comments have been added above what is normally in the wrapper.conf file to make it clearer what the properties mean. We suggest adding these comments to your configuration file wrapper.conf as well.
# The first application parameter is the name of the class whose main
# method is to be called when the application is launched. The class
# name is followed by the number of parameters to be passed to its main
# method. Then comes the actual parameters.
wrapper.app.parameter.1=org.apache.catalina.startup.Bootstrap
wrapper.app.parameter.2=1
wrapper.app.parameter.3=start
# The start parameters are followed by the name of the class whose main
# method is to be called to stop the application. The stop class name
# is followed by a flag which controls whether or not the Wrapper should
# wait for all non daemon threads to complete before exiting the JVM.
# The flag is followed by the number of parameters to be passed to the
# stop class's main method. Finally comes the actual parameters.
wrapper.app.parameter.4=org.apache.catalina.startup.Bootstrap
wrapper.app.parameter.5=TRUE
wrapper.app.parameter.6=1
wrapper.app.parameter.7=stop
The start and stop class names should be fairly clear. The first parameter count is required to locate the stop class in the parameter list. The second count is there for consistency.
The flag at parameter #5 above is used to control the behavior of the WrapperStartStopApp helper class when it is shutting down the JVM. When the Wrapper sends a JVM shutdown request, WrapperStartStopApp responds by calling the main method of the "stop" class with the configured parameters. The flag above controls what happens when that main method returns. If the flag is FALSE then System.exit(0) will be called immediately. When TRUE, WrapperStartStopApp will wait until all non-daemon threads have completed before calling System.exit(0). The latter is the behavior which produces the cleanest shutdown for Tomcat. If TRUE is specified, but one or more Daemon threads do not complete, the Wrapper will forcibly kill the JVM after its Shutdown Timeout has expired. This defaults to 30 seconds.
Non-daemon threads are counted by iterating over all threads in the system and counting those whose isDaemon method returns FALSE. Unfortunately, this count will never actually reach "0" (zero) on most JVMs because of the existence of system threads. In most Sun JVMs, there will be one non-daemon system thread. To make the shutdown work correctly, this system thread count needs to be correct. It can be set by defining a org.tanukisoftware.wrapper.WrapperStartStopApp.systemThreadCount system property. The default value is "1 thread".
iii. Wrappper.java.mainclass=org.tanukisofeware.wrapper.wrapperjavaapp
Main Class
When using the Wrapper and the WrapperJarApp helper class, Java is not executing the jar directly. It is necessary to specify the helper class as the main class of the application. The main class executed by Java when launched is specified by using the wrapper.java.mainclass property as follows:
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperJarApp
Application Parameters
Application parameters are set using the wrapper.app-parameter.<n> properties. In this case, the command line to launch Hudson does not specifiy any application parameters, but it is nessary to tell the WrapperJarApp helper class which jar to execute. This is done as follows:
wrapper.app.parameter.1=C:\Hudson\lib\hudson.war

- 大小: 9.1 KB

- 大小: 19.2 KB
分享到:
相关推荐
【计算机求职笔试】资源
# 基于Apache Spark Mllib的Bronze机器学习平台 ## 项目简介 Bronze是一个构建在Apache Spark Mllib之上的机器学习平台,旨在提供全面的数据接入、转换、训练、测试和输出功能。该平台支持多种机器学习算法模型,并提供丰富的插件来处理数据预处理、特征工程、模型训练和验证等任务。 ## 项目的主要特性和功能 ### 数据处理流程 1. 数据采集从各种数据源(如Fake、File、HDFS)接入数据。 2. 数据预处理对数据进行清洗、转换和格式化。 3. 特征工程生成和选择特征,包括特征提取、转换和选择。 4. 模型训练使用多种分类和回归模型进行训练。 5. 模型验证对训练好的模型进行验证和评估。 6. 模型持久化将训练好的模型保存到持久化存储中。 7. 模型结果输出输出模型的最终结果。 ### 支持的算法模型 #### 分类模型 逻辑回归支持大规模特征和无限训练样例,输出类别数小于1000万。
Java项目基于Springboot框架的课程设计,包含LW+ppt
资源内项目源码是均来自个人的课程设计、毕业设计或者具体项目,代码都测试ok,都是运行成功后才上传资源,答辩评审绝对信服的,拿来就能用。放心下载使用!源码、数据集、部署说明一站式服务,拿来就能用的绝对好资源!!! 项目备注 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载学习,也适合小白学习进阶,当然也可作为毕设项目、课程设计、大作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设、课设、作业等。 下载后请首先打开README.dataset.txt文件,仅供学习参考, 切勿用于商业用途。 4、如有侵权请私信博主,感谢支持
内容概要:本文详细探讨了全球定位系统(GPS)的信号产生、捕获和追踪三个核心步骤,并通过Matlab源码实现相关算法。首先介绍了GPS信号产生的关键要素,包括伪随机码生成、数据编码和信号发射。接着讨论了信号捕获过程,涉及天线接收、码相位测量及其常用方法如滑动相关法。最后阐述了信号追踪的三边测量原理及误差修正措施,如电离层延迟补偿、地形效应补偿和多路径效应修正。通过具体Matlab代码示例展示了整个流程的实现,并附带了详细的运行步骤和结果分析。 适合人群:对GPS系统有兴趣的研究人员和技术爱好者,尤其是有一定编程基础并希望深入了解GPS内部机制的人群。 使用场景及目标:适用于学术研究、工程开发等领域,旨在帮助读者掌握GPS信号处理的基本理论和实践技能,提升定位精度和可靠性。 其他说明:文中提供的Matlab代码已在特定版本下测试通过,但不同版本可能存在差异。此外,还列举了一些参考文献供进一步学习。
基于Andorid条形二维码识别设计实现源码,主要针对计算机相关专业的正在做毕设的学生和需要项目实战练习的学习者,也可作为课程设计、期末大作业。
NRF24L01收发例程
AcWing算法基础课Notion笔记html页面
[Excel在财务管理中的应用(第六版)(微课版)]配书资源
# 基于多线程的Web客户端程序 ## 项目简介 本项目是一个基于多线程的Web客户端程序,旨在并发地从Web服务器获取多个文件。通过使用多线程技术,程序能够高效地处理多个文件请求,提高整体性能。 ## 项目的主要特性和功能 多线程并发请求支持同时从多个Web服务器获取文件,提高请求效率。 TCP连接管理每个线程负责建立TCP连接并发送HTTP GET请求。 线程同步与通信使用互斥锁和条件变量确保线程间的同步和数据一致性。 命令行参数解析支持解析命令行参数,获取连接的最大数量和要获取的文件列表。 文件处理每个线程负责读取服务器的响应并处理文件内容。 ## 安装使用步骤 1. 下载源码假设用户已经下载了本项目的源码文件。 2. 编译项目使用合适的编译器(如GCC)编译项目源码。 bash gcc o webclient main.c lpthread
中学学生“诚信”教育班会课件
1、文件说明: Centos8操作系统tacacs-devel-F4.0.4.28.7fb~20231005g4fdf178-2.el8.rpm以及相关依赖,全打包为一个tar.gz压缩包 2、安装指令: #Step1、解压 tar -zxvf tacacs-devel-F4.0.4.28.7fb~20231005g4fdf178-2.el8.tar.gz #Step2、进入解压后的目录,执行安装 sudo rpm -ivh *.rpm
内容概要:本文详细介绍了如何利用LabVIEW通过网口与西门子PLC进行高效通讯的方法和技术细节。首先解释了西门子S7Comm协议的三层结构(TPKT+COTP+S7),并通过具体实例展示了如何构造和发送十六进制命令帧。接着提供了完整的LabVIEW代码片段,涵盖从TCP连接建立、命令帧发送、响应接收及数据解析的全过程。文中还分享了多种实用技巧,如批量读写、强制写入、自动重连机制等,并对比了原生TCP与OPC UA的性能差异。最后,通过实际案例验证了该方案在工业应用中的优越性和稳定性。 适合人群:从事工业自动化领域的工程师和技术人员,尤其是熟悉LabVIEW和西门子PLC的用户。 使用场景及目标:适用于需要与西门子PLC进行高效、稳定的网口通讯的应用场景,旨在提高通讯效率、降低系统复杂度和成本。 其他说明:文中提供的代码和技巧可以帮助开发者更好地理解和掌握LabVIEW与西门子PLC之间的通讯机制,从而应用于各种工业控制系统中。
matlab
内容概要:本文详细介绍了基于CH579芯片的以太网转串口服务器的实现过程。首先,文章讲解了硬件配置,包括使用的芯片及其特性,如CH579M、PHY芯片HR911105A和电平转换电路SGM48017。接着,重点剖析了网络初始化代码,强调了PHY复位时序、MAC地址传递和硬件协议栈处理ARP和ICMP协议的重要性。随后,文章深入探讨了串口数据处理,展示了环形缓冲区的实现和中断服务函数的优化。此外,还介绍了协议转换的状态机实现,以及内存池分配的精妙之处。最后,文章总结了资源管理策略,如DMA自动搬运数据、中断嵌套机制和零拷贝技术,使得服务器能够实现稳定的3Mbps转发速率。 适合人群:具有一定嵌入式开发经验的研发人员,尤其是对以太网转串口服务器感兴趣的工程师。 使用场景及目标:适用于需要深入了解嵌入式系统中以太网转串口服务器的工作原理和技术实现的人群。目标是掌握CH579芯片的硬件配置、网络初始化、串口数据处理、协议转换和资源管理等方面的知识。 其他说明:文中提供了详细的代码示例和硬件设计要点,帮助读者更好地理解和应用相关技术。建议读者结合实际项目进行实践,逐步掌握核心技术。
Java项目基于Springboot框架的课程设计,包含LW+ppt
Java项目基于Springboot框架的课程设计,包含LW+ppt
2025清华大学:迈向未来的AI教学实验-393页.pdf
亲子教育“正面管教”教案课件
全遥控数字音量控制的D类功率放大器