tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@tomitribe.com>
Subject Re: jax-rs @Path annotation scanning
Date Wed, 22 Oct 2014 12:42:20 GMT
Hi

tomee scans out of the box for it. Here some rules:
1) no application class: app is scanned
2) application class(es) exist
   a) they are deployed respecting getClasses()/getSingleton()
   b) if getClasses() = getSingleton() = empty set => we do 1 but
respecting potential @ApplicatinoPath
3) if you define a servlet in web.xml which has as init param jaxrs
Application fqn then we use it as @Applicatinopath

Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014-10-22 14:38 GMT+02:00 Emmanuel Touzery <emmanuel.touzery@lecip-its.com>:
> Hello,
>
>     I know that in glassfish it's possible to do something (with the web.xml
> IIRC) and all the services with @Path annotation are automatically taken
> into account by the container. We ported a GF application to tomee and the
> way we have it configured now is by listing every JAX-RS service manually in
> a class inheriting Application. I tried quickly scanning the classpath
> manually to find classes with the @Path annotation but it was quite slow and
> I'm pretty sure something like that must be supported through some option or
> optional setup?
>
>     So, how we go about to enable that scanning and spare ourselves that
> typing everytime we add a new JAX-RS service?
>
>     Regards,
>
> Emmanuel

Mime
View raw message