• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Programatically start/stop JBoss

 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello.

I'm trying to programatically start and stop JBoss server, but I'm having some problems. Actualy, my code to start/stop is as follows:



In the classpath I have added the run.jar and shutdown.jar from the bin directory of JBoss. Now the problem comes when I start JBoss where I receive the following exceptions:



If I remove the shutdown.jar from the classpath, I can start JBoss without problems, but then, I don't have any option to stop it.

Any other way to start/stop JBoss programatically.

Thanks,
Miguel
 
Ranch Hand
Posts: 531
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to emulate most everything the start and shutdown scripts do. Why not run JBoss as a service or simply execute the scripts programatically?
 
Miguel Roque
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.

I've emulated the start and shutdown sctipts and that's why I'm facing this problems. I don't want to have JBoss as a service, as I don't need it to be constantly running and I want to be able to start and stop it as needed and without having the DOS windows on it.

Miguel
 
Rick O'Shay
Ranch Hand
Posts: 531
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Miguel Roque:
Hi.

I've emulated the start and shutdown sctipts and that's why I'm facing this problems. I don't want to have JBoss as a service, as I don't need it to be constantly running and I want to be able to start and stop it as needed and without having the DOS windows on it.

Miguel



Perhaps you can exec the scripts? In other words just launch the scripts programatically?
 
Miguel Roque
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Rick.

I've done it by launching the scripts but it gives me a problem that is, how to capture the output so that I can know when the server as started and if it as started without problems.

Thanks,
Miguel
 
Without deviation from the norm, progress is not possible - Zappa. Tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic