This topic has not yet been written. The content below is from the topic description.
emptySet = Collections.emptySet(); /** * Get a set of root resource and provider classes. The default lifecycle * for resource class instances is per-request. The default lifecycle for * providers is singleton. * 3.3. javax.ws.rs.core.Application The javax.ws.rs.core.Application class is a standard JAX-RS class that you may implement to provide information on your deployment. It is simply a class the lists all JAX-RS root resources and providers. /** * Defines the components of a JAX-RS application and supplies additional * metadata. A JAX-RS application or implementation supplies a concrete * subclass of this abstract class. */ public abstract class Application { private static final Set * Implementations should warn about and ignore classes that do not * conform to the requirements of root resource or provider classes. * Implementations should warn about and ignore classes for which * {@link #getSingletons()} returns an instance. Implementations MUST * NOT modify the returned set. * * @return a set of root resource and provider classes. Returning null * is equivalent to returning an empty set. */ public abstract Set> getClasses(); /** * Get a set of root resource and provider instances. Fields and properties * of returned instances are injected with their declared dependencies * (see {@link Context}) by the runtime prior to use. * * Implementations should warn about and ignore classes that do not * conform to the requirements of root resource or provider classes. * Implementations should flag an error if the returned set includes * more than one instance of the same class. Implementations MUST * NOT modify the returned set. * * The default implementation returns an empty set. * * @return a set of root resource and provider instances. Returning null * is equivalent to returning an empty set. */ public Set getSingletons() { return emptySet; } } To use Application you must set a servlet init-param, javax.ws.rs.Application with a fully qualified class that implements Application. For example: Resteasy org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher javax.ws.rs.Application com.restfully.shop.services.ShoppingApplication If you have this set, you should probably turn off automatic scanning as this will probably result in duplicate classes being registered.