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:

7 Responses to Pet Market Blueprint Application on Mac OS X

  1. I’m trying to make work flash remoting on my mac, but it doesn’t seem to files are in cfusion/localcold/components/dbaccess.cfc,in flash .Could you explain me how to use the coldfusion flash remoting and not the jrun

  2. The component needs to be in your web root. For instance, if your web root is wwwroot, the component should be here:{path-to-CF}/wwwroot/components/dbaccess.cfcYou then reference it as “components.dbaccess” in Flash.

  3. scott m says:

    I too am trying to get Flash remoting working under OSX & JRun4/CFMXJ2ee via MM’s examples.The Flash NetDebugger gives a “service not found” exception when Flash calls a simple test.cfc. A web browser calling a test.cfm/test.cfc works.Is my problem related to this same Jrun flashservices/gateway conflict? If so, what steps do I take to properly configure a ‘cfusion’ context root? thnx.

  4. Christian Cantrell says:

    Try adding your context root to the gateway path, like this:cfusion/flashservices/gateway

  5. Danny Joplin says:

    I installed coldfusion MX as a WAR on jrun. It is installed in a /cfusion directory. I would like for / to bring up my coldfusion application how do i do this? I think I need to change the context root in jrun.

  6. The most basic duality that exists with variables is how the programmer sees them in a totally different way than the computer does. When you’re typing away in Project Builder, your variables are normal words smashed together, like software titles from the 80s. You deal with them on this level, moving them around and passing them back and forth.

  7. quica says:

    “service not found” that’s the problem I’ve got when I test in the server the aplication running With Flash remoting and Coldfusion 7. If i test locally it works fine.┬┐Can you help me?