Reputation: 51
I see that when I am deploying a war file in standalone/deployments
in JBoss AS 7, it is getting exploded in tmp/vfs/temp*. Now I want to configure this path(where the war is getting exploded) from /tmp/vfs to some specific folder of my choice and want to give name of my choice too to the exploded folder of this war. I googled it a lot but couldn't get any answer.
Could you please tell me where to make changes so that i can achieve that.
Upvotes: 3
Views: 1233
Reputation: 46904
The deployment is unpacked to a virtual filesystem, VFS, handled by JBoss VFS.
Maybe it reacts to some value. Check this source: https://github.com/jbossas/jboss-vfs/blob/922c3db1fb823a585dbb24477f0e03585b2558d3/src/main/java/org/jboss/vfs/TempFileProvider.java
public final class TempFileProvider implements Closeable {
private static final Logger log = Logger.getLogger(TempFileProvider.class);
private static final String JBOSS_TMP_DIR_PROPERTY = "jboss.server.temp.dir";
private static final String JVM_TMP_DIR_PROPERTY = "java.io.tmpdir";
private static final File TMP_ROOT;
private static final int RETRIES = 10;
private final AtomicBoolean open = new AtomicBoolean(true);
static {
String configTmpDir = System.getProperty(JBOSS_TMP_DIR_PROPERTY);
if (configTmpDir == null)
configTmpDir = System.getProperty(JVM_TMP_DIR_PROPERTY);
try {
TMP_ROOT = new File(configTmpDir, "vfs");
TMP_ROOT.mkdirs();
}
catch (Exception e) {
throw new RuntimeException("Can't set up temp file provider", e);
}
}
Also, in AS 5, this is how VFS root was configured using descriptor:
Configure a VFS classloader in jboss-classloading.xml
It's for JBoss AS 5, but could work, theoretically.
Upvotes: 1
Reputation: 157
If you need to control the name of directory of your application you can just put is as exploded directory in deployments directory.
Just make sure to create marker file .dodeploy or change deployment scanner configuration:
auto-deploy-exploded="true"
Upvotes: 0