Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Utilizando jboss-cli.bat
- Paso 1. subir el driver a wildfly
- module add --name=org.postgres94 --resources=/Users/fernando/docs/javaForWeb/lib/postgresql-9.4.1211.jar --dependencies=javax.api,javax.transaction.api
- Paso 2. registrar el driver
- /subsystem=datasources/jdbc-driver=org.postgres94:add(driver-name="org.postgres94",driver-module-name="org.postgres94",driver-class-name=org.postgresql.Driver)
- Paso 3. crear el datasource
- data-source add --jndi-name=java:/DataSourcePostgres --name=DataSourcePostgress --connection-url=jdbc:postgresql://localhost/JavaForWeb --driver-name=org.postgres94 --user-name=postgres --password=sample
- Paso 4 cambiar el hibernate.cfg.xml
- <property name="connection.datasource">java:/DataSourcePostgres</property>
- <!-- JDBC Database connection settings -->
- <!--
- <property name="connection.driver_class">org.postgresql.Driver</property>
- <property name="connection.url">jdbc:postgresql://localhost:5432/JavaForWeb</property>
- <property name="connection.username">postgres</property>
- <property name="connection.password">postgres</property>
- !-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement