Both as7 domain and standalone mode have the management port on 9990.
So it is possible to start a server in standalone mode, have it detected by RHQ and then shut the server down and boot it in domain mode.
As the plugin expects standalone mode it will e.g. run any operation against subsystems against an address of /subsystem=* which is not present, as those live in domain mode below /profile=*/subsystem=*
So the as should check (at least in ResourceComponent.start) for the running mode and throw a ResourceError if the mode detected at discovery does not match the mode at component start time,
Actually as getAvailability() is calling into the server, the check could be done there, but there is no way to convey the wrong start mode back to the user.

master bf612201cbd5
This is opposed to the previous comment done via getAvailability(). If the server is not reachable,
down is returned. If it is up and the launch-type attribute matches the discovered mode, up is returned,
otherwise an exception is thrown, that shows up in the UI in the ResourceError area (yellow triangle)