aspose file tools*
The moose likes JBoss/WildFly and the fly likes problem in creating window service of multiple instances of jboss6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "problem in creating window service of multiple instances of jboss6" Watch "problem in creating window service of multiple instances of jboss6" New topic
Author

problem in creating window service of multiple instances of jboss6

bablu singh
Greenhorn

Joined: Nov 14, 2011
Posts: 7
Hi all,

I have created 3 instances of jboos6 on same. If i start using
run.bat (default)
run.bat -c ports-01 (ports-01)
run.bat -c ports-02 (ports-02)
on three different command prompt screens, its working fine.

On the other hand, if i want to make a window service using service.bat utility - i am able to run only one instance of jboss6.
For that i have copied the service.bat file and named it service2.bat and changed (r to r2, run to run2, shutdown to shutdown2)
call run.bat -c ports-01 < .r2.lock >> run2.log 2>&1
then i have installed service and service2.bat files, but only one is visible in services.msc screen that is installed first.

The problem is, even installing service2.bat i am not able to start using window service, where is the problem?
Please advice...
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5837
    
    7

You also need to change the SVCNAME (required) and the SVCDISP, SVCDESC (optional):




JBoss In Action
bablu singh
Greenhorn

Joined: Nov 14, 2011
Posts: 7
Thanks for the reply.
My two instances are running successfully, when i installed third service3.bat i got an error:

The JBoss Application Server 6.0.2 service on local computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service.

What can be the reason??? Thanks Again.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5837
    
    7

You will need to check the logs to see if there was an error. Also check the redirected stdout/stderr (the runx.log).
bablu singh
Greenhorn

Joined: Nov 14, 2011
Posts: 7
Yes, i got it!!!
Actually i was writing wrong service.bat file in service3.bat.
Now three instances with window service is running properly.

Thanks for help.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5837
    
    7

Yes, this is what can happen if you manually change each serviceN.bat file and have the same value in multiple places. You might want to check out the modified service.bat that I provide with the source code for JBoss in Action. If you grab the source zip, it will be at ch15/src/service/windows/service.bat. Note that everything is set up front using property values, and that the ch15/build.xml sets the properties for each service, creating unique bat files for each one.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in creating window service of multiple instances of jboss6