Q:

One javax.persistence.jdbc.url for windows and linux using firebird

I want to use linux at work but everytime a class gets added to persistence.xml I have to change it's javax.persistence.jdbc.url.
Is there a way to make hibernate use one property for windows and another one for linux without creating two files?
windows is like C:/blah/db.gdb and linux is /home/blah/db.gdb
how can we use one for all?

A:

You can define an alias on the server in aliases.conf and then specify that alias in the connection url instead.
Say that the alias is myApplicationDb, then you can use the URL:
jdbc:firebirdsql://myserver/myApplicationDb

However this is less flexible because it requires you to maintain the aliases.conf file.

