Skip to Content
Author's profile photo Wayne Smith

How to setup JCO Connection Pooling in SMP 3.0 MBO

How to setup JCO Connection Pooling in SMP 3.0

 

Purpose

This technical document explains how to setup JCO connection pooling in SUP/SMP. JCO is the driver used to connect to SAP back end Data Servers. We will explore the available configuration options for connection pooling and what is supported and what versions of SMP that are needed to be used.

DESCRIPTION Connection pooling can speed up the connection process. By setting the refresh and time to live for the connection in the pool help keep the connection up to date. This does not improve data processing only the connection and log in processing to the back end server.
Required Software

  1. SMP 3.0 or higher.
  2. JCO connection to a SAP R3 Backend..

Assumption

  • This document assumes you have a working SMP environment.
  • You have an SAP  R3 CRM, ERP Backend

 

  • Have Administrator rights to the Operating System and Sybase Unwired Server.
  • You have configured a JCO connection thru SCC to connect to SAP.

Issue1:

  • Need to implement Connection Pooling.
  • In SMP/SUP no option for connection pooling.
  • In SCC for JCO there are no Connection pooling.

 

Solution

Under SUP/SMP Connection pooling for the JCO is not available as an option this is by design. There is JVM memory and performance consideration that need to be taken in to consideration when implementing JCO connection pooling. Adding in JCO destination pooling properties into a SUP server SAP connection is an UNKNOWN/UNQUANTIFIED risk as to any memory loading the SAP JCO sub systems may add to the Virtual memory footprint of the server OS. You must test for best results in you environment.

 

Step 1 Creating a JCO connection properties file:

  1. Use a text editor like Notepad and create a connection.properties file in C:\temp\ connection.properties
  2. Add the following to your connection.properties file. # BASE SUP properties

jco.client.client=800

jco.client.codepage=1100

jco.client.lang=EN

jco.client.YourServername.YourDomainName.com

jco.client.sysnr=00

jco.client.user=yourUsername

jco.client.passwd=YourPassword

# Type of remote host 2 = R/2, 3 = R/3, E = External

#jco.client.type=”3″ We will default to 3 so no need to use this line.

 

#Pool properites from the JCo v3

#Maximum number of active connections that #can be created for a destination simultaneously

jco.destination.peak_limit=50

#Maximum number of idle connections kept open by the destination. #A value of 0 has the effect that there is no connection pooling.

jco.destination.pool_capacity=200

#Time in ms after that the connections hold by the destination can be closed

jco.destination.expiration_time=60000

#Period in ms after that the destination checks the released connections for expiration

jco.destination.expiration_check_period=60000

#Max time in ms to wait for a connection, if the max allowed number #of connections is #allocated by the application jco.destination.max_get_client_time=30000

  1. Edit the connection.properties and add the server and domain address you will also need to add the correct user and password information as well check and make sure you have all the correct information to connect to the SUP server.
  2. Save the file.

 

Now that we have created our connection properties we will need to import the file into the SUP Workspace.

Step 2 Importing the JCO connection properties file in to SUP.

  1. Start the SUP Workspace from the desktop icon.

2.    Go to Enterprise Explorer then tree open SAP Servers

 

Figure 1.

 

Right Click on SAP Servers Folder and select New

Figure 2.

3.    Change the Name: To something like SAP Pooling TEST.
Figure 3.

 

  1. Click Next >.

5.       At the very top we now need to select Create from Properties file.

Figure 4.

.       Click the Brows Button

Figure 5.

 

Brows to the Temp directory where we created the connection.properties file

  1. Select the connection.properties file and click on Open.
  2. Then Click on Next.
  3. After Click Next we should see the following Screen.

Figure 6.

 

GUI. You have to edit the connection properties file. If the information looks correct Click Finish.

Now that we have completed the creation of our JCO connection that will use connection pool we need to open the connection and test it.

 

Step 3: Testing the newly created connection with pooling.

 

Go to the Enterprise Explorer and tree open the SAP Server folder.

You should now see the SAP Pooling Test.

1-      Right Click the data source SAP Pooling Test and select Connect.

 

Figure 7.

You should now be connected to your SAP server

Figure 8.

 

This concludes the steps needed to create a JCO connection profile that enables the JCO connection pooling in SIP/SMP Workplace.

 

Issue2 After deploying the MBO’s with Connection pooling enable the data values are not migrated over to SUP.

When deploying to the SMP server the data values for the Connection pooling is not there they are stripped when sent to SUP Server.
This is by design in order to add the connection pooling option in SCC you have to edit the JCO connection and use the pull down menu

jco.destination.peak_limit=50

jco.destination.pool_capacity=200

jco.destination.expiration_time=60000

jco.destination.expiration_check_period=60000

jco.destination.max_get_client_time=30000

This is current only supported with SMP versions 2.2.4 or higher. In the older versions of SUP there is no interface option to add a user defined option for the drivers. to add the option you will need to add a user defined properties add the property value jco.destination.peak_limit and then add the data value 50 you will need to do this for each connection pooling option

 

Figure 9.

1-    Select a connection property from the menu see Figure 9

2-    Highlight and back space to remove the reference.

3-    Add jco.destination.peak_limit

4-    Click on the menu item to add you Data value 50

5-    Repeat each steps until you have all 4 values entered

6-    When done do a test connect

7-    Save and exit.

Summary

This document explained in details how to setup JCO Connection pooling in SUP/SMP.  As you can see the steps are very easy and can help to improve the connection processes. As with any changes you should test before fully implementing the changes and make any adjustment if needed. Connection pooling can in most environments will improve the connection processes to the back end servers. A big Thanks goes out to Lance Waterman and Duncan Rigby from SUP engineering in assisting in figuring this all out.

 

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.