Full disclosure I haven’t used remote CFC’s in years (I stick to REST these days), that said however… if my memory serves me correctly a remote component’s
init() function is called when it’s instantiated just like any other CFC, so you should just be able to put your variables there (e.g.
variables.myVariable = 'foo') and then use it elsewhere in other functions.
Or you could use
property name="myVariable" type="myType" default="myValue"; in the component definition and achieve the same results. And doing this you could set
acceessors=true in the component and use
getMyVariable() in other functions (or simply
variables.myVariable if you prefer not setting
Worse case you try it and I’m wrong, but I’m pretty sure a CFC is a CFC is a CFC in terms of instantiation.
EDIT: Actually, I was using Taffy for awhile a couple years ago, which uses remote methods in CFCs now that I think about it, and I’m pretty sure I did this kind of thing on the regular.