Hi All,

Evaluating the code of the REST services, Angelo and I identified two issues 
with the current implementation:


-          The current implementation of the Apache Wink application bundle 
embeds the JAX-RS packages and exports them. REST services using JAX-RS should 
add JAX-RS annotations which packages are provided by the Wink application 
bundle. This causes an unwanted dependency between the Wink bundle and the REST 
service bundle.

-          In the current implementation a ServiceTracker is used to listen to 
the availability of _any_ service, checking if its class contains the @Path 
annotation. This service must implement _an_ interface (no matter which one) in 
order for this to work properly. Especially the fact that the service should 
implement _any_ interface is error-prone and should be improved.

There are two possible solutions:

-          Introduce a new bundle with some RESTService interface, implemented 
by REST services and picked up whiteboard style by the Wink application bundle 
to register them in the Wink framework. Also the JAX-RS classes should be moved 
to this bundle.

-          Package the RESTService interface and JAX-RS classes in each bundle 
that wants to expose a REST service and export as well as import the 
RESTService interface package (note that each RESTService will export and 
import this same package, including the Wink application bundle)

Regards, Ivo and Angelo

GX | Ivo Ladage-van Doorn | Product Architect | Wijchenseweg 111 | 6538 SW 
Nijmegen | The Netherlands | T +31(0)24 - 388 82 61 | F +31(0)24 - 388 86 21 | 
ivo.ladage-vandoorn at gxsoftware.com<mailto:ivo.ladage-vandoorn at 
gxsoftware.com> | www.gxsoftware.com<http://www.gxsoftware.com> | 
twitter.com/GXSoftware<http://twitter.com/GXSoftware>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://lists.amdatu.org/pipermail/amdatu-developers/attachments/20101008/092ac439/attachment.html
 

Reply via email to