javaService实现tomcat jboss 注册windows服务
来源:互联网 发布:17寸笔记本 知乎 编辑:程序博客网 时间:2024/05/17 17:18
Example Scripts
As part of the standard JavaService distribution, a number of example scripts are provided.These can be used to install and configure the relevant application software, subject to anychanges required for your specific environment.
These example files are held in the JavaService/scripts sub-directory, according to wherever youhave unpacked the distribution zip file. The available scripts are as follows:
- InstallOrion.bat / UninstallOrion.bat
- Orion Application Server scripts
- InstallTomcat.bat / UninstallTomcat.bat
- Tomcat service scripts
- InstallJBoss.bat / UninstallJBoss.bat
- JBoss 3.x Application Server scripts
If you have developed software or scripts so that JavaService can work with other applications,it would be appreciated if you could submit these for inclusion in future releases of this Open Source software.
Orion Application Server Installation
The Orion Application Server is a J2EE-compliant product that runs under the Java run-time environment. The JavaService utility provides a convenient mechanism to run this program as an NT Service.
As the application server requires that an associated database server is already running, there is a need to add a Windows NT Service dependency to the Orion Java Service. The example below shows how this can be defined, with a dependency on the MySql database service in this case. {JDK_HOME} is the location of your JDK and {ORION_HOME} is the location of your Orion installation. The administrator username and password fields also need to be substituted in this command. Please note that this has been used successfully against the V1.5.2 OrionServer release, but is in any case provided 'as is'.
- Copy the JavaService.exe file into the {ORION_HOME} directory as OrionServer.exe.
- Start a command prompt and change to the directory {ORION_HOME}.
- Run the following command:
OrionServer.exe -install Orion
{JDK_HOME}/jre/bin/{hotspot|server|classic}/jvm.dll
-Djava.class.path={ORION_HOME}/orion.jar;{JDK_HOME}/lib/tools.jar -Xms64M -Xmx256M
-start com.evermind.server.ApplicationServer
-stop com.evermind.client.orion.OrionConsoleAdmin
-params "ormi://localhost admin_username admin_password -shutdown"
-out {ORION_HOME}/log/stdout.log
-err {ORION_HOME}/log/stderr.log
-current {ORION_HOME}
-depends mysql
-manual
-append
-description "Orion Application Server" - To remove the registered service, run the following command from the same directory:
OrionServer.exe -uninstall Orion
The Orion service can then be started by issuing the following command, which will also start the MySql service beforehand if it is not already running:
net start orion
The Orion service can then be stopped by issuing the following command:
net stop orion
The MySql database service may be stopped as normal by issuing the following command:
net start mysql
This will first stop the Orion service, if it is currently running, following user confirmation.
Tomcat Server Installation
Tomcat is a JSP engine and was the primary reason that JavaService was created. It is a pure Java application that is ideally used as a service, but comes with no native ability to do so.
The following example shows how JavaService can be used to run Tomcat 3.1 as an NT service. The ideas shown here apply to using JavaService with any Java application that needs to run as an NT service. {JDK_HOME} is the location of your JDK and {TOMCAT_HOME} is the location of your Tomcat installation.
- Copy the JavaService.exe file into the {TOMCAT_HOME}/bin directory as tomcat.exe.
- Start a command prompt and change to the directory {TOMCAT_HOME}/bin.
- Run the following command:
tomcat.exe -install Tomcat
{JDK_HOME}/jre/bin/{hotspot|server|classic}/jvm.dll
-Djava.class.path={TOMCAT_HOME}/bin/bootstrap.jar;{TOMCAT_HOME}/bin/servlet.jar;{JDK_HOME}/lib/tools.jar
-Dcatalina.home={TOMCAT_HOME}
-start org.apache.catalina.startup.Bootstrap
-params start
-stop org.apache.catalina.startup.Bootstrap
-params stop
-out {TOMCAT_HOME}/logs/stdout.log
-err {TOMCAT_HOME}/logs/stderr.log
JBoss Server Installation
The JBoss server software provides a Java run-time environment that can be used for JSP and J2EE applications. In this use, it often needs to be run as a Windows NT System Service, for which the JavaService utility is designed.
Depending on configuration, JBoss may require that an associated database server is already running, which should be set up as a Windows NT Service dependency, with the example below set up against the MySql database. {JDK_HOME} is the location of your JDK and {JBOSS_BIN} is the location of your JBoss binaries installation. These instructions are based on information in the JBoss 3.0 quick-start guide, but are in any case provided 'as is'.
- Copy the JavaService.exe file into the {JBOSS_BIN} directory as JBossService.exe.
- Start a command prompt and change to the directory {JBOSS_BIN}.
- Run the following command:
JBossService.exe -install JBoss
{JDK_HOME}/jre/bin/{hotspot|server|classic}/jvm.dll
-Djava.class.path={JDK_HOME}/lib/tools.jar;{JBOSS_BIN}/run.jar
-start org.jboss.Main
-stop org.jboss.Main -method systemExit
-out {JBOSS_BIN}/stdout.log
-err {JBOSS_BIN}/stderr.log
-current {JBOSS_BIN}
-depends mysql
-manual
-overwrite - To remove the registered service, run the following command from the same directory:
JBossService.exe -uninstall JBoss
The JBoss service can then be started by issuing the following command, which will also start the MySql service beforehand if it is not already running:
net start jboss
The service can then be stopped by issuing the following command:
net stop jboss
- javaService实现tomcat jboss 注册windows服务
- JavaService 注册windows服务
- 使用javaservice 将jboss 注册为服务
- 使用javaservice 将jboss 注册为服务
- javaservice wrapper 实现注册服务功能
- 用JavaService将JBoss设置为windows系统服务
- 用JavaService将JBoss设置为windows系统服务
- Java实现Windows系统服务 JavaService
- Java用JavaService实现Windows系统服务
- Java用JavaService实现Windows系统服务
- java jar包注册成Windows 服务 JavaService
- Tomcat、Weblogic、Jboss在windows下注册服务的方法
- JavaService注册winNT系统服务
- JBOSS注册Windows系统服务
- Jboss注册成Windows服务
- 使用JavaService生成windows服务
- JavaService创建windows系统服务
- 使用javaService将jboss启动 关闭添加到windows的服务
- 分页
- PB命令行——查看DLL导出函数
- 误差来源
- DELPHI中的快捷方式一览(完全正式版)
- Pass It Forward
- javaService实现tomcat jboss 注册windows服务
- Hibernate进行大数据量性能测试
- 职场对话
- 进行浮点比较
- wince串口打印函数是如何实现的?
- hibernate映射文件配置的dynamic-insert属性配置
- Struts2中的链接标签
- 如何把微软SD卡驱动移植到BSP下
- 装了Ce6后VS2005不能连接连线调试的解决