On Wednesday 26 December 2007 20:06, David Leangen wrote:
> However, to actually be useful to consumers (ex: UI dev and such), I need
> to cast each Vehicle to its particular domain.

Sounds to me you are not giving a proper example.

If BundleA only knows of Vehicle, it will only import Vehicle, and if BundleB 
is then a SkateboardEditor it will know of Skateboard and hence import 
Skateboard.

My guess is that you in reality are talking about various systems that take a 
descriptor of a class, such as a String or a marshalled object of some sort, 
and that generic system tries to load the class into existence. I am talking 
about Hibernate, reading Properties files with classnames filled out by 
third-party, and so forth.

My advice is to indeed look into a Service approach. Hibernate needs to 
consult "someone" in the HibernateBundle, which will ask for a provider in 
the OSGi Service Registry to hand back the class needed, for instance.


Cheers
-- 
Niclas Hedhman, Software Developer

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug
_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev

Reply via email to