Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connect to SAP message server through JCO

Tags:

java

sap

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, "");

...

like image 352
user965220 Avatar asked Mar 22 '23 11:03

user965220


1 Answers

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.

like image 103
vwegert Avatar answered Mar 24 '23 01:03

vwegert