Rickard Öberg wrote: > Tonny Kohar wrote: > >> On Thu, Mar 5, 2009 at 9:32 AM, Rickard Öberg <[email protected]> wrote: >> >>> Tonny Kohar wrote: >>> >>>> Just wondering is it possible to return Class<?> rather than returning >>>> String. Because with the Class<?> I could easily pin point the Service >>>> ? >>>> If it is not posible, just ignore this questions >>>> >>> Why would it make a difference if you had the class? The class is >>> definitely not unique, and not even id+class is *guaranteed* to be >>> unique. I think the only way to get it truly unique is to use paths. >>> >>> >> Oh I see, previously I thought package + class is unique in Java >> > > True, but the point is that a service is an instantiation, and not the > class. So, you can have the *same* service class instantiated many > times, with different identifiers. So to specify a service instance, > which is what is important here, the id is more important than the class. > > /Rickard > > > _______________________________________________ > qi4j-dev mailing list > [email protected] > http://lists.ops4j.org/mailman/listinfo/qi4j-dev >
You can even have totally different classes (different physical class files) with the same fully qualified Name instantiated, if they reside in a different classloader space. Popular example is OSGi. Georg _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

