I am very much happy to share, we are upgrading our application to JBoss AS 7 + Java 7.
This is an excellent oppertunity to fix few design bugs...
Current Implementation is like this...
I have successfully moved the Output directories and all to a new location.
What is the best place to move Configuration files (from current bin)…?
4. JBOSS_HOME/standalone/deploy/deployments (already existing with JBoss)
5. JBOSS_HOME/standalone/deploy/configuration (already existing with JBoss)
If I place any of my configuration files to JBOSS_HOME/standalone/deploy/configuration [or] JBOSS_HOME/standalone/deploy/deployments, would it confuse JBoss AS server? Would it try to parse them or execute them?
Most of my config files are *.properties, *.xml, *.xsd (s)...
Please share your views...
And after all of this,
How to add a directory/location to the JBoss CLASSPATH?
Thanks in Millions...
Note: I found 3 ways of reading config files...
Sharing this for someone's use...
1. CLASS PATH Put it in the classpath, so that can load it by ClassLoader#getResourceAsStream() with a classpath-relative path:
2. CONTEXT PATH Put it somewhere in web folder (the project's web content folder), so that you can load it by ServletContext#getResourceAsStream() with a webcontent-relative path:
This is out of option to me as I want the files Outside WAR/EAR.
3. STATIC Put it somewhere in local disk file system so that you can load it the usual java.io way with an absolute local disk file system path:
Yes. Our BA team has the knowledge to edit the Properties files.
We do have few values to be configured.
Mostly, they update the properties file and restart the JBoss server without Developer's help.
If I build within Application packaging, I may need to rebuild the application.
One more thing, my client doesn't like rebuilding for LIVE environment. They want to use UAT Deployment files to deploy in Production. But, they are OK with us to change values on External properties files, which has few environment specific values/URLs.
subject: Web Application Design - Config files best locations - Dynamic/Static - JBoss AS 7