on 06-13-2014 11:39 AM
HI,
When i spawn a new Thread in my application and try to find the destination in that new thread, the destination in tenant space is not being picked up.
But, if i configure a destination with same name in provider space, that gets picked up by destinationfactory.getDestination()
so,I think the tenantcontext is lost in the new thread. Please find the sample code attached.
Is there any way to get around this problem?
Hi,
Tenant context is not propagated from parent -> child threads. New (background) threads are executed on behalf of the provider account. You can change tenant context in background threads using com.sap.cloud.account.TenantContext#execute() method. More details are available here : https://help.hana.ondemand.com/javadoc/com/sap/cloud/account/TenantContext.html.
Best regards,
Nikolai.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.