简体   繁体   中英

Connect to SAP message server through JCO

I have a working connection between my Java application and a SAP server through use of SAP JCO. The problem is that my connection is limited to 1 server. There should be an option available for connecting to a SAP message server that acts like a load balancer.

Does anyone have an idea how this works?

My working Hibersap example:

final SessionManagerConfig sessionManagerConfig = new SessionManagerConfig("");

 sessionManagerConfig.setContext(JCoContext.class.getName()); sessionManagerConfig.setProperty(DestinationDataProvider.JCO_ASHOST, ""); sessionManagerConfig.setProperty(DestinationDataProvider.JCO_SYSNR, ""); sessionManagerConfig.setProperty(DestinationDataProvider.JCO_CLIENT, ""); sessionManagerConfig.setProperty(DestinationDataProvider.JCO_USER, ""); sessionManagerConfig.setProperty(DestinationDataProvider.JCO_PASSWD, ""); sessionManagerConfig.setProperty(DestinationDataProvider.JCO_LANG, ""); ... 

Instead of JCO_ASHOST and JCO_SYSNR , you have to provide

  • JCO_R3NAME with the system ID of the target system
  • JCO_MSHOST with the message server host name or address
  • JCO_MSSERV with the message server port number
  • JCO_GROUP with the name of the logon group

See this file for a working example using JCo3.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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