Skip to content

Instantly share code, notes, and snippets.

@jthmiranda
Created April 12, 2016 14:30
Show Gist options
  • Save jthmiranda/a390f45c7deb955b0e4faa4de55cd518 to your computer and use it in GitHub Desktop.
Save jthmiranda/a390f45c7deb955b0e4faa4de55cd518 to your computer and use it in GitHub Desktop.
ejemplo de unidad de persistencia con declaracion de propiedades para realizar consultas JPQL desde el IDE
<?xml version="1.0" encoding="UTF-8"?>
<persistence 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"
version="2.1">
<persistence-unit name="PUnombre" transaction-type="JTA">
<jta-data-source>jdbc/recurso</jta-data-source>
<properties>
<!-- Properties for EclipseLink >
<property name="eclipselink.logging.level" value="INFO"/
<property name="eclipselink.cache.shared.default" value="false"/>
<property name="toplink.jdbc.url" value="jdbc:oracle:thin:@//ip/base"/>
<property name="toplink.jdbc.driver" value="oracle.jdbc.OracleDriver"/>
<property name="toplink.jdbc.user"/>
<property name="toplink.jdbc.password"/>
<property name="hibernate.connection.url" value="jdbc:oracle:thin:@//ip/base"/>
<property name="hibernate.connection.driver_class" value="oracle.jdbc.OracleDriver"/>
<property name="hibernate.connection.username"/>
<property name="hibernate.connection.password"/>
<property name="openjpa.ConnectionURL" value="jdbc:oracle:thin:@//ip/base"/>
<property name="openjpa.ConnectionDriverName" value="oracle.jdbc.OracleDriver"/>
<property name="openjpa.ConnectionUserName"/>
<property name="openjpa.ConnectionPassword"/>
<property name="eclipselink.jdbc.url" value="jdbc:oracle:thin:@//ip/base"/>
<property name="eclipselink.jdbc.driver" value="oracle.jdbc.OracleDriver"/>
<property name="eclipselink.jdbc.user" value="nombredeusuario"/>
<property name="eclipselink.jdbc.password" value="contraseña"/>
-->
<property name="eclipselink.jdbc.url" value="jdbc:oracle:thin:@//ip/base"/>
<property name="eclipselink.jdbc.driver" value="oracle.jdbc.OracleDriver"/>
<property name="eclipselink.jdbc.user" value="nombredeusuario"/>
<property name="eclipselink.jdbc.password" value="contraseña"/>
</properties>
</persistence-unit>
</persistence>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment