cancel
Showing results for 
Search instead for 
Did you mean: 

PE4AD - Question regarding Multitenancy and Dynamic Datasource lookup

Former Member
0 Kudos

Hi all,

I am trying to setup a multitenant test enviroment. And followed the step described here: SAP HANA Cloud Platform

But it is not clear to me how to implement a dynamic datasource. I have to account a1 and b1. I subscribe b1 to application of a1 and then what? if i try to bind a new schema with the same datasource name i get an error. but the jndi lookup specifies the name. Any help is appreciated.

Regards Mathias

Accepted Solutions (0)

Answers (1)

Answers (1)

timo_renner
Advisor
Advisor
0 Kudos

Hi Mathias,

if it is feasible for you to configure the data source binding once per application, then you don't have to go for this approach. Then it is sufficient to change the binding via the HANA cloud cockpit.

Before switching to a new binding you have to delete the old one.

Best regards,

Timo

Former Member
0 Kudos

Ok, but i want Multitenancy with multiple DB Schemas, so i need more then one Binding correct? And then i need to lookup the Datasource dynamicaly or am I wrong?

Regards

Mathias

GregTutt
Explorer
0 Kudos

Hey Mathias,

Are you using persistence ? In eclipselink, you can put your multitenant to use different schema.

@Multitenant(TABLE_PER_TENANT)

@TenantTableDiscriminator(SCHEMA)

In the application we built, like Timo mentioned, we configured the binding on our HCP account to which all other accounts are subscribed to ; eclipselink will handle the tenant perfectly.

Regards

Greg

Former Member
0 Kudos

Hi Greg, i will try this out and get back to you.

Thanks in advance for your help!