mathieuancelin / weld-osgi

This project aims to provide an OSGi integration for Weld. This project is no longer updated, see https://github.com/weld/core for updates
https://github.com/weld/core
12 stars 10 forks source link

@Publish without contract or interface currently fails #25

Closed arcane86 closed 13 years ago

arcane86 commented 13 years ago

Using an @Publish annotation without providing a contracts value on a class that implements no interface leads to no service publication. It's due to the Weld proxy interfaces that are blacklisted but still taken into account in service.getClass().getInterfaces(). It avoids the publication using the implementation class.

mathieuancelin commented 13 years ago

No way !!! Anyway, It's not a good idea to publish a service without an interface, I don't see the point to do that. WDYT ?

arcane86 commented 13 years ago

I agree that's not a good idea but i think we should take this case into account. As well as the case where the service is published while extending a (abstract) class and not an interface. It's not good code but it can be useful for quick testing or other stuff.