0 Replies Latest reply on Jun 17, 2011 7:08 AM by Swiffian

    How to read JBoss server 'app.properties' file in the deployed Flex application?

    Swiffian

      Hi, my current Flex project is using LCDS server to make call (Remote object call and Data managements services' call) to the backend Java services and consume data to render. I have defined the AMF and RTMP channels in the services-config.xml file and destinations for the Java services' in the remoting-config.xml and data-management-config.xml files.

       

           <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
                  <endpoint url="http://localhost:8080/eqcFlex/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
                  <properties>
                      <polling-enabled>false</polling-enabled>
                  </properties>
           </channel-definition>

       

      As of now both the Flex application WAR file and Java services EAR files are depolyed on the JBoss server on my machine, therefore I can hardcode the endpoint URL as http://localhost:8080 in the services-config file and hit the Java services.

       

      But the requirement is that the Flex application WAR file needs to be deployed on JBoss servers deployed on different machines and hence the endpoint URL cann't be hardcoded in the services-config.xml file. Is there a way we can pick up the endpoint URL from the JBoss server's app.properties file so that we can dynamically create channels in Actionscript code and make call to the backend services with dynamic endpoint URL?