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

<!-- $Id: jbossmq-service.xml 38187 2005-11-16 23:55:44Z adrian $ -->

<server>

  <!-- ==================================================================== -->
  <!-- JBossMQ                                                              -->
  <!-- ==================================================================== -->


  <!-- ==================================================================== -->
  <!-- JBossMQ Interceptor chain configuration                              -->
  <!-- ==================================================================== -->
  <!-- To tune performance, you can have the Invoker skip over the TracingInterceptor -->
  <!-- and/or the SecurityManager, but then you loose the ability to trace and/or enforce security. -->
  <mbean code="org.jboss.mq.server.jmx.Invoker" name="jboss.mq:service=Invoker">
    <depends optional-attribute-name="NextInterceptor">jboss.mq:service=TracingInterceptor</depends>
    <depends>jboss:service=Naming</depends>
  </mbean>

  <mbean code="org.jboss.mq.server.jmx.InterceptorLoader" name="jboss.mq:service=TracingInterceptor">
    <attribute name="InterceptorClass">org.jboss.mq.server.TracingInterceptor</attribute>
    <depends optional-attribute-name="NextInterceptor">jboss.mq:service=SecurityManager</depends>
  </mbean>

  <mbean code="org.jboss.mq.security.SecurityManager" name="jboss.mq:service=SecurityManager">
    <attribute name="DefaultSecurityConfig">
      <security>
        <role name="guest" read="true" write="true" create="true"/>
      </security>
    </attribute>
    <attribute name="SecurityDomain">java:/jaas/jbossmq</attribute>
    <depends optional-attribute-name="NextInterceptor">jboss.mq:service=DestinationManager</depends>
  </mbean>

  <!--
     | The ClientMonitorInterceptor disconnects clients that have been idle for to long.
     | This interceptor is not enabled by default since the server might disconnect clients
     | when the it is under high load.
   -->
  <!--
  <mbean code="org.jboss.mq.server.jmx.ClientMonitorInterceptor" name="jboss.mq:service=ClientMonitorInterceptor">
    <attribute name="ClientTimeout">80000</attribute>
    <depends optional-attribute-name="NextInterceptor">jboss.mq:service=DestinationManager</depends>
  </mbean>
  -->

  <!-- A Thread pool service -->
  <mbean code="org.jboss.util.threadpool.BasicThreadPool"
     name="jboss.mq:service=ThreadPool">
     <attribute name="Name">JMSThread</attribute>
     <attribute name="ThreadGroupName">JBossMQ Server Threads</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>

  <!-- ==================================================================== -->
  <!-- System Destinations                                                  -->
  <!-- ==================================================================== -->

  <!-- Dead Letter Queue -->
  <mbean code="org.jboss.mq.server.jmx.Queue"
	 name="jboss.mq.destination:service=Queue,name=DLQ">
    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
    <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
  </mbean>

</server>
