Win a copy of Practice Tests for OCP Java 17 Certification Exam (1Z0-829) this week in the OCPJP forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Start and Shutdown a java batch process

 
Ranch Hand
Posts: 264
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Everyone,

I am builing a window based start and shutdown bat file to run and stop a batch process. I could start the service/process by running bat file, but how to shutdown that, as my shutdown bat runs in separate jvm, how can i use it to stop the other server which i started using start.bat. Do i need jmx here or any
other easy way. Can i get some help of Classloader.

Please help.
 
Bartender
Posts: 1638
IntelliJ IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It seems from your post that you are talking about remotely stopping a service/jvm.
Yes, JMX is a viable solution in this case.

Moving it to Intermediate forum. If you want to discuss specifically about JMX then we can move it to Other Java APIs forum.
 
Bartender
Posts: 2907
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if you are looking for a a simpler solution, think abt suff that can be accessed by two seperate programs in two seperate jvms

1. Files. (take care of read write locks)
2. Database. (can also serve as a logger)


nothing else comes to mind, but i m sure there are plenty
 
salvin francis
Bartender
Posts: 2907
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
on a second thought, RMI works on a seperate JVM (even at same machine) it can be a solution

I would still prefer you look at JMX, these are kind of work arounds.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic