GlassFish as windows service

被刻印的时光 ゝ 提交于 2019-12-25 05:03:41

问题


I am using GlassFish 3.1.2. I want to create a service of GlassFish so that each the system start it will automatically start the GlassFish domain.

In default domain domain1, there is a cluster cluster1 having two instances instance1 and instance2.

But when I use the command...

asadmin>domain1Service.exe start

It starts the domain, but clusters are not started. So How can I make a service which can start clusters ??

Do I have to create separate service for each instance within a cluster ??


回答1:


We can create service over cluster instance in GlassFish.

For that we have to create separate service for each instance. This command is used to create service for each an instance..

asadmin>>create-service --nodedir <<node-dir location>>  <<node-name>>

Thanks, Gunjan.




回答2:


It sounds like you are running this on a windows machine, so I would write a batch script (.bat) that executes the appropriate asadmin commands.

asadmin start-domain --user admin --passwordfile adminpassword.txt domain1

asadmin start-cluster --user admin --passwordfile adminpassword.txt cluster1

Than I would setup the service to point at the batch file.



来源:https://stackoverflow.com/questions/9819605/glassfish-as-windows-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!