Hi Hans,
Hans Novak wrote:
Hi,
i want to change dynamicly the location of the database Server, what is
describe in "repository.xml"
Is it possible, to read the defaults from the "repository.xml" and then,
if is neccesery change the value temporary to another location ?
I dont want to overwrite the "repository.xml" file.
My wish is to change it on runtime.
you can find some suggestion about metadata handling here
http://db.apache.org/ojb/docu/guides/metadata.html
It's not recommended to change existing metadata instances at runtime,
because all changes will be global changes (e.g. remove or add a new
FieldDescriptor for a specific persistence capable class) or/and the
changes will not be detected by OJB because the metadata information is
only read once (e.g. when OJB setup a connection factory).
If you use different database server then it's recommended to setup a
jdbc-connection-descriptor (jcd) for each DB (you can define different
jcd in the repository file, read additional jcd in a separate repository
file at runtime or completely create an jcd at runtime and add it to the
existing onces). You can lookup the additional databases via the
jcdAlias name of the jcd.
http://db.apache.org/ojb/docu/guides/pb-guide.html#lookup-pb
(Take care of cache synchronization when using the same persistence
capable classes in different databases)
regards,
Armin
Hans
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]