Fixes #1798
Allow AtmosphereResourceFactory to be defined in META-SERVICE
Improve logic
Rollback this changes #1798