On Sunday, 8 May 2011 at 6:54 PM, Mathieu Baudier wrote:
* As long as FactoryFinders work the library will function
> > And leaves me with the following problem to wrestle with:
> > - Can we "fix" FactoryRegistery (and fold out code in behind it?)
> > - Or do we need to just flat out replace it
> I just bumped in the Apache Commons Discovery project (via an Apache
> announcement):
> http://commons.apache.org/discovery/
>
> "The Discovery component is about discovering, or finding,
> implementations for pluggable interfaces. It provides facilities for
> instantiating classes in general, and for lifecycle management of
> singleton (factory) classes. "
>
> I haven't looked at it in details and this seems a pretty recent
> project, but may be it could be worth looking whether we can use it or
> at least get inspiration from it.
> I like their use of generics; similar to netbeans lookup. Results in nice
> readable code.
I don't see an OSGi "hook" as part of their javadocs yet.
They really focused on finding "singletons" (ie a instance of a class).
They had two examples(http://commons.apache.org/discovery/best-practices.html);
one normal lookup (and no argument constructor) and one when a dependency was
needed (ie a method to configure the instance before use).
The fact is all the plugin implementations we find (OSGi included) address 1/2
of what GeoTools expects:
- they all offer "lookup" of an single instance (usually via no argument
constructor)
GeoTools also expects:
- managing a registry of factories according to their configuration
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel