Has anyone experienced oddities with remote proxies while using Railo gateways? I can’t tell if I’m crazy and I’m configuring the application wrong or there is a bug. I’ll try not to make this post too long.
In my very basic test, using Railo’s WebSocket:
- I create a Railo site/context
- Create a very simple CB application with a remote proxy, inside the proxy I use announceInterception inside every method (onClientOpen,onClientClose,onMessage)
- I do not init the application by pointing my browser to it
- Inside the Railo admin, I create mappings to the application, create the WebSocket gateway, point the listener to the CB remote proxy in Step 2
- Try to start the gateway.
Right off the bat this happens (line #55 of Application.cfc is onApplicationStart()):
invalid component definition, can’t find component [railo.extension.gateway.config.Coldbox];
The gateway tries to init the application, the application tries to bootstrap coldbox, then the application fails to find my apps Coldbox.cfc config. If I understand the underlying cause correctly this means the context it’s running in is Not in my applications root directly, but instead /railo/extensioin/gateway/. I tried to fix this by using COLDBOX_CONFIG_FILE which ‘seemed’ to have some effect, but not enough.
After changing COLDBOX_CONFIG_FILE to “mymapping.config.Coldbox”, the same thing pretty much happened but instead for the Cachebox config:
invalid component definition, can’t find component [railo.extension.gateway.config.CacheBox];
This was harder to ‘fix’ since there is no config option in plain sight. Since my Coldbox.cfc config was working, I created a key called Cachebox and duplicated what it expected (since the LoaderService calls controller.getSetting(“cacheBox”), I can explicitly set it)
Then that got ‘fixed’, but the same thing happened again for Wirebox.
Now before anyone says the obvious “If you start the application via a http get and it works, make sure to do that”… There are a slew of different problems that come up when the Application times out.
Long story short:
Am I missing a config option somewhere to let the application know what context/directory it’s supposed to run in when starting the application from a CB remote proxy request?