data source registration

step 1: register sqlite jdbc driver.

on the cli command line:
[disconnected /] connect

[standalone@localhost:9999 /] /subsystem=datasources/jdbc-driver=sqlite:add(driver-name="sqlite",driver-module-name="org.sqlite",driver-class-name=org.sqlite.JDBC)


step 2: register datasource
[standalone@localhost:9999 /] data-source add --name=jsf-test3 --connection-url="jdbc:sqlite:C:/Users/dmotooka/AppData/sqlite/moto-test2.db" --jndi-name=java:jboss/datasource/jsf-test3 --driver-name="sqlite"

step 3: enable datasource
[standalone@localhost:9999 /] data-source enable --name=jsf-test3


if you include WEB-INF/*-ds.xml following like xml file, you don't need step 2 and 3. 
But anyway you will need step 1.


<?xml version="1.0" encoding="UTF-8"?>
<datasources xmlns="http://www.jboss.org/ironjacamar/schema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.jboss.org/ironjacamar/schema http://docs.jboss.org/ironjacamar/schema/datasources_1_0.xsd">
    <datasource jndi-name="java:jboss/datasource/jsf-test3" pool-name="jsf-test3-pool" enabled="true" >
        <connection-url>jdbc:sqlite:C:/Users/dmotooka/AppData/sqlite/moto-test2.db</connection-url>
        <driver>sqlite</driver>
    </datasource>
</datasources>


-------------------

**check the driver:
[standalone@localhost:9999 /] cd subsystem=datasources/jdbc-driver=sqlite
[standalone@localhost:9999 jdbc-driver=sqlite] :read-resource
{
    "outcome" => "success",
    "result" => {
        "driver-class-name" => "org.sqlite.JDBC",
        "driver-module-name" => "org.sqlite",
        "driver-name" => "sqlite"
    }
}


**list installed driver:
[standalone@localhost:9999 /] /subsystem=datasources:installed-drivers-list
{
    "outcome" => "success",
    "result" => [
        {
            "driver-name" => "h2",
            "deployment-name" => undefined,
            "driver-module-name" => "com.h2database.h2",
            "module-slot" => "main",
            "driver-datasource-class-name" => "",
            "driver-xa-datasource-class-name" => "org.h2.jdbcx.JdbcDataSource",
            "driver-class-name" => "org.h2.Driver",
            "driver-major-version" => 1,
            "driver-minor-version" => 3,
            "jdbc-compliant" => true
        },
        {
            "driver-name" => "sqlite",
            "deployment-name" => undefined,
            "driver-module-name" => "org.sqlite",
            "module-slot" => "main",
            "driver-datasource-class-name" => "",
            "driver-xa-datasource-class-name" => "",
            "driver-class-name" => "org.sqlite.JDBC",
            "driver-major-version" => 3,
            "driver-minor-version" => 7,
            "jdbc-compliant" => false
        }
    ]
}


-------------------
**remove installed datasource:
[standalone@localhost:9999 data-source=jsf-test3] cd subsystem=datasources/data-source=jsf-test3
[standalone@localhost:9999 /] :remove

**remove installed driver:
[standalone@localhost:9999 /] cd /subsystem=datasources/jdbc-driver=sqlite
[standalone@localhost:9999 /] :remove


