Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <tomee>
- <!-- see http://tomee.apache.org/containers-and-resources.html -->
- <!-- activate next line to be able to deploy applications in apps -->
- <!-- <Deployments dir="apps" /> -->
- <!-- <Resource auth="Container" driverClassName="org.postgresql.Driver" global="jdbc/MyPostgresDB" name="jdbc/MyPostgresDB" password="postgres" type="javax.sql.DataSource" url="jdbc:postgresql://127.0.0.1:5432/Hibernate" username="postgres"/> -->
- <Resource id="PostgresDbDs" type="javax.sql.DataSource">
- # PostgreSQL connection
- jdbcDriver=org.postgresql.Driver
- jdbcUrl=jdbc:postgresql://127.0.0.1:5432/Hibernate
- userName=postgres
- password=postgres
- jtaManaged=true
- </Resource>
- </tomee>
- Connection conn = dataSource.getConnection();
- Statement st = conn.createStatement();
- Cannot create JDBC driver of class '' for connect URL 'null'
- <?xml version="1.0" encoding="UTF-8"?>
- <persistence version="2.1"
- xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
- <persistence-unit name="movie-unit" transaction-type="JTA">
- <!-- <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> -->
- <jta-data-source>PostgresDbDs</jta-data-source>
- <non-jta-data-source>PostgresDbDsNotManagingBhai</non-jta-data-source>
- <class>org.ap.poc.ejb.Movie</class>
- <properties>
- <!-- <property name="eclipselink.ddl-generation" value="create-tables"
- /> <property name="eclipselink.ddl-generation.output-mode" value="database"
- /> <property name="eclipselink.logging.level" value="FINE" /> -->
- </properties>
- </persistence-unit>
- </persistence>
Add Comment
Please, Sign In to add comment