简体   繁体   English

将 Java SCP 应用程序连接到内部部署 JCo3 的 ABAP

[英]Connecting Java SCP app to ABAP on-premise JCo3

I am developing a Java app that is deployed on the SAP Cloud Platform, using the SAP JCo3 Connector.我正在使用 SAP JCo3 连接器开发部署在 SAP Cloud Platform 上的 Java 应用程序。 It should make some RFC calls to an ABAP Backend, therefore I am using a SAP Cloud Connector.它应该对 ABAP 后端进行一些 RFC 调用,因此我使用的是 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.目标是在 SAP Cloud Platform 中定义的,但是我想动态传递用户名和密码(来自登录掩码)以使用不同的用户登录 SAP 后端。 The aforementioned properties are jco.client.user and jco.client.passwd respectively.上述属性分别是jco.client.userjco.client.passwd

How can one dynamically change the properties of the JCoDestination, enabling several users using the application concurrently?如何动态更改 JCoDestination 的属性,从而允许多个用户同时使用该应用程序? There is no method "setProperties(...)".没有方法“setProperties(...)”。

You can't use Properties-files for this but have to register a DestinationDataProvider.您不能为此使用属性文件,但必须注册 DestinationDataProvider。 This topic has been discussed at SAP , the answer contains example code how to do this. SAP已讨论过此主题,答案包含如何执行此操作的示例代码。

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 .另一个涵盖此主题的文档是如何从 SAP JCo2 迁移到 SAP JCo3 并在多线程环境中使用 SAP JCo3 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您可能对执行迁移的特定怪癖不感兴趣,但它描述了诸如 DestinationDataProvider 之类的内容以及您可能会觉得有用的其他内容

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM