db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Armin Waibel <arm...@apache.org>
Subject Re: Metadata issues
Date Thu, 25 Mar 2004 16:19:42 GMT
Hi Tom,

 > But how do I combine the connection with the descriptor repository,
 > e.g. I have (in the same thread) two connections each with its own
 > descriptor repository ?
 >
 > Would it make sense to use the pbKey in the PersistenceBrokerImpl.refresh
 > as a key for obtaining the descriptor repository for this connection
 > method ?
 >

Think this would be a good new feature for 1.1.
Bind a RepositoryDescriptor instance (repository file) to a PBKey at 
runtime would be a nice feature. I would propose to introduce a new method
MetadataManager.getInstance().getRepository(PBKey key)
or something similar. Then the refresh-method in PBImpl can use this 
method to assign the according repository.

Big problems are:
- QueryByCriteria does a direct MetadataManager access to read metadata 
information without an associated PBKey or PBImpl instance
- odmg.OQLParser use MetadataManager too
How can we get the PBKey in these classes or how can we avoid 
MetadataManager use?

regards,
Armin

Thomas Dudziak wrote:

> I was pondering about the metadata handling in OJB (also because I need
> some advanced stuff in a project of mine), and stumbled upon the following
> situation:
> 
> Imagine that there is a single web application that uses two distinct
> databases. Distinct here means fully separated, i.e. separated connection
> descriptor (created at runtime), separated object metadata (in two
> repository.xml files), and even different OJB settings (in particular,
> different PersistentFieldClass settings).
> 
> Now I can create different connections using
> ConnectionRepository.addDescriptor in conjunction with different PBKeys,
> and I can also manually load the object metadata using
> MetadataManager.readDescriptorRepository.
> 
> But how do I combine the connection with the descriptor repository,
> e.g. I have (in the same thread) two connections each with its own
> descriptor repository ?
> 
> Would it make sense to use the pbKey in the PersistenceBrokerImpl.refresh
> as a key for obtaining the descriptor repository for this connection
> method ?
> 
> Any thoughts appreciated,
> Tom
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message