Hello Lasse,

> -----Original Message-----
> 
> <class-descriptor class="User" table="PRODUCTION.USER">
> .........
> </class-descriptor>
> <class-descriptor class="User" table="PRODUCTION.ORDER">
                           ^^^^
I suppose you mean 'Order' here?

> .........
> </class-descriptor>
> 
> and
> 
> <class-descriptor class="User" table="TEST.USER">
> .........
> </class-descriptor>
> <class-descriptor class="User" table="TEST.ORDER">
                           ^^^^
ditto.

> .........
> </class-descriptor>

> 
> - The qualifier depends on what the user has choosen at the login of
> our application
> -  It's a webbased application
> 
> Is there a way I can set the qualifier at runtime in order to switch
> between them?

Something like (untested)

mdm = org.apache.ojb.broker.metadata.MetadataManager.getInstance();
dr = mdm.getDescriptorRepository();
cld = dr.getDescriptorFor(User.class);
cld.setTableName("TEST.USER");

might work.  Given that in your application several users access the 
database with different qualifiers, you may have to switch back and
forth and care abot multithreading.  I do not know what happens then,
maybe someone else can help.

Olli

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

Reply via email to