-
1. Re: enable/disable a subsystem at Runtime ?
sfcoy Jun 19, 2013 2:23 AM (in response to fillg1)1 of 1 people found this helpfulYou may find it simpler to use a firewall to temporarily block the http port to the machine.
For example, if your servers are linux based you could use iptables to do this.
-
2. Re: enable/disable a subsystem at Runtime ?
erasmomarciano Jun 19, 2013 5:53 AM (in response to fillg1)Hi
I think that you can not disable the subsystem web runtime.
But you can enable and disable in runtime your web-app.
-
3. Re: enable/disable a subsystem at Runtime ?
fillg1 Jun 19, 2013 6:06 AM (in response to sfcoy)The firewall / iptables approach is a good idea in my opinion, we can put the needed commands in a script and after the server has done its work we simply stop it.
-
4. Re: enable/disable a subsystem at Runtime ?
erasmomarciano Jun 19, 2013 6:11 AM (in response to fillg1)If you think that The firewall / iptables approach is a good idea you can make od the scripts with iptables.
exmaple :
./start_enable_http
./start_disable_http
Do you know iptables?
-
5. Re: enable/disable a subsystem at Runtime ?
fillg1 Jul 2, 2013 6:22 AM (in response to fillg1)I have found a working approach using the ServiceRegistry
serviceRegistry.getService(ServiceName.JBOSS.append("web", "connector", "http").setMode(Mode.PASSIVE)
....
serviceRegistry.getService(ServiceName.JBOSS.append("web", "connector", "http").setMode(Mode.ACTIVE)
but is there a way to get a reference to the ServiceRegistry without defining a (dummy)Service and using the value from the ServiceActivationContext ?