Just to close off this one, in case anyone else searches for it,
here's what I've now got in place and working :-
ColdBox.cfc
=========
//Register interceptors as an array, we need order
interceptors = [
//Autowire
{class="coldbox.system.interceptors.Autowire",
properties={}
},
// Transfer - Enrolnow
{class="coldbox.system.orm.transfer.TransferLoader",
properties={
configPath = "/config/xxxxx",
definitionPath = "/config/definitions/",
datasourceAlias = "xxxxxxx",
loadBeanInjector = true,
transferFactoryCacheKey = "TransferFactory_EnrolNow",
transferCacheKey = "Transfer_EnrolNow",
transferTransaction = "TransferTransaction_EnrolNow",
beanInjectorProperties = {
useSetterInjection = false
}
}
},
// Transfer - SITS
{class="coldbox.system.orm.transfer.TransferLoader",
properties={
configPath = "/config/xxxxxx",
definitionPath = "/config/definitions/",
datasourceAlias = "xxxxxxxxxxxx",
loadBeanInjector = true,
transferFactoryCacheKey = "TransferFactory_SITS",
transferCacheKey = "Transfer_SITS",
transferTransaction = "TransferTransaction_SITS",
beanInjectorProperties = {
useSetterInjection = false
}
}
}
];
In the lightwire configuration file I've now got this....
<!-- Coldbox -->
<bean id="ColdboxFactory" class="coldbox.system.ioc.ColdboxFactory" /
>
<bean id="Coldbox" factory-bean="ColdBoxFactory" factory-
method="getColdbox" />
<bean id="ColdboxOCM" factory-bean="ColdBoxFactory" factory-
method="getColdBoxOCM" />
<!-- Transfer -->
<!-- Enrol -->
<bean id="Transfer_EnrolNow" factory-bean="ColdBoxOCM" factory-
method="get">
<constructor-arg name="objectKey"><value>Transfer_EnrolNow</value></
constructor-arg>
</bean>
<!-- SITS -->
<bean id="Transfer_SITS" factory-bean="ColdBoxOCM" factory-
method="get">
<constructor-arg name="objectKey"><value>Transfer_SITS</value></
constructor-arg>
</bean>
So if I need any of these in my services I just pass them in like
so....
<!-- Login -->
<bean id="LoginFacade" class="model.login.LoginFacade"
singleton="true">
<constructor-arg name="Coldbox">
<ref bean="Coldbox" />
</constructor-arg>
<constructor-arg name="Transfer">
<ref bean="Transfer_EnrolNow" />
</constructor-arg>
</bean>
A very special thanks to Tom de Manincor for his help on getting this
up and running ;-).
Cheers,
James