[WFLY-838] Don't throw exceptions for jsr 77 queryObjectNames()

This replaces #6545