Can you make AdobeCF Flash Remoting work on Lucee?

Hello, can I get an migration/implementation guide on making an existing AdobeCF Flash Remoting work on Lucee? I googled for a couple of days, but didn’t get the steps to enable the Flash Remoting on Lucee.

Depending on your implementation I still think support for Flash Remoting may be a little bit buggy. However, looks like there has been some very promising recent progress.

Keep an eye on the following:

Extension Installation details

Thanks @modius, this will help me to kick start the implementation of Flex gateway in Lucee and see how it goes. I will try this and come back soon.

Look in the web.xml file under config. There was a AMF Servlet at one point that you just have to uncomment.

Mark Drew

In the express/config/web.xml you should find some commented out configuration. basically what you are looking for is the items below:

  <!-- ===================================================================== -->
  <!-- Lucee MessageBroker Servlet - Flex Gateway                            -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- * ATTENTION - ATENCION - ACHTUNG  -  ATTENTION - ATENCION - ACHTUNG * -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- messageBrokerId must be unique for each defintion of the MessageBroker-->
  <!-- Servlet.  if you use the MessageBroker Servlet and define it in more  -->
  <!-- than one xml file, you must uncomment the messageBrokerId init-param  -->
  <!-- and set a different value in each definition.                         -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
 <servlet>
    <description>Lucee Servlet for Flex Gateway</description>
    <servlet-name>MessageBrokerServlet</servlet-name>
    <servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
    <init-param>
      <param-name>services.configuration.file</param-name>
      <param-value>/WEB-INF/flex/services-config.xml</param-value>
    </init-param>
    <init-param>
      <param-name>messageBrokerId</param-name>
      <param-value>_default_</param-value>
    </init-param>
    <load-on-startup>3</load-on-startup>
  </servlet> 


  <servlet-mapping>
    <servlet-name>MessageBrokerServlet</servlet-name>
    <url-pattern>/flex2gateway/*</url-pattern>
    <url-pattern>/flashservices/gateway/*</url-pattern>
    <url-pattern>/messagebroker/*</url-pattern>
  </servlet-mapping> 

Which should enable flex for older versions of Lucee (4.5 as far as I know)

I have never worked with Flex but hopefully that gets you started.

Thank you @modius and @markdrew. I have followed the steps mentioned in the GitHub to install the extension-flex.
I modified the messageBrokerId in the /config/web.xml to pclient.

I tried the gateway URL http://127.0.0.1:8888/pclient/flashservices/gateway/ and it returns blank page. If I try to connect to a wrong url like http://127.0.0.1:8888/aaaaaa/flashservices/gateway/, it returns an error. So I believe the flex gateway is installed correctly.
Can you please help me debug this issue?

As I mentioned, I don’t really know flex. It went out with the dinosaurs technology wise, but if you are able to hit

/flex2gateway
/flashservices/gateway/
or
/messagebroker/

and get a blank page it should be working. The rest is up to flex and how the rest is wired.

Thanks @markdrew, now I have a presumably working Flash Remoting in Lucee. I will dig into it further and see if I could make it work for the existing Flex application.

1 Like

If you do get it all working, a blog post or some contributions to the docs would be great. People ask about the Flex/Flash stuff every few months so there’s a smallish demand for it, but very few people really know how to get it all working and most of them don’t share the steps they learned.

Hi @bdw429s, sure, I’m still trying to make the Flex remoting work. I will post the details as soon as I am able to crack it.

1 Like

Steps:

  1. Build jars from GitHub - lucee/extension-flex
  2. cp extension-flex/dist/{build}/jars/* /opt/lucee/tomcat/lucee-server/context/lib/
  3. mkdir /opt/lucee/tomcat/webapps/ROOT/WEB-INF/flex
  4. cp dist/{build}/resources/* /opt/lucee/tomcat/webapps/ROOT/WEB-INF/flex/
  5. Uncomment blocks per extension-flex readme in /opt/lucee/tomcat/conf/web.xml
  6. Restart Tomcat

Other things to consider:

  • Paths may need to be changed to your specific environment
  • Only tested on Lucee 5.1
  • This is old tech; migrate away
  • Allow flash/flex urls through proxy
  • Assumes you are running tomcat
2 Likes