views:

286

answers:

1

I'm using Flex Builder 3 to connect to a bunch of back-end code via the AMF gateway. Another developer packaged up all the AMF Gateway code into a war file. Here's my development process:

  • Deploy most recent AMF-gateway.war file into local jboss server
  • War file gets unpacked into [jboss]/server/tmp/deploy/tmp23241AMF-gateway-exp.war/
  • Run Flex Builder. Point application project at AMF Gateway tmp folder in 3 places (Flex server root folder, Flex build output folder, Flex compiler 'additional arguments' (pointing to location of services-config.xml).

This setup means that whenever you start a debug session in Flex Builder, it dumps working versions of the files into the AMF-gateway folder on the jboss server (which is aliased as /AMF-gateway). The thing is, every time I restart jboss or deploy an updated AMF-gateway.war file, it gets unpacked into a new temp folder with a new name, and I need to change all the references in the Flex project. This happens several times a day, and it's annoying. Can I streamline this configuration? I tried using an alias to that folder -- figuring I could script the change -- but Flex Builder didn't seem to like it.

A: 

If I remember correctly, you can create a directory in JBoss that the server will treat as an exploded war file. I don't have a copy of JBoss handy to check, but I remember creating a directory such as "context-name.war" and being able to develop against that. So instead of copying your packaged .war file to the deploy directory, you could unzip it directly to that directory. If I remember correctly JBoss will monitor the web.xml file for changes and if it's overwritten it will redeploy the context.

cliff.meyers