Registering a new factory implementation
The BObjQueryFactory and BObjPersistenceFactory definitions consist of a service factory along with a key/value mapping.
About this task
The key mapping represents the interface of BObjQueryFactory or BObjPersistenceFactory, and the bean value class represents the BObjQueryFactory or BObjPersistenceFactory implementation.
BObjQuery and BObjPersistence factories get registered with their corresponding brokers, BObjQueryFactoryBroker and BObjPersistenceFactoryBroker.To a new factory implementation, take the following steps:
Procedure
Register your extended query factory implementation class
with the product by modifying the appropriate BObjQueryFactory and
BObjPersistenceFactory definition blueprint files for the module.
Example of BObjQueryFactory:
<service id="BObjQueryFactoryService" interface="com.ibm.mdm.common.servicefactory.api.BObjQueryFactory" ranking="10">
<bean class="com.ibm.mdm.common.servicefactory.BObjQueryFactoryImpl">
<argument>
<map>
<entry key="com.dwl.base.bobj.query.DWLBusinessServicesModuleBObjQueryFactory">
<bean class="com.ibm.mdm.commonentity.samples.bobj.query.XDWLBusinessServicesModuleBObjQueryFactoryImpl"/>
</entry>
<entry key="com.ibm.mdm.commonentity.samples.bobj.query.CommonEntitySamplesModuleBObjQueryFactory">
<bean class="com.ibm.mdm.commonentity.samples.bobj.query.CommonEntitySamplesModuleBObjQueryFactoryImpl"/>
</entry>
</map>
</argument>
<argument ref="blueprintBundle"/>
</bean>
</service>Example of BObjPersistenceFactory:<service id="BObjPersistenceFactoryService" interface="com.ibm.mdm.common.servicefactory.api.BObjPersistenceFactory">
<bean class="com.ibm.mdm.common.servicefactory.BObjPersistenceFactoryImpl">
<argument>
<map>
<entry key="com.ibm.mdm.commonentity.samples.bobj.query.CommonEntitySamplesModuleBObjPersistenceFactory">
<bean class="com.ibm.mdm.commonentity.samples.bobj.query.CommonEntitySamplesModuleBObjQueryFactoryImpl"/>
</entry>
</map>
</argument>
<argument ref="blueprintBundle"/>
</bean>
</service>