I am developing a Java app that is deployed on the SAP Cloud Platform, using the SAP JCo3 Connector. It should make some RFC calls to an ABAP Backend, therefore I am using a SAP Cloud Connector. The destination is defined in the SAP Cloud Platform, however I would like to dynamically pass the Username and Password (from a login mask) to login in the SAP back-end with different users. The aforementioned properties are jco.client.user and jco.client.passwd respectively.
How can one dynamically change the properties of the JCoDestination, enabling several users using the application concurrently? There is no method "setProperties(...)".
You can't use Properties-files for this but have to register a DestinationDataProvider. This topic has been discussed at SAP, the answer contains example code how to do this.
Another document that covers this topic is How to Migrate from SAP JCo2 to SAP JCo3 and use SAP JCo3 in a Multi-Threaded Environment. You might not be interested into the particular quirks in order to do a migration, but it describes things like the DestinationDataProvider and other things you might find useful