I would like to ask if there is a way to combine managed service factories
and factory-method.
Instead of specifying the managed-component class, for example:
<cm:managed-service-factory
id="testFactory" factory-pid="testfactory" interface="my.iface"
auto-export="all-classes">
<cm:*managed-component class="my.iface.Impl"* />
</cm:managed-service-factory>
I would like to be able to specify a factory bean and a factory method:
<cm:managed-service-factory
id="testFactory" factory-pid="testfactory" interface="my.iface"
auto-export="all-classes">
<cm:*managed-component factory-bean="someBean"
factory-method="someMethod"* />
</cm:managed-service-factory>
Is this possible, or is there an alternative way I haven't think of?
--
*Ioannis Canellos*
*
http://iocanel.blogspot.com
Apache Karaf <http://karaf.apache.org/> Committer & PMC
Apache ServiceMix <http://servicemix.apache.org/> Committer
*