0

Good time. Can you tell me, how i can stop application in websphere from my application? I'm doing some changes in application in listener when application was start. And if my changes not apply -> application must stop.

My method is called from listener.

qizer
  • 519
  • 2
  • 6
  • 14
  • Are you asking: (1) how to stop appA from appB, or (2) how to prevent appA from fully starting if it detects that it should not start? – Brett Kail Dec 04 '13 at 15:36
  • second, how to prevent appA from fully starting if it detects that it should not start – qizer Dec 05 '13 at 07:15

1 Answers1

1

Some options:

  1. Add an EJB @Startup @Singleton to the application, and throw an exception from @PostConstruct if the application should not start.
  2. Add a ServletContainerInitializer or ServletContextListener to the application, and throw an exception if the application should not start.
  3. Use the WebSphere-specific AppStartUp interface, and return false if the application should not start.
Brett Kail
  • 33,593
  • 2
  • 85
  • 90