<?xml version="1.0" encoding="UTF-8"?>

<!-- $Id: jboss-minimal.xml 60298 2007-02-05 16:01:55Z dimitris@jboss.org $ -->

<!-- ===================================================================== -->
<!--                                                                       -->
<!--  A minimal JBoss Server Configuration                                 -->
<!--                                                                       -->
<!-- ===================================================================== -->

<server>

   <!-- Load all jars from the JBOSS_DIST/server/<config>/lib directory. This
     can be restricted to specific jars by specifying them in the archives
     attribute.
    -->
   <classpath codebase="${jboss.server.lib.url:lib}" archives="*"/>

   <!-- ==================================================================== -->
   <!-- Log4j Initialization                                                 -->
   <!-- ==================================================================== -->
   <mbean code="org.jboss.logging.Log4jService"
      name="jboss.system:type=Log4jService,service=Logging">
      <attribute name="ConfigurationURL">resource:jboss-log4j.xml</attribute>
   </mbean>

   <!-- ==================================================================== -->
   <!-- Thread Pool                                                          -->
   <!-- ==================================================================== -->
   
   <!-- A Thread pool service -->
   <mbean code="org.jboss.util.threadpool.BasicThreadPool"
      name="jboss.system:service=ThreadPool">
      <attribute name="Name">JBoss System Threads</attribute>
      <attribute name="ThreadGroupName">System Threads</attribute>
      <!-- How long a thread will live without any tasks in MS -->
      <attribute name="KeepAliveTime">60000</attribute>
      <!-- The max number of threads in the pool -->
      <attribute name="MaximumPoolSize">10</attribute>
      <!-- The max number of tasks before the queue is full -->
      <attribute name="MaximumQueueSize">1000</attribute>
      <!-- The behavior of the pool when a task is added and the queue is full.
      abort - a RuntimeException is thrown
      run - the calling thread executes the task
      wait - the calling thread blocks until the queue has room
      discard - the task is silently discarded without being run
      discardOldest - check to see if a task is about to complete and enque
         the new task if possible, else run the task in the calling thread
      -->
      <attribute name="BlockingMode">run</attribute>
   </mbean>

   <!-- ==================================================================== -->
   <!-- JNDI                                                                 -->
   <!-- ==================================================================== -->
   
   <!-- A simple mbean wrapper around the jndi Naming object. This
   only handles an in memory instance. The NamingService uses this
   as the JNDI store and exposes it remotely.
   -->
   <mbean code="org.jnp.server.NamingBeanImpl"
      name="jboss:service=NamingBeanImpl"
      xmbean-dd="resource:xmdesc/NamingBean-xmbean.xml">
   </mbean>
   
   <mbean code="org.jboss.naming.NamingService"
      name="jboss:service=Naming"
      xmbean-dd="resource:xmdesc/NamingService-xmbean.xml">
      <!-- The call by value mode. true if all lookups are unmarshalled using
         the caller's TCL, false if in VM lookups return the value by reference.
      -->
      <attribute name="CallByValue">false</attribute>
      <!-- The listening port for the bootstrap JNP service. Set this to -1
         to run the NamingService without the JNP invoker listening port.
      -->
      <attribute name="Port">1099</attribute>
      <!-- The bootstrap JNP server bind address. This also sets the default
         RMI service bind address. Empty == all addresses
      -->
      <attribute name="BindAddress">${jboss.bind.address}</attribute>
      <!-- The port of the RMI naming service, 0 == anonymous -->
      <attribute name="RmiPort">1098</attribute>
      <!-- The RMI service bind address. Empty == all addresses
      -->
      <attribute name="RmiBindAddress">${jboss.bind.address}</attribute>
      <!-- The thread pool service used to control the bootstrap lookups -->
      <depends optional-attribute-name="LookupPool"
         proxy-type="attribute">jboss.system:service=ThreadPool</depends>
      <!-- An example of using the unifed invoker as the transport.
         <depends optional-attribute-name="InvokerProxyFactory"
         proxy-type="attribute">jboss:service=proxyFactory,type=unified,target=Naming</depends>
      -->
      <depends optional-attribute-name="Naming"
         proxy-type="attribute">jboss:service=NamingBeanImpl</depends>
   </mbean>

   <!-- ==================================================================== -->
   <!-- Deployment Scanning                                                  -->
   <!-- ==================================================================== -->

   <!-- An mbean for hot deployment/undeployment of archives.
   -->
   <mbean code="org.jboss.deployment.scanner.URLDeploymentScanner"
      name="jboss.deployment:type=DeploymentScanner,flavor=URL">

      <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 last, and they will be sorted by
               extension as above with DeploymentSorter.
      -->
      <attribute name="URLComparator">org.jboss.deployment.DeploymentSorter</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 seperated and unprefixed arguments are considered
         file URLs and resolve relative to server home(JBOSS_DIST/server/default)
         unless the given path is absolute. Any referenced directories cannot
         be unpackaged archives, use the parent directory of the unpacked
         archive.
       -->
      <attribute name="URLs">
       deploy/
      </attribute>
      
   </mbean>

</server>