Pet Market Blueprint Application on Mac OS X

In my spare time, I have been trying to get the Pet Market Blueprint app (Flash version) running on CFMX and JRun 4 on my Mac. As it turns out, the Unix version technically works just fine right out of the box — just follow the instructions, and even the datasource will be set up properly since Pointbase is a 100% pure Java implementation. There is one little detail, however, that actually has more to do with JRun configuration than the Pet Market app itself, but boy is it a tricky one.

JRun comes with it’s own version of Flash Remoting which is mapped to flashservices/gateway. It is a Java-only version of Flash remoting, meaning it will not find and delegate to ColdFusion components. Of course, ColdFusion for J2EE servers comes with Flash Remoting as well, so you have to find a way for the two of them to coexist. I found that both of the options below worked, depending on how I had CFMX configured:

  1. If you are using a context root for ColdFusion (like “cfmx” or “cfusion”), edit the shell_init.xml file in the petmarket web directory. You can continue to use the “default” backend (you do not have to use j2ee), but you will need to add your context root before the flashservices/gateway reference in the gatewayURI tag. For instance, if your context root is “cfmx”, your tag should look like this:
    <gatewayURI dir="cfmx/flashservices/gateway" />

    Save the file and everything should run fine. You don’t even have to restart anything.

  2. If you do not use a context path for ColdFusion (more properly stated, if your context root is “” or “/”), you simple need to make sure that the Flash Remoting gateway that came with JRun does not intercept your requests. The easiest way to do this is to go into the JRun administrator (http://localhost:8000) and change the context root of the Flash Remoting Enterprise application to anything other than flashservices (for instance, I changed it to “flash-services”). Then redeploy the Flash Remoing application or restart JRun and you should be good to go.

If you want to give it a try, download the necessary files here: