4 Replies Latest reply on Feb 18, 2004 12:37 PM by Andrew Oliver

    WAR Deployment and Properties files

    John O'Grady Newbie

      First off, I like JBoss a lot. Second, forgive me if this is in the wrong forum and feel free to move it if need be. I searched the other forums and could find no match to my question.

      So my predicament is this - My application is going to include the use of properties files, both standard Java .properties and xml files, in the bootstrap routines to pass on configuration information. This is config info that either does not fit or does not belong as Context Initialization Parameters.

      Now I've read voraciously just about all the documentation I can find on JBoss, and subscribed to the dev docs (I'm always willing to help out with OSS), but I've had only a week with this project and I haven't made any headway in finding out this - How do you make the deployment of a WAR file permanent?

      In my development environment, which includes JBoss 3.2.3, JBuilder X Enterprise (which has some nice hooks into JBoss for developement), I hit the Debug or Run buttons, which automatically copies my rebuilt WAR file to the "[JBoss Root]\server\default\deploy" directory (yes, the slashes are in the right direction - I'm using WinXP, pity me!), then starts JBoss. The WAR gets exploded to the "[JBoss Root]\server\default\tmp\deploy" directory, under a folder named "tmp#####[War name].war". My problem comes with the fact that even if files are added or modified in that "tmp" WAR directory, when the JBoss engine is shut down, the directory is erased and all additions and changes are lost. I get this behaviour using both JBuilder's testing bootstrap or using JBoss's own run.bat.

      So I feel like I'm missing something obvious here. There aren't any standard switches or settings to tell a WAR file to deploy permanently (that I know of), and I want whatever WAR I finish with to do the same thing whether I hand it to JBoss, WebSphere, or WebLogic (sorry for naming the competition). Is there a setting in JBoss somewhere that tells it not to clean up a WAR deployment folder? Or is there a better way of handling the placement of properties files that I haven't come across yet that will work for all appliction servers?

      Thanks in advance for any help any of you here can give me.