How to inject Transfer bean with model

I have a transfer decorator object and want to be able to use
functionality of a model called utils - iow inject the transfer
decorator with a model dependency. I have this (code snippets):

my transfer decorator object in models/decorators/menuDecorator.cfc

<cfcomponent output="false" extends=""

<cfproperty name="utils" type="ocm:utils" scope="variables">

  <cffunction name="addMenuItem" output="false">
    <cfargument name="rc" type="Struct">
    <cfset var local={}>

<cfdump var="#ocm#">

This gives me a "Variable OCM is undefined." error.

This is my code (snippets):

1) coldbox.xml:
    <!-- USE AUTOWIRING -->
    <Interceptor class="coldbox.system.interceptors.autowire">
      <Property name="debugMode">false</Property>
      <Property name="completeDIMethodName">onDIComplete</Property>
      <Property name="enableSetterInjection">false</Property>
    <!-- Transfer Loader -->
    <Interceptor class="coldbox.system.extras.transfer.TransferLoader">
      <Property name="ConfigPath">/transfer/config/transfer.xml</

      <Property name="definitionPath">/transfer/config/definitions</

      <Property name="datasourceAlias">cms</Property>

2) transfer.xml:
        <!-- This table contains metadata for menuitems -->
        <object name="menu" table="menus"

3) models/decorators/menuDecorator.cfc:

<cfcomponent output="false" extends="">

<cfproperty name="utils" type="ocm:utils" scope="variables">
<cfproperty name="ocm" type="ocm" scope="variables">

  <cffunction name="addMenuItem" output="false">
    <cfargument name="rc" type="Struct">
    <cfset var local={}>

<cfdump var="#ocm#">

This last functiuon is called from a model called menu. Right now I
solved my problem by moving the code I needed the utils model
functionality for from te menuDecorator to my menu model. I use DI
there and sent the result as an argument to the menuDecorator

Just wondering - is it possible _at all_ to use DI on a transfer
object? I can't believe it is not since am able to use DI on other

What did I leave out that this doesn't work?

Hi there. I think you’re getting the error because in your cfdump you’re looking for a variable named “ocm”, but you actually named the variable “utils”. Right?

That was a typo. It doens't work with <cfdump var="#ocm#">

And no, It also does not work with <cfdump var="#utils#">
I tried this

<cfproperty name="ocm" type="ocm" scope="variables">
<cfdump var="#ocm#">

to see if the ColdboxOCM was available at all but it was not.
Looks Transfer has no access to Coldbox at all.. Iuse the
transferloader to place a reference to the Transfer object in the
Coldbox cache (ocm:Transfer). But the other way around - Transfer
knowing of Coldbox - is not possible. I guess Coldbox doesn't tell the
Transfer object of it's existence. It doesn't work that way


Do you have code similar to the following in your coldbox.xml.cfm?

/${AppMapping}/config/transfer.xml.cfm /${AppMapping}/config/definitions betaAppsDsn shared.frameworks.transfer1_10.TransferFactory