Hi,

----- Original Message -----
From: "Rajeev Kaul" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Thursday, April 03, 2003 8:01 PM
Subject: Re: Dynamic OR Maping


> Can you please elaborate on what you mean by "in a per thread manner
or
> global"?  I thought OJB can only have a global metadata definition.

Yes, per default OJB use a global metadata definition. MetadataManager
(MM) handle this stuff. We split the metadata information from the
repository
file in two 'parts':
- jdbc connection information
- persistent object information
First was handled by the ConnectionRepository,
second by DescriptorRepository
With MM#getRepository() per default you will get a  global
DescriptorRepository. Each modification affect the whole application.

But it's possible to enable a 'per thread' mode, this allows you to set
a specific DescriptorRepository for the current thread. Thus it is
possible
to hold e.g. different DescriptorRepository instances (means different
ClassDescriptor
metadata, in your case for the same objects) in a map and
associate these with the current thread. In the MM javadoc you will
find an example.

regards,
Armin

> Are you
> implying by "per thread" to mean that each application can dynamically
load
> its own metadata using the same OJB instance?



> If that is the case, then it
> solves the problem of metadata conflicts for co-existing applications
> sharing a single OJB instance.
>
> Please clarify/confirm this.
>
> regards,
>
> Rajeev
>
>
> ----- Original Message -----
> From: "Armin Waibel" <[EMAIL PROTECTED]>
> To: "OJB Users List" <[EMAIL PROTECTED]>
> Sent: Thursday, April 03, 2003 7:11 AM
> Subject: Re: Dynamic OR Maping
>
>
> > Hi,
> >
> > it is possible to change the persistent object metadata
> > (all ClassDescriptors) in a per thread manner or global
> > using the org.apache.ojb.broker.metadata.MetadataManager.
> >
> > > Is this possbile ? If not, where can I get in dynamic OJB config ?
> > It is also possible to load and merge
> > additional repository class-descriptor at runtime with
> > global repository file.
> >
> > regards,
> > Armin
> >
> >
> > ----- Original Message -----
> > From: "Goncalo Luiz" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, April 03, 2003 2:07 AM
> > Subject: Dynamic OR Maping
> >
> >
> > Hello.
> >
> > I need to use a variable in my repository-user.xml file to use
multiple
> > instances of the same application, each one using a differente table
for
> > the same classes.
> > .
> > For example, if I run an instance of MyApp I'd like it to something
like
> > this:
> >
> > <class-descriptor
> >  table="instance123....
> >
> > but in another instance if may look like
> >
> > <class-descriptor
> >  table="instance342....
> >
> > What I need is something like
> >
> > <class-descriptor
> >   table=${some_variable_in_java_context}
> >
> > Is this possbile ? If not, where can I get in dynamic OJB config ?
> >
> > I hope I was clear enough to get answers :-)
> >
> > Thanx in advance
> > ----
> > Gon�alo Luiz - IST 4� Ano (PSI)
> > [EMAIL PROTECTED]
> > ----
> > Gon�alo Luiz - IST 4� Ano (PSI)
> > [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> > 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]
>
>
>


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

Reply via email to