resources declared in application.xml apply to the entire application, and need to be in java:app namespace. Resource names in java:module, java:comp, or unqualified names should not be processed.
In the current implementation, injections of such incorrect resources are honored as if they were declared in the current module or component namespace. But lookup of such incorrect resources does fail as expected.
The reason could be, the injection is performed by the container on behalf of the application. The container may have a broader view than the application doing lookup.