See if this one helps: http://flexapps.cvs.sourceforge.net/flexapps/census/build.xml?revision=1.24&view=markup
-James On Fri, 2008-01-11 at 06:48 -0800, Collene wrote: > Hi all, > > I'm trying to create a Flex Data services application and deploy to > Tomcat 6 using ant. I created a simple "Stock Portfolio" application > from this book: http://www.theriabook.com/ . The Stock Portfolio has > a remote procedure call using a Java backend and Flex/mxml front end. > In my build file, I compile the Java classes, then copy the Flex DS > libs and .mxml files to the appropriate directories in the webapp. I > then jar this all up and use a catalina task to deploy to Tomcat using > ant (this is similar to how we deploy our other applications). I then > go to http://localhost:8080/stockportfolio, which goes to > http://localhost:8080/StockPortfolio.mxml. And it works (my > application shows up, and the remote calls work great). However, if I > make a small change to my code and deploy again using the same ant > build file, then go back to http://localhost:8080/stockportfolio, it > indicates the application can not be found. Checking out the Tomcat > webapps directory, stockportfolio is there, but the only directory > left inside the folder is WEB-INF/lib, with all of the jar files. > I've encountered this problem before (a jar locking problem in > Tomcat), so added antiResourceLocking="true" and antiJARLocking="true" > to my context.xml file, stopped Tomcat, deployed again, and that fixed > the problem (so I'm able deploy without the jar files locking up), but > a new one has popped up. I can only deploy this way 3-4 times before > Tomcat displays an "out of memory" error. Watching my task manager > while deploying and then going to the application, I think this > happens as the .swf is created. Each time I redeploy and then visit > the application, the memory usage continues to rise. I've increased > the memory allocated to Tomcat, but it doesn't help if the memory > usage continues to rise as I deploy several times (which I tend to do > during development of the application). > > I'm trying to find a better way to deploy the application, and if this > is indeed caused by compiling the mxml to swf, I'd like to compile the > swf during deployment using ant. So I looked on the web and fount > flex ant tasks (http://labs.adobe.com/wiki/index.php/Flex_Ant_Tasks ). > However, I have yet to find a good ant build file I can use as a > template for a Flex Data Services application, and was hoping someone > could point me in the right direction (or perhaps provide a solution > to the problem I have above). Any attempts so far at compiling using > mxmlc and the ant tasks have corrupted my application source and so > the application doesn't run (solve one error, another pops up, very > frustrating process). Any help/advice is appreciated, thanks! > > > > >

