This is pretty complicated, but you can do it by MainDeployer JBoss MainDeployer MBean. The MBean is located in jboss.system:service=MainDeployer and has a JMX listDeployments operation. This returns a collection of DeploymentInfo objects, one of which will be your EAR deployment. This DeploymentInfo property has a url property, which is a file:// URL that describes your deployment directory.
Nice huh? You can use the raw JMX API for this, but Spring provides a much better mechanism by using MBeanProxyFactoryBean to expose an instance of MainDeployerMBean .
I would like to find an easier way, but this is the best I have found so far.
skaffman
source share