find JBoss / Wildfly application server
./jboss-cli.sh
Install module containing the JDBC Driver. Specify the module name and the location where the jdbc driver has been downloaded:
module add --name=org.postgres --resources=/tmp/postgresql-9.3-1101.jdbc41.jar --dependencies=javax.api,javax.transaction.api
Now install the JDBC Driver on the application server:
/subsystem=datasources/jdbc-driver=postgres:add(driver-name="postgres",driver-module-name="org.postgres",driver-class-name=org.postgresql.Driver)
Finally install the datasource which will connect to the default "postgres" database on localhost:
data-source add --jndi-name=java:/PostGreDS --name=PostgrePool --connection-url=jdbc:postgresql://localhost/postgres --driver-name=postgres --user-name=postgres --password=postgres
ref:
http://www.mastertheboss.com/jboss-server/jboss-datasource/configuring-a-datasource-with-postgresql-and-jboss-wildfly
./jboss-cli.sh
Install module containing the JDBC Driver. Specify the module name and the location where the jdbc driver has been downloaded:
module add --name=org.postgres --resources=/tmp/postgresql-9.3-1101.jdbc41.jar --dependencies=javax.api,javax.transaction.api
Now install the JDBC Driver on the application server:
/subsystem=datasources/jdbc-driver=postgres:add(driver-name="postgres",driver-module-name="org.postgres",driver-class-name=org.postgresql.Driver)
Finally install the datasource which will connect to the default "postgres" database on localhost:
data-source add --jndi-name=java:/PostGreDS --name=PostgrePool --connection-url=jdbc:postgresql://localhost/postgres --driver-name=postgres --user-name=postgres --password=postgres
ref:
http://www.mastertheboss.com/jboss-server/jboss-datasource/configuring-a-datasource-with-postgresql-and-jboss-wildfly
本文详细介绍如何在JBoss Wildfly应用服务器上安装并配置PostgreSQL JDBC驱动及数据源,包括添加模块、安装驱动和创建数据源的具体步骤。
24万+

被折叠的 条评论
为什么被折叠?



