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

<!-- $Id: jbossmq-service.xml,v 1.10.2.14 2003/08/27 07:44:42 ejort Exp $ -->

<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>
  </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">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=ClientReconnectInterceptor</depends>
  </mbean>
  -->

  <!--
    | The ClientReconnectInterceptor is used to allow a client to connect to the server even
    | if it's clientID is allready being used by another client.  This interceptor will disconnect
    | the previously connected client to allow the new connection to succeed.  This is not enabled
    | by default since the JMS spec states that the 2nd client connecting to the server with the same
    | id should get an exception.
   -->
  <!--
  <mbean code="org.jboss.mq.server.jmx.InterceptorLoader" name="jboss.mq:service=ClientReconnectInterceptor">
    <attribute name="InterceptorClass">org.jboss.mq.server.ClientReconnectInterceptor</attribute>
    <depends optional-attribute-name="NextInterceptor">jboss.mq:service=DestinationManager</depends>
  </mbean>
  -->

  <!-- ==================================================================== -->
  <!-- The state manager                                                    -->
  <!-- ==================================================================== -->

  <!--
     | The StateManager is used to keep JMS persistent state data.
     | For example: what durable subscriptions are active.
   -->
  <mbean code="org.jboss.mq.sm.file.DynamicStateManager"
	 name="jboss.mq:service=StateManager">
    <!-- This file is pulled from the configuration URL of the server -->
    <attribute name="StateFile">jbossmq-state.xml</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>
