0

I have persistence.xml --------

<persistence-unit name="default" transaction-type="RESOURCE_LOCAL"> <provider> oracle.toplink.essentials.PersistenceProvider </provider> <exclude-unlisted-classes>false</exclude-unlisted-classes> <properties> <property name="toplink.logging.level" value="INFO"/> <property name="toplink.jdbc.driver" value="oracle.jdbc.OracleDriver"/> <property name="toplink.jdbc.url" value="jdbc:oracle:thin:@myhost:l521:MYSID"/> <property name="toplink.jdbc.password" value="tiger"/> <property name="toplink.jdbc.user" value="scott"/> </properties> </persistence-unit>

I have to give the reference of various properties used above by using properties file in Java,So any have idea how to do that.????

klobin
  • 41
  • 1
  • 11
  • You cannot just 'reference' the contents of a properties file in your persistence.xml, but you can for example replace placeholders on build. What build system are you using? – kostja Apr 24 '14 at 09:05
  • I am not getting what You are talking about build system . – klobin Apr 24 '14 at 11:56
  • Meaning how do you go from source code to an executable application. Popular choices are ant, maven, gradle. – kostja Apr 24 '14 at 12:02
  • As In normal Jpa working we only use persistence.xml for configuring whole connection ,So my question is that,Cant it be done, Same in Open Jpa.....!!!! – klobin May 08 '14 at 07:02

0 Answers0