This is a feature I dreamed about today. Currently the coldbox proxy needs to live inside of coldbox application, so that the Application.cfc can bootstrap the correct application. This is great and dandy, no work to do in the proxy.
However, what if I want to create an event gateway or anything else BUT place the proxy on another location? Well, you can't. Therefore, create some other utility methods where you can actually call the bootstrapper. Two requirements will be needed here:
- Application Mapping (Which Coldbox app to connect to)
- Coldbox.xml.cfm Location (Which configuration file to use for that Application)
That's it. As you can see, we are already doing this on the baseTest to achieve unit testing capabilities within ColdBox. This will be an extension into the proxy and the user, will only need to do the following:
- Set the application mapping property
- Set the coldbox.xml.cfm property
- Call a method, loadColdBox();
<cfcomponent name="MyProxy" extends="coldbox.system.extras.ColdBoxProxy">
<cfscript>
//Load my App
loadColdBox(appMapping='',configLocation='',reloadApp='false');
</cfscript>
... All Methods Here ...
</cfcomponent>