1 Reply Latest reply on Jul 23, 2014 12:04 AM by James Livingston

    EAP 6.1 - Loading resources from external directory

    Kaushal Kumar Newbie

      We are migrating our application from eap 5.2 to eap 6.1. While doing so we are facing a problem in loading configuration form an external directory, which is located outside the war (even outside the JBOSS_HOME directory). The configuration directory contains several configuration under different folders and the application reads the configuration from different path. The configurations were kept seperately (without bieng zipped/jar) since it can be edit, and moreover new files/directories could be added as well.


      In EAP 5.2 we used the VFS and positioned the configuration directory in classpath by adding a classpath entry in jboss-service.xml. Could you please help us in achiving the similar functionality in EAP 6.1.


      I tried to take help from links below, but it did not get success



      https://community.jboss.org/thread/219956?tstart=0 (will not work. Reason, it adds configuration to global configuration, which may impact other application. Secondly, I was not able to test it since i could not create a symlink on my windows box (due to permission issue)


        • 1. Re: EAP 6.1 - Loading resources from external directory
          James Livingston Apprentice

          If you can change the code, one method is to have it read the root location from configuration (e.g. a String bound into JNDI) and then load the files from there rather than trying to use classloader resources.


          Putting them in a static module is a good solution, but it usually requires either moving them to inside the JBoss directory or using a symlink (which is difficult on Windows).


          If you can alter the external location to have a parent directory, you could add a new item to the -mp list to JBoss in run.bat to add a new modules directory there. That's not great though.