5 Replies Latest reply on Apr 29, 2005 7:21 PM by bsorkin

    Changing Server Configuration Home

    astrien

      Is there a way to change the directory where JBoss looks for server configurations? I mean - out of the box, JBoss looks in the "server" directory and finds all, default, and minimal. What if I wanted to create a server configuration in a directory outside the "server" directory? Is there a parameter you can feed to the run.* script?

        • 1. Re: Changing Server Configuration Home

          Have you tried -Djboss.server.base.dir=...?

          You can find a list of other location-specific properties in the admin docs: http://docs.jboss.org/jbossas/admindevel326/html/ch01.html#ch1.dirs.fig

          • 2. Re: Changing Server Configuration Home
            astrien

            That's exactly what I've been looking for. Forgive me for saying this, but shouldn't that information be in the "getting started" or "application server guide"? If it is, it's pretty damn well hidden. Also, that devel guide you pointed to is for the 3.2.x series - is there an updated one for 4.0.1?

            • 3. Re: Changing Server Configuration Home
              astrien

              Never mind - I started wandering the directory structure you pointed at and finally found the page in the guide where this is. The idea to use the -D switch to change the location isn't mentioned anywhere on the page though. Guess it's one of those "intuitive" assumptions we developers assume doc readers will make.

              These options should be added to the multiple instances on one server wiki page. I'll do it tomorrow if no one here does.

              • 4. Re: Changing Server Configuration Home
                astrien

                Well, this is fun. Seems JBoss is hostile to relocating the base directory of a server. Even with the base directory set:

                -Djboss.server.base.url=file:\\\Z:\\tmp\vhosts\server01\

                ...jboss still puts the tmp and log directories in the ${jboss.home_url}/server/${jboss.server.name} directory. What's up with that? This persists even if you change the "jboss.server.home.url" environmental variable.

                This seems very wrong to me. I want to have a separate jboss server instance for each virtual host on my server, but it doesn't make sense that a server instance root wouldn't include the work, log, and temp directories. What am I missing?

                • 5. Re: Changing Server Configuration Home
                  bsorkin

                  This page should help: http://www.jboss.org/wiki/Wiki.jsp?page=JBossProperties
                  I was able to do what you're talking about by passing these properties on startup:

                  -Djboss.home.dir=/home/brian/jboss -Djboss.home.url=file:/home/brian/jboss -Djboss.lib.url=file:/usr/local/jboss/lib