JBoss adds a Windows service while periodically restarting

Source: Internet
Author: User
Tags mssqlserver jboss wildfly

One, added as a Windows service

  Go to directory \wildfly-9.0.2s-all\bin\service\ edit Service.bat, modify the parameters

Set Shortname=samexappserver--service name
Set Displayname= "Samexappserver"
Set description= "Samex Wildfly application Server"

SET java_home=d:\java\jdk1.7.0_51

Right-click Wildfly-service.exe to execute and then enter service to see Samexappserver.

Second, timed restart

  Because SQL Server database consumes more memory, you need to reboot the database as well as restart JBoss.

To write the restart bat script:

@echo off
echo Stop Samex
net stop Samexappserver
echo Stop Databaseagent
net stop SQLServerAgent
echo Stop Database
net stop MSSQLSERVER

Ping-n 3 127.0.0.1>nul

echo Start Database
net start MSSQLSERVER
echo Start databaseagent
Net start SQLServerAgent
echo Start Samex
net start Samexappserver

Then, go to the Control Panel-management tool-Task Scheduler, which defines a task that executes 1 o'clock in the morning every day.

  

  

JBoss adds a Windows service while periodically restarting

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.