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

<server>
 
  <!-- ==================================================================== -->
  <!-- JMS Stuff                                                            -->
  <!-- ==================================================================== -->

  <!-- The JMS provider loader -->
  <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
	 name="jboss.mq:service=JMSProviderLoader,name=JBossMQProvider">
    <attribute name="ProviderName">DefaultJMSProvider</attribute>
    <attribute name="ProviderAdapterClass">
      org.jboss.jms.jndi.JBossMQProvider
    </attribute>
    <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
    <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
  </mbean>

  <!-- The server session pool for Message Driven Beans -->
  <mbean code="org.jboss.jms.asf.ServerSessionPoolLoader"
	 name="jboss.mq:service=ServerSessionPoolMBean,name=StdJMSPool">
    <attribute name="PoolName">StdJMSPool</attribute>
    <attribute name="PoolFactoryClass">
      org.jboss.jms.asf.StdServerSessionPoolFactory
    </attribute>
  </mbean>

  <!-- JMS XA Resource adapter, use this to get transacted JMS in beans -->

  <!--new configuration for new ConnectionManager-->
  <mbean code="org.jboss.resource.connectionmanager.XATxConnectionManager" name="jboss.jca:service=XaTxCM,name=jmsra">
    <!--make the rar deploy!-->
    <depends>jboss.jca:service=RARDeployer</depends>

    <depends optional-attribute-name="ManagedConnectionFactoryName">
      <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=XaTxDS,name=jmsra">
        <!--hack till better deployment system-->
        <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JMS Adapter</depends>

        <!--real attributes-->
        <attribute name="ManagedConnectionFactoryProperties">
          <properties>
            <config-property>
              <config-property-name>SessionDefaultType</config-property-name>
              <config-property-type>java.lang.String</config-property-type>
              <config-property-value>javax.jms.Topic</config-property-value>
            </config-property>
          </properties>
        </attribute>
        <attribute name="JndiName">JmsXA</attribute>
      </mbean>
    </depends>

    <depends optional-attribute-name="ManagedConnectionPool">
      <mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=XaTxPool,name=jmsra">
        <attribute name="MinSize">0</attribute>
        <attribute name="MaxSize">50</attribute>
        <attribute name="BlockingTimeoutMillis">5000</attribute>
        <attribute name="IdleTimeoutMinutes">15</attribute>
        <!--criteria indicates if Subject (from security domain) or app supplied
            parameters (such as from getConnection(user, pw)) are used to distinguish
            connections in the pool. Choices are 
            ByContainerAndApplication (use both), 
            ByContainer (use Subject),
            ByApplication (use app supplied params only),
            ByNothing (all connections are equivalent, usually if adapter supports
              reauthentication)-->
        <attribute name="Criteria">ByContainerAndApplication</attribute>
      </mbean>
    </depends>
    <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
    <attribute name="SecurityDomainJndiName">JmsXARealm</attribute>

    <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:name=JaasSecurityManager</depends>

    <attribute name="TransactionManager">java:/TransactionManager</attribute>
  </mbean>


</server>
