1

We have set of data directories in side the war bundled with ear. These files to be read by the application at run time by taking the static path from properties file. In Jboss 6.3 eap, when ear file deployed from management console ear content was not expanded. Due to which i can not provide the exact data directory path in properties file.

Could any body can help me in finding the way to expand the ear deployed from Management console in JBoss 6.3 EAP. Very happy if you have any alternative solutions for this issue.

nram
  • 11
  • 3
  • https://stackoverflow.com/questions/9582989/expand-war-or-ear-files-in-jboss-as-7#12587677 ? – Kevin Boone Oct 03 '17 at 09:50
  • @kevin, required files are in side the data directory of war. I should know the deployed data directory path first to find the files inside the directory.thanks. – nram Oct 03 '17 at 10:04
  • This is the same question that was asked in the previous question that I linked. I don't really want to repeat the answers but, broadly, you can't assume that an application server will expand your deployed files and, even if it does, you can't assume that it will do so in some particular location. Please explain why you need to do this -- there might be an alternative approach. – Kevin Boone Oct 03 '17 at 10:16
  • There are many data templates under directory name 'templates' and images under 'images' directory. These directories packed inside the war. At run time required template will be read by application per the directory path given in app properties.As of now we are using deployment directory in jboss 6.3 eap to deploy exploded ear and required paths given in properties file later usage. Now the issue is only with deployment of the application from Jboss management console, since it is deployed the application in data directory and exploded ear in temp with dynamic folder structure. – nram Oct 03 '17 at 11:33
  • Why do you need to read from the filesystem? Can't you use `ClassLoader.getResource()` or similar? This will be much more portable, and should work whether your EAR/WAR is packed or unpacked. – Kevin Boone Oct 03 '17 at 12:12
  • Yes, we can do.but this is an old development.Till the time we never faced this kind of issue for any other app server.So did not get any chance to look in to the issue.Now Jobss eap server forced us to check this. – nram Oct 04 '17 at 05:46
  • I believe that at least some releases of EAP will allow you to deploy an expanded WAR directly to the deploy/ directory. But -- sorry -- I have no idea whether even these release support this for EAR deployment. – Kevin Boone Oct 04 '17 at 07:13

0 Answers0