Wildfly comes with the the best module management for managing classloading of your deployed application.

1. Create new folder structure for the new driver, $WILDFLY_HOME/modules/org/postresql/9.4

2. Create the corresponding module.xml as below.

3. Add a driver based on the new module

Note the module is specified as org.postgresql:9.4 to specify the specific slot/version we want to use. If not specified Wildfly will user the default slot/version, main.

4. Use the driver in your datasource by specifying the driver as postgresql94