I don't think it matters how many companies you have for this to work. The thing does not have to be completely dynamic unless you create the schema after startup. What I do is run an initializer servlet at startup. For each schema, I open a jcdalias (you could do this dynamically by creating a JdbcConnectionDescriptor instance (equivalent to coding a jdbc-connection-descriptor entry in repository.xml)). Unless there is something missing in this logic, you should be OK.

Wayne

cesar.leite wrote:

Hi Wayne

I read in emails this solution but my problem is that my application work "N" companies and for each company I have a schema different i'am working with DB2 and this solution is not best in my the case.

Is There another solution with ojb?

[ ]�s
Cesar



When a PersistenceBrokerFactory creates a PersistenceBroker

instance, it

can specify a different jcdalias. That alias can work again


st the same

repository.xml but a different url (accessing a different da


tabase). In

order for this to work properly, the OJB.properties should s


pecify


ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerB


rokerImpl


so that seperate caches are maintained for the separate PersistenceBroker instances.

Wayne


cesar.leite wrote:




Hi
I would like to know if with ojb i can change my schema whe


n

i'm executing my program?

Example: I can use the SCHEMA1.PRODUCT and later I can use SCHEMA2.PRODUCT to have access the same table product.

thanks.
Cesar


---
Acabe com aquelas janelinhas que pulam na sua tela.
AntiPop-up UOL - � gr�tis! http://antipopup.uol.com.br



-----------------------------------------------------------


----------


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


[EMAIL PROTECTED]






------------------------------------------------------------


---------


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






---
Acabe com aquelas janelinhas que pulam na sua tela.
AntiPop-up UOL - � gr�tis! http://antipopup.uol.com.br



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


Reply via email to