On Sat, Sep 14, 2013 at 8:37 AM, Akhil Anil <akhil.ka...@gmail.com> wrote:

> How do I register my new project as a service under META-INF/services.
>
> just like
>
> *
> /modules/implementation-widget-runtime-dojo/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.ComponentJavaScriptGenerator
> *
> *
> *
> I created
>
> /modules/implementation-widget-runtime-*jquery*
> /src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.ComponentJavaScriptGenerator
> *
> *
>
>
> I found the service fetching is done in Line 176
> org.apache.tuscany.sca.extensibility.ContextClassLoaderServiceDiscoverer.ServiceDeclarationImpl.getServiceDeclarations(String
> serviceName)
>
> But what is happening under the hood of getResources(name). My bad.
>
>
>
We discover the concrete implementation of a given interface, by adding a
META-INF/services/interface and inside the file add the concrete
implementation class and any configuration required.

getResource asks the classLoader to find the files by name, and will read
the concrete details inside it.

Hope this clarifies a bit.

-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Reply via email to