Temp files are complete impl details, hence I cannot see how it could work.
But you could mount some "virtual" resources via VFS API.
e.g. this is how we switch / modify JPA config files in CapeDwarf:
If I create the full path (where the runtime generated classes to be dropped) inside the packaged WAR and deployed it. It works . Could you please explain why it happens?
I'm not following what exactly do you do to make it work.
WAR exploded into a TMP folder, now our application generates some java files and compiled class files on the fly inside WEB-INF/classes. Now whenever application tries to load those generated classes then it says ClassNotFoundException.
Suppose our class package is: x.y.z and if I create a folder structure like x/y/z inside the WEB-INF/classes in packaged WAR then it works.
How JBOSS 7.1 application class loader works?