hy guys, i use eclipselink. in past i had always ONE domainname per PU for my url-tag, like this pu:
<persistence>
<persistence-unit name="PU_NAME">
<properties>
<property name="javax.persistence.jdbc.url" value="jdbc:oracle:thin:@DbDomainName:4242:XYZ"/>
</properties>
</persistence-unit>
</persistence>
now i need a PU which has not ONE domainname as url but MORE THAN ONE fixed ip-adr and my app has to choose by itself a reachable ip:
<persistence>
<persistence-unit name="PU_NAME">
<properties>
<property name="javax.persistence.jdbc.url" value="jdbc:oracle:thin:@127.0.0.1:4242:ABC"/>
<property name="javax.persistence.jdbc.url" value="jdbc:oracle:thin:@127.0.1.0:4242:ABC"/>
</properties>
</persistence-unit>
</persistence>
i have to use one persistence.xml which contains a pool of different persistence-units inside it. like this:
<persistence>
<persistence-unit name="PU_NAME">
<properties>
<property name="javax.persistence.jdbc.url" value="jdbc:oracle:thin:@127.0.0.1:4242:ABC"/>
<property name="javax.persistence.jdbc.url" value="jdbc:oracle:thin:@127.0.1.0:4242:ABC"/>
</properties>
<persistence-unit name="PU_NAME2">
<properties>
<property name="javax.persistence.jdbc.url" value="jdbc:oracle:thin:@DbDomainName:4242:XYZ"/>
</properties>
</persistence>
or is there another way to do this?