<!-- If susbsytem "datasources" is already defined, only copy the contents under it and edit to suit your needs -->
<subsystem xmlns="urn:jboss:domain:datasources:1.0">
    <datasources>
        <datasource jndi-name="java:/hive-ds" pool-name="hive-ds">
            <connection-url>jdbc:hive2://{host-name}:10000/default</connection-url>
            <driver>hive</driver>
            <pool>
                <prefill>false</prefill>
                <use-strict-min>false</use-strict-min>
                <flush-strategy>FailingConnectionOnly</flush-strategy>
            </pool>
            <security>
                <user-name>{user}</user-name>
                <password>{password}</password>
            </security>
            <!--
            If you are using Hive JDBC driver version <= 0.12; uncomment this block 
            if your database name is different than 'default'
            <new-connection-sql>use {database-name}</new-connection-sql>
            -->
        </datasource>                              
        <drivers>
            <driver name="hive" module="org.apache.hadoop.hive">
                <driver-class>org.apache.hive.jdbc.HiveDriver</driver-class>
            </driver>    
        </drivers>
    </datasources>
</subsystem> 
