Hi,
You can give "toplink.jdbc.url" property by API parameter rather than in
persistence.xml.
http://java.sun.com/javaee/5/docs/api/javax/persistence/Persistence.html#createEntityManagerFactory(java.lang.String,%20java.util.Map)
Put those properties in the Map if you need dynamic property values.
Is this enough for you?
-Wonseok
On Jan 1, 2008 9:45 AM, digi_pixel <napperley_at_gmail.com> wrote:
> Is it possible to have the persistence.xml file with the *"
> toplink.jdbc.url"* property set to a relative path? There is a high
> possibility that the client might want to move the database to a more
> suitable location. If it is possible to set the property to a relative path
> then it would not matter where the database is located.
>
> Should relative paths fail to work then I will have to supply a separate
> Java program that manually adjusts persistence.xml every time the DB is
> moved to a different location (I would prefer to avoid this if possible).
> Derby is being used as the embedded DB (entire DB is contained in a single
> directory) for a standalone desktop application which is deployed via Web
> Start.
>
> ------------------------------
> View this message in context: Dynamically Adjusting Persistence.xml For DB
> Path?<http://www.nabble.com/Dynamically-Adjusting-Persistence.xml-For-DB-Path--tp14563115p14563115.html>
> Sent from the java.net - glassfish persistence mailing list archive<http://www.nabble.com/java.net---glassfish-persistence-f13455.html>at
> Nabble.com.
>