Hi Christophe,

Christophe.Demarey wrote:
Hi,

Is there a way how I can simultaneously use multiple databases from OJB JDO ?

OJB allows us to specify multiple jdbc-connection in the database repository but I don't know how to choose a jdbc-connection via the OJB JDO api ?

Currently our JDO solution does only work against the default Persistencebroker. So there is currently no way to use more than one db with simple API calls.



I wonder if the following JDO code works with OJB :


PersistenceManagerFactory pmf =
(PersistenceManagerFactory) Class.forName(pmf_class).newInstance();
pmf.setConnectionURL(db_url);
pmf.setConnectionDriverName(db_driver);
if (user_name != null)
pmf.setConnectionUserName(user_name);
if (password != null)
pmf.setConnectionPassword(password);


Can someone tell me if these properties are used ?
No these methods are are not used in our solution.

If not, what is used and how configure it?

We are using the settings of the default PersistenceBroker in the repository.xml.
So you can change the db url by changing the OJB Metadata at runtime through the o.a.ojb.broker.metadata.MetaDataManager.


cheers,
Thomas


Thanks.






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to