The JCo API offers eight distinct JCO.createClient() methods to establish a connection to the SAP application server. Eight uses of the same connection method may seem to be a bit overwhelming at first. In actuality, there are really only three mechanisms used by the JCo API to pass values to the createClient() method. This article reviews these mechanisms and offers some recommendations on the best way to pass system parameters to an SAP JCo connection.
The most basic use of createClient() is to simply call this method by passing the required parameters as String values. These are relatively quick and dirty connections to SAP, and are mainly useful in a development effort that requires a basic connection to the SAP application server.
The second mechanism for calling createClient() entails the use of a multi-dimensional String array where parameters are passed as name/value pairs. This technique is more robust than the first and allows you to pass more system parameters to SAP.
The third mechanism allows you to pass an external properties file with name/value pairs as a single value to the createClient() method. This is useful when a centralized configuration is required.
In addition to the first method mentioned above, the JCo API provides 5 other versions of the createClient() method that allow you to pass String parameters directly. The differences between each version illustrate the different connection mechanisms available in the SAP server landscape. These range from connecting to a single SAP application server with no load balancing, to calling a message server that supports logon load balancing across an SAP system, to executing a registered RFC server program on a remote system. This article focuses on the transport mechanisms rather than on the varied system landscape connections. However, each example can be tailored to the specific configuration of your SAP systems.
Austin Sincock, technical author and SAP/Java evangelist Austin Sincock is a freelance SAP integration architect, specializing in high performance Java development for SAP. He is also the author of Enterprise Java for SAP.
Copyright 2005TechTarget
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.
All Rights Reserved, Copyright 2000 - 2008, TechTarget | Read our Privacy Policy SearchSAP.com is a search service provided by TechTarget and is completely independent of and not affiliated with SAP AG.