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
分享到:
相关推荐
化工仪表及自动化讲稿.doc
内容概要:《2025智能移动机器人电机与减速机产品发展蓝皮书》由新战略移动机器人产业研究所根据CMR产业联盟统计数据编写,涵盖了国内外超30家电机及减速机企业的业务数据和移动机器人本体企业应用现状的综合分析。报告指出,2024年中国智能移动机器人电机市场规模约为11.6亿元,销售量约105万台,其中轮式移动机器人占比最大,达62.80%。未来市场将呈现“人形机器人引领增长、工业AGV/AMR稳健扩容、商用服务机器人快速渗透”的格局,预计到2030年人形机器人将占据大部分市场。智能移动机器人动力系统将朝着“更高效、更聪明、更绿色”的方向发展,推动机器人从“工具”向“智能体”转变。; 适合人群:从事智能移动机器人及相关领域的研发人员、投资者、电机及减速机厂商等专业人士。; 使用场景及目标:①帮助本体企业进行产品选型;②为投资方提供市场趋势和投资机会的参考;③指导电机及减速机厂商制定发展战略和市场布局。; 其他说明:蓝皮书的数据来源于国内外超过30家电机及减速机企业和超过35家机器人企业的调研,采用多种调研方式确保数据的准确性和可靠性。报告覆盖了工业移动机器人(AGV/AMR)、人形机器人及商用服务机器人等领域,不包括家用扫地机器人和农业机器人。
论文模板-html5蓝色智能电子产品网站源码-实训商业源码.zip
内容概要:本文介绍了基于内容的新闻推荐系统的技术实现与功能特点。该系统主要采用Java EE技术栈,包括Java、Eclipse、MySQL、Spring、SpringMVC、Mybatis等技术,结合TF-IDF算法和余弦相似度算法,通过对用户浏览行为的分析,挖掘用户的兴趣偏好,为用户提供个性化新闻推荐。系统分为前台和后台两大功能模块,前台提供新闻分类查看、详情阅读、评论互动等功能,后台支持系统设置、用户管理、新闻管理等操作。项目的完整源码、数据库及相关文档均包含在内,便于部署和二次开发。 适合人群:对Java EE技术栈有一定了解的研发人员和技术爱好者。 使用场景及目标:适用于希望深入了解基于内容的推荐算法及其实际应用的开发者,尤其是那些想要构建类似新闻推荐系统的团队。通过学习该项目,能够掌握推荐系统的架构设计、算法实现及前后台功能开发。 阅读建议:建议读者先熟悉Java EE相关技术和推荐算法的基本概念,再逐步深入研究项目源码和文档,结合实际运行环境进行实践探索。
内容概要:本文详细介绍了如何在微电网优化中处理风光不确定性的问题。文中首先阐述了风光不确定性带来的挑战,接着引入了机会约束和概率序列的概念,作为描述和处理不确定性的数学工具。随后,文章深入解析了一段基于MATLAB环境并使用CPLEX求解器的代码,该代码通过构建数学模型,定义目标函数和约束条件,最终实现了对风光不确定性的有效处理和优化。最后,文章强调了这段代码的学习价值,鼓励研究者借鉴其方法,进一步探索和完善微电网优化策略。 适合人群:从事微电网研究和技术开发的专业人士,尤其是那些关注可再生能源不确定性和优化算法的研究者。 使用场景及目标:适用于希望深入了解微电网优化中不确定性处理方法的研究者和技术人员,旨在提高微电网系统的稳定性和可靠性。 阅读建议:读者可以通过学习这段代码,掌握如何将机会约束和概率序列应用于实际问题中,同时也可以将其作为一个参考范例,启发更多创新的方法和策略。
工程项目管理中风险防控、签证管理及反索赔.ppt
论文模板-(PC+WAP)教育咨询服务类网站pbootcms模板 教育培训出国留学机构网站源码-实训商业源码.zip
实训商业源码-呆瓜助手-毕业设计.zip
论文模板-html5工业设备网站源码-实训商业源码.zip
论文模板-beginning-实训商业源码.zip
第七章-Android常用高级控件.ppt
GIS设备超声波法局部放电测试作业指导书.doc
实训商业源码-餐饮酒店装饰设计类网站-毕业设计.zip
实训商业源码-服务器在线测速系统源码-毕业设计.zip
内容概要:本文探讨了三相异步电机的MARS(模型参考自适应)控制技术及其在Matlab中的仿真应用。首先介绍了三相异步电机的基本概念和特点,强调了其在电力工程和控制系统中的重要性和广泛应用。接着详细解释了MARS控制原理,即通过动态调整控制器参数,使系统能够适应外部环境变化和模型不确定性,从而提高电机的运行效率和稳定性。最后,通过具体的Matlab仿真实验展示了MARS控制算法的具体实现步骤,包括电机参数设置、控制算法编码、仿真结果分析等。 适合人群:从事电力工程、自动化控制领域的研究人员和技术人员,尤其是对先进电机控制技术和仿真工具有一定兴趣的专业人士。 使用场景及目标:适用于需要深入了解三相异步电机高级控制策略的研究项目或工业应用。主要目标是掌握MARS控制技术的工作机制,并能够在实际工作中运用Matlab进行相关仿真实验。 其他说明:文中提供的代码片段为初步实现MARS控制算法的示例,读者可根据具体需求进一步优化和完善。此外,文章还鼓励读者探索更多关于MARS控制技术的可能性和发展方向。
电子商务网站规划书.doc
内容概要:本文介绍了利用ABAQUS软件进行连续驱动摩擦焊接仿真的方法。首先,文章详细阐述了如何建立一个二维轴对称的热力耦合计算模型,以更真实地反映焊接过程中的热力行为。接着,重点讨论了两种关键的网格处理技术——网格重画(remesh)和网格求解变换(map solution),这两种技术分别用于提高计算精度和效率,以及适应材料变形和热传导变化。最后,通过实际代码片段展示了如何在ABAQUS中应用这些技术。研究结果表明,这种方法不仅能加深对摩擦焊接机理的理解,还能为优化焊接工艺提供重要参考。 适合人群:从事机械工程、材料科学及相关领域的研究人员和技术人员,尤其是那些希望深入了解摩擦焊接仿真技术的人。 使用场景及目标:适用于需要模拟和优化摩擦焊接过程的研究项目。主要目标是通过仿真技术提升对焊接过程的理解,改进焊接工艺,提高产品质量和生产效率。 其他说明:文中提供的代码片段可以帮助读者快速上手ABAQUS软件的相关操作,同时理论部分也为进一步研究提供了坚实的基础。
实训商业源码-电子数码产品配件网站源码-毕业设计.zip
内容概要:本文详细介绍了威纶通触摸屏程序设计中的60个实用案例,涵盖了从简单到复杂的多种功能实现方法。首先介绍了欢迎界面跳转的功能,通过系统寄存器设置开机后的自动跳转。接着讲解了配方查询功能,展示了如何将配方记录保存为CSV格式并进行查询。然后讨论了定时锁屏功能,推荐使用触摸事件绑定到全局脚本来实现更可靠的锁屏机制。最后深入探讨了曲线显示功能,采用双缓冲技术实现了实时数据显示和历史数据存储。文中还提到了一些注意事项和技术限制,如计时器精度、CSV文件大小限制以及数组长度限制等。 适合人群:从事工业控制系统开发的技术人员,尤其是熟悉威纶通触摸屏的开发者。 使用场景及目标:帮助开发者理解和应用威纶通触摸屏的各种实用功能,提高开发效率和系统可靠性。具体应用场景包括但不限于自动化生产线、设备监控、配方管理等领域。 其他说明:文中提供的代码片段均为经过实战验证的有效解决方案,但在实际项目中需要根据具体情况适当调整。同时提醒开发者关注威纶通平台的一些技术限制,避免因超出限制而导致的问题。
基于Python与MySQL日志监控报表系统.zip