This content has been marked as final.
Show 1 reply
-
1. Re: Wildfly 10. Startup Event.
dzcs May 3, 2018 11:31 AM (in response to dzcs)I have solved problem myself. Right now implemented very pragmatic solution. In simplified code it looks like following:
final String serverState = "" + ManagementFactory.getPlatformMBeanServer()
.getAttribute(new ObjectName("jboss.as:management-root=server"), "serverState");
if (!"running".equalsIgnoreCase(serverState)) {... here requred code ...
}unfortunately have to poll this using timer. If there is any possibility to use notifications - would be nice.