Hi! I'd like to have a component, with normal requires and provides, which are satisfied in the normal manner. However, when the component has been activated and a request for the service is made, I need to use an other object as implementation for the provided service, rather than an instance of the implementation mentioned in the component description. This is part of a legacy implementation, where the implementation of the interface provided is separated from the class doing the life cycle (this class incidentally creates the instance of the class providing the interface that I need, so I can't make a separate component which just depends on the life cycle component either). I also don't want to make a wrapper (or proxy..), as there are a bunch of these cases, and I would to solve it in a general manner.
Can I use factory components for this? I tried to understand the compendium, but it appears to be very brief on this matter. If this cannot be done with factory components, could someone please explain how to use factory components? Who calls newInstance? (Does it have to be done explicitly?) I hope my question was halfway comprehensible, it felt pretty confusing to me... :) Thanks, Fredrik. _______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
