Okay here is a slightly wilder idea; combined with a very good article: Article first with a nice background on Factory SPI moving on to the netbeans LookUp (think container, inversion of control etc...) - http://java.sun.com/developer/technicalArticles/javase/extensible/
NetBeans has suffered another release [1]; this one supporting two things of interest: - OSGi integration - LookUp is now a separate module So I wonder how they made LookUp work in an OSGi environment? It is the same problem we face. Jody [1] http://java.dzone.com/articles/best-netbeans-69 On 18/06/2010, at 6:17 AM, Mathieu Baudier wrote: >> Mathieu - one thing that may help is that we have all our GeoTools code >> using the same "factoryregistery" class to check factory spi (and to hold >> onto a singleton of each factory found). We have extended this factory >> registery in a few cases to allow people to "register" additional >> implementations. > > This is interesting. > That would probably be the right place to do tricks with the context > class loader. > > Where is (are) this code located? > >> So perhaps: >> - we could try generating additional entries for the MANIFEST.MF based on >> the services/ directory >> - we could process these additional entries of the MANIFEST.MF and >> "register" these additional factories with the appropriate register > > I don't really get what you mean here. > Could you please be a bit more explicit? (like with an example) > > What do you think of the approach with the fragments that I described > in my previous mail? > Is this what you are thinking of? > (I usually solve many of my OSGi problems with fragments) ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
