I\'ve tried tutorial at mastertheboss.com:
./jboss-cli.shmodule add --name=org.postgres --resources=/tmp/postgresql-9.3-1101.jdbc4
Put your Postgres JDBC driver into deployment folder (just deploy). Now use CLI console and enter this command:
data-source add --name=PostgresqlDS --jndi-name=java:jboss/datasources/PostgresqlDS --driver-name=postgresql-9.4-1201.jdbc41.jar --connection-url=jdbc:postgresql://localhost:5432/test --user-name=USER --password=PASSWORD
Check if your driver is jdbc4.
I don't know why but adding datasources by web console doesn't work. By CLI works.
The right solution for extending JDBC drivers is add driver as module to server. In WildFly 9 you can do it using cli console. You can't do this by copy JDBC jar file (with xml) to "module" folder like in WildFly 8.
Execute commands:
module add --name=org.postgres --resources=postgresql-9.4-1201.jdbc41.jar --dependencies=javax.api,javax.transaction.api
/subsystem=datasources/jdbc-driver=postgres:add(driver-name="postgres",driver-module-name="org.postgres",driver-class-name=org.postgresql.Driver)
To list instaled drivers enter:
/subsystem=datasources:installed-drivers-list
With driver creating datasources will be easy.
Please use 9.0 Final version. In CR are bugs.
Regards, Pawel M