• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Regarding Jboss Restart through Java Coding

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

This is Santhosh i need to restart jboss through java coding, I do not know how to make code in java please help me.




Thanks in advance
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You said 'restart' so I assume that the app server is running already.

To stop the app server, you can do one of two things:
a) Use Runtime.exec() to call the shutdown script
b) Call the server MBean to shut down the app server (see how the shutdown script goes about this, and look at the org.jboss.Shutdown class in the source)

To start the app server, use Runtime.exec() to run the run script.

Or you could create a script to do the stop and start and simply call that script using Runtime.exec(). The service.bat and jboss_init_*.sh scripts contain such script code.
 
santhosh kumar vk
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

This is santhosh your document is very nice but i need script to restart the Jboss, in my project i have one screen that screen shows all the keys and values from struts resource bundle if we change any values in that screen it should affect all the screen but it is not working without restarting the jboss please help me.

Thanking You.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

santhosh kumar vk wrote:hi,

in my project i have one screen that screen shows all the keys and values from struts resource bundle if we change any values in that screen it should affect all the screen but it is not working without restarting the jboss please help me.


So you are trying to restart the server through your program whenever someone changes a value on the screen, just so that it gets reflected across the application? That's not the right way to do it. You should first find why the changed value is not being reflected across the application and then try to fix that part.
 
santhosh kumar vk
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

You are telling correct but we are doing ERP Product so we have to sale to different customer at the time customer like to change the labels in that screen suppose we make this type of screen that would be helpful for ours and customer they can change the labels that is why i am asking please help me.

Advance Thank You.
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Provide a separate configuration application what displays the Struts resources. When the customer commits the changes, the app packages the bundle and deploys the real app.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic