autowire in the coldboxproxy

Hi,

I'm using wirebox propert injection through-out my app (ColdBox 3 M6),
but it doesn't work in the coldboxproxy. Is autowiring not supported
in the coldboxproxy?

My proxy looks like:

component extends="coldbox.system.remote.ColdboxProxy"
{
  property name="BookingService" inject="model:booking.BookingService"
scope="instance";

  remote array function thisworks( required date theMonth )
  {
    return
getModel( "booking.BookingService" ).getBookedDaysForMonth( arguments.theMonth );
  }

  remote array function thisfails( required date theMonth )
  {
    return
instance.BookingService.getBookedDaysForMonth( arguments.theMonth );
  }

}

Thanks,

- John

Hi John Whish,

To achieve this, you may use geModel("booking.BookingService");

As of now, Proxy is not auto-wired and will not be as well, Proxy
object is directly exposed to request.

Thanks
Sana

Yes proxies are created by Coldfusion on a request basis so no wiring is available.

Thanks guys, I’m using getModel(), but just wanted to check I wasn’t being missing something :slight_smile: