Get controllers and finders

The following is a description of the changes to how InfoSphere® MDM uses and handles get controllers and finders.

Before OSGi

In InfoSphere MDM version 10.1 and earlier, controllers were Enterprise Java™ Beans. A controller was located by mapping a transaction name (a method name) to a specific controller or finder class in the TCRM.properties or the DWLCommon.properties file; for example:
####################################
# PARTY CONTROLLER METHODS         #
####################################
addFinancialProfile=com.dwl.tcrm.coreParty.controller.TCRMCorePartyTxnBean
addIncomeSource=com.dwl.tcrm.coreParty.controller.TCRMCorePartyTxnBean
addPerson=com.dwl.tcrm.coreParty.controller.TCRMCorePartyTxnBean
...
A transaction request, such as
<TCRMTxType>addPerson</TCRMTxType>
would be used to locate the correct controller class from the properties files. In the preceding example, the addPerson request is resolved to the com.dwl.tcrm.coreParty.controller.TCRMCorePartyTxnBean class in the TCRM.properties file.

With OSGi

Controllers are no longer Enterprise Java Beans in OSGi; instead they are Plain Old Java Objects and are now defined as OSGi services. The following is the service definition for the Party controller:
<service id="Controller.ITCRMCorePartyTxn" 
interface="com.dwl.tcrm.coreParty.interfaces.ITCRMCorePartyTxn">   
	<service-properties>
		<entry key="osgi.jndi.service.name">
		    <list>
		      <value>addPerson</value>  
		      <value>addAddress</value>  
		      <value>addPartyAddressPrivacyPreference</value>  
		      ...
		</entry>
	</service-properties>
	<bean class="com.dwl.tcrm.coreParty.controller.TCRMCorePartyTxnBean"/>
</service>
The following is the service definition for the Party Finder:
<service id="Finder.ITCRMCorePartyFinder" 
interface="com.dwl.tcrm.coreParty.interfaces.ITCRMCorePartyFinder">
	<service-properties>
		<entry key="osgi.jndi.service.name">
			<list>
				<value>searchOrganization</value>  
				<value>getIncomeSource</value>  
				<value>getPartyByAdminSysKey</value>  
				...  
			</list>
		</entry>
	</service-properties>
<bean class="com.dwl.tcrm.coreParty.controller.TCRMCorePartyFinder"/>
</service>	
Notice how the supported transactions are listed as service properties attached to a key called key="osgi.jndi.service.name". The list of all transactions supported by each controller must be included in the service property.
If you’ve created your own custom controllers that are being invoked by the InfoSphere MDM default business proxy, here is a template for you to follow:
<service id="Your_Service_Name" 
interface="Your Controller Interface Class">
	<service-properties>
		<entry key="osgi.jndi.service.name">
			<list>
				<value>A transaction</value>  
				<value>Another Transaction</value>  
				<value>One more Transaction</value>  
				...  
			</list>
		</entry>
	</service-properties>
<bean class="Your Controller Implementation Class"/>
</service>	

You must specify separate interfaces for your controllers. You can use the Extract Interface capability in IBM® Rational® Application Developer, IBM Rational Software Architect, or in Eclipse.