We need to replace the user defined properties of database details with the JTA tag using Eclipse Link. I have the below persistence.xml working with DB values.
<?xml version="1.0" encoding="UTF-8"?>
<persistence xsi:SchemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
<persistence-unit transaction-type="RESOURCE_LOCAL" name="UTILITY">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<class>ae.du.selfcare.utility.jpa.SelfcareJmsCreatett</class>
<properties>
<property name="eclipselink.logging.level" value="FINEST"/>
<property name="javax.persistence.jdbc.driver" value="oracle.jdbc.driver.OracleDriver"/>
<property name="javax.persistence.jdbc.url" value="jdbc:Oracle:thin:@IMP1SCDVDB1:1524:SCRTQC2"/>
<property name="javax.persistence.jdbc.user" value="******"/>
<property name="javax.persistence.jdbc.password" value="********"/>
<property name="eclipselink.connection-pool.default.initial" value="1"/>
<property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
<property name="eclipselink.ddl-generation.output-mode" value="database"/>
</properties>
</persistence-unit>
</persistence>
I know how to achieve using this JTA with Hibernate
<persistence-unit name="PU" transaction-type="JTA">
<jta-data-source>java:jboss/datasources/Hanse</jta-data-source>
<class>model.Commodity</class>
<class>model....</class>
<class>model....</class>
<properties>
<!-- <property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform"/> -->
<!-- <property name="hibernate.hbm2ddl.auto" value="update" /> -->
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect" />
<!-- <property name="hibernate.show_sql" value="true" /> -->
<property name="hibernate.enable_lazy_load_no_trans" value="true"/>
</properties>
</persistence-unit>
But here, I need to with Eclipse link. Can you please help me out. Thanks in advance!!.