6 Replies Latest reply on Oct 9, 2003 1:45 AM by furykid

    Base Configuration JBoss 4.0

    furykid

      Hi,
      for a clean & secure production environment I need to configure
      the JBoss installation in a way that the deployed application should NOT be in a subdirectory like
      jboss/server/(default | all | minimal).

      ( something like appbase for the webapp location in tomcat server.xml host settings..)

      is this posssible and how do I specify the location ??


        • 1. Re: Base Configuration JBoss 4.0

          conf/jboss-service.xml you can add the locations where applications are deployed from

          -- Juha

          • 2. Re: Base Configuration JBoss 4.0
            furykid

            thx for the response,
            do you mean the jboss/server/conf directory ?

            could you please post an example or a link to further
            info ?

            • 3. Re: Base Configuration JBoss 4.0

              Yes I mean the server//conf/jboss-service.xml file.

              At the end of the file you have this section:

               <!-- An mbean for hot deployment/undeployment of archives.
               -->
               <mbean code="org.jboss.deployment.scanner.URLDeploymentScanner"
               name="jboss.deployment:type=DeploymentScanner,flavor=URL">
              
               <!-- Uncomment (and comment/remove version below) to enable usage of the
               DeploymentCache
               <depends optional-attribute-name="Deployer">jboss.deployment:type=DeploymentCache</depends>
               -->
               <depends optional-attribute-name="Deployer">jboss.system:service=MainDeployer</depends>
              
               <!-- The URLComparator can be used to specify a deployment ordering
               for deployments found in a scanned directory. The class specified
               must be an implementation of java.util.Comparator, it must be able
               to compare two URL objects, and it must have a no-arg constructor.
               Two deployment comparators are shipped with JBoss:
               - org.jboss.deployment.DeploymentSorter
               Sorts by file extension, as follows:
               "sar", "service.xml", "rar", "jar", "war", "wsr", "ear", "zip",
               "*"
               - org.jboss.deployment.scanner.PrefixDeploymentSorter
               If the name portion of the url begins with 1 or more digits, those
               digits are converted to an int (ignoring leading zeroes), and
               files are deployed in that order. Files that do not start with
               any digits will be deployed first, and they will be sorted by
               extension as above with DeploymentSorter.
               -->
               <attribute name="URLComparator">org.jboss.deployment.DeploymentSorter</attribute>
               <!--
               <attribute name="URLComparator">org.jboss.deployment.scanner.PrefixDeploymentSorter</attribute>
               -->
              
               <!-- The Filter specifies a java.io.FileFilter for scanned
               directories. Any file not accepted by this filter will not be
               deployed. The org.jboss.deployment.scanner.DeploymentFilter
               rejects the following patterns:
               "#*", "%*", ",*", ".*", "_$*", "*#", "*$", "*%", "*.BAK",
               "*.old", "*.orig", "*.rej", "*.bak", "*,v", "*~", ".make.state",
               ".nse_depinfo", "CVS", "CVS.admin", "RCS", "RCSLOG", "SCCS",
               "TAGS", "core", "tags"
               -->
               <attribute name="Filter">org.jboss.deployment.scanner.DeploymentFilter</attribute>
              
               <attribute name="ScanPeriod">5000</attribute>
              
               <!-- URLs are comma separated and resolve relative to the server home URL
               unless the given path is absolute. If the URL ends in "/" it is
               considered a collection and scanned, otherwise it is simply deployed;
               this follows RFC2518 convention and allows discrimination between
               collections and directories that are simply unpacked archives.
              
               URLs may be local (file:) or remote (http:). Scanning is supported
               for remote URLs but unpacked deployment units are not.
              
               Example URLs:
               deploy/
               scans ${jboss.server.url}/deploy/, which is local or remote
               depending on the URL used to boot the server
               ${jboss.server.home}/deploy/
               scans ${jboss.server.home)/deploy, which is always local
               file:/var/opt/myapp.ear
               deploy myapp.ear from a local location
               file:/var/opt/apps/
               scans the specified directory
               http://www.test.com/netboot/myapp.ear
               deploys myapp.ear from a remote location
               http://www.test.com/netboot/apps/
               scans the specified WebDAV location
               -->
               <attribute name="URLs">
               deploy/
               </attribute>
              
               <!-- Indicates if the scanner should recursively scan directories that
               contain no "." in their names. This can be used to group applications
               and services that must be deployed and that have the same
               logical function in the same directory i.e.
               deploy/JMX/
               deploy/JMS/
               ...
               -->
              
               <attribute name="RecursiveSearch">True</attribute>
              
               </mbean>
              


              The attribute 'URLs' allows you to deploy packages from external locations.

              -- Juha


              • 4. Re: Base Configuration JBoss 4.0
                furykid

                thats the only way we currently managed to seperate the server software from the deployed app.

                But:
                What we would like to do is to seperate the application-configuration ( which is dynamic) from the jboss server configuration & libraries ( which are more or less static).

                Basically we dont want an application configuration directory under jboss/server. application directories
                should be physically seperated for security and
                maintainace reasons.

                conf & deploy directory contain app-only info and should be ouside jboss.
                whereas the lib directory contains common shareable info for all EAS and could stay inside jboss directory structure.

                is there something like tomcats "appbase" setting ?




















                • 5. Re: Base Configuration JBoss 4.0

                  Yes it's this system property that the logs display:
                  00:20:13,586 INFO [Server] Server Config URL: file:/C:/Work/private/CK/jboss/jboss-3.0.4/server/CKConfig/conf/

                  All the directory locations can be changed by using system properties. For a list of all the properties set on your JBoss instance, go to the jboss:service=SystemProperties MBean and click on the showAll() operation.

                  -- Juha

                  • 6. Re: Base Configuration JBoss 4.0
                    furykid

                    thx thats it !

                    setting

                    jboss server.home.dir & jboss server.home.url

                    correctly did the job !