java - How add external resource folder on JBoss7? -


following matter jbossas 7.1 developer guider:

change resourcebundle location in previous versions of as, jboss_home/server//conf/ available in classpath. hence properties files in location available in classpath of application.

in as7, properties available in classpath, package them within application. example, if deploying .war package properties in war web-inf/classes/ folder. if want properties accessible components in .ear, package them @ root of .jar , place jar in ear lib/ folder.

but method not if there many resource files, can't package resource file jar or ear.

for new class loading method - module. try following method:

create module.xml file .. chose module name... instnace custom.myconfig

<resources>     <resource-root path="."/>     <!-- insert resources here --> </resources>  <dependencies>      </dependencies> </module>   in jboss-deployment-structure.xml include module app <jboss-deployment-structure> <ear-subdeployments-isolated>false</ear-subdeployments-isolated> <deployment>     <dependencies>         <module name="custom.myconfig/>     </dependencies>     <resources>     </resources> </deployment>  <sub-deployment name="my_war.war">     <dependencies>         <module name="custom.myconfig" />     </dependencies> </sub-deployment> 

https://community.jboss.org/message/723631

but found can't set absolute path path, like: [resource-root path=""c:\resourcefolder"].

that's means need include resource files on jbossas 7.

it simple on jbossas 5.x-6.x, need add folder path "c:\resourcefolder" classpath ok. impossible mission on jbossas7.

finally, soft link resource folder jbossas 7.....

linux:

in -s 

windows:

mklink /d 

or

junction.exe 

Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -