2 Replies Latest reply on Jun 19, 2009 11:48 AM by Cr99

    Configuring blazeds for AIR apps

    Cr99 Level 1

      I have a flex app which uses blazeds for some messaging and I am converting it into an AIR app.  I have a java class called AutoWatcher which extends ServiceAdapter and it sends and recieves messages.  I declared it the same way in both my flex and AIR apps:

       

      <mx:Producer id="reportManager" destination="autoWatch"/>

      <mx:Consumer id="consumer" destination="autoWatch" message="messageHandler(event.message)"/>

      And it compiles fine, but when I run it, the AIR app gives me an error saying that autoWatch either does not exist or the destination has no channels defined.
      Here is how I set up my channel definitions in the messaging-config.xml file in my flex directory, but apparently this is not how it is done in AIR:

       

      <service id="message-service"

          class="flex.messaging.services.MessageService">

       

          <adapters>

              <adapter-definition id="TCautomation" class="factory.AutoWatcher"/>

              <adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" default="true" />

          </adapters>

       

          <default-channels>

              <channel ref="my-polling-amf"/>

          </default-channels>

       

      <destination id="autoWatch">

      <adapter ref="TCautomation"/>

      </destination>

       

      </service>

      So how do you configure/define the channels for AIR?