DSdotXML

    -ds.xml files

     

    The -ds.xml file is used to define ConnectionFactorys and DataSources.

    It may also contain normal mbean definitions

     

    Deployment

     

    Simply add your -ds.xml file to deploy{-hasingleton} or farm directory.

     

    Assuming that you have deployed your RAR.

     

    Examples can be found in docs/examples/jca.

     

    *NOTE: For DataSource deployments make sure you have copied the driver into server//lib*

     

    An example DataSource deployment

     

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

     

    <!-- A datasource that does not take part in JTA transactions-->

     
    <no-tx-datasource> 
    <jndi-name>GenericNoTxDS</jndi-name> 
    <connection-url>[jdbc: url for use with Driver class]</connection-url> 
    <driver-class>[fully qualified class name of java.sql.Driver implementation]</driver-class> 
    <user-name>x</user-name> 
    <password>y</password> 
    </no-tx-datasource> 
    

     

    <!-- A local datasource - one that does not support two phase commit -->

     
    <local-tx-datasource> 
    <jndi-name>GenericDS</jndi-name> 
    <connection-url>[jdbc: url for use with Driver class]</connection-url> 
    <driver-class>[fully qualified class name of java.sql.Driver implementation]</driver-class> 
    <user-name>x</user-name> 
    <password>y</password> 
    </local-tx-datasource> 
    

     

    <!-- Here's an xa example -->

     
    <xa-datasource> 
    <jndi-name>GenericXADS</jndi-name> 
    <xa-datasource-class>[fully qualified name of class implementing javax.sql.XADataSource goes here]</xa-datasource-class> 
    <xa-datasource-property name="SomeProperty">SomePropertyValue</xa-datasource-property> 
    <xa-datasource-property name="SomeOtherProperty">SomeOtherValue</xa-datasource-property> 
    <user-name>x</user-name> 
    <password>y</password> 
    </xa-datasource> 
    

     

    <!-- you can include regular mbean configurations like this one -->

     
    <mbean code="org.jboss.tm.XidFactory" 
    name="jboss:service=XidFactory"> 
    <attribute name="Pad">true</attribute> 
    </mbean> 
    
    </datasources> 
    

     

     

    Example connection factory deployment

     

     
    <?xml version="1.0" encoding="UTF-8"?> 
    
    <connection-factories> 
    
    <!-- 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> 
    
    <!-- JMS XA Resource adapter, use this to get transacted JMS in beans --> 
    <tx-connection-factory> 
    <jndi-name>JmsXA</jndi-name> 
    <xa-transaction></xa-transaction> 
    
    <!-- JBoss 3.2.x --> 
    <adapter-display-name>JMS Adapter</adapter-display-name> 
    
    <!-- JBoss 4.0.x --> 
    <rar-name>jms-ra.rar</rar-name> 
    <connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition> 
    
    
    <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property> 
    <security-domain-and-application>JmsXARealm</security-domain-and-application> 
    </tx-connection-factory> 
    
    </connection-factories> 
    

     

     

    Example connection factory deployment using a scoped loader repository

     

     
    <?xml version="1.0" encoding="UTF-8"?> 
    <connection-factories>
    
       <!-- The loader repository name used by some scoped deployment containing the rar -->
      <loader-repository>jboss.test:loader=JavaClassIsolation</loader-repository>
    
       <tx-connection-factory>
          <!-- The "path" to the rar -->
          <rar-name>some.ear#some.rar</rar-name>
            <etc></etc>
       </tx-connection-factory>
    </connection-factories>
    

     

    Referenced by: