Skip to Content
author's profile photo Former Member
Former Member

Limit JCO connections from Portal

Hi experts,

We have an EP 6.0 with a set of Java Iviews connecting to a CRM system via JCO throgh the following code (included as example)

// get a client service

IJCOClientService clientService = (IJCOClientService) request.getService(IJCOClientService.KEY);

IJCOClientPoolEntry poolEntry;

try {

poolEntry = clientService.getJCOClientPoolEntry(queryOneBean.getSapSystemName(), request);


catch (Exception e) {

errorBean.setErrorText("Error obtaining connection: " + e);




JCO.Client client = null;

Z_Hus_P18_Dropdownboxes_Input input = null;

Z_Hus_P18_Dropdownboxes_Output output = null;

try {

client = poolEntry.getJCOClient();

//Definici�n de Proxy

com.sapportal.husa.distpro.Z_HUS_P18_DROPDOWNBOXES.Proxy_PortType myproxy =

new com.sapportal.husa.distpro.Z_HUS_P18_DROPDOWNBOXES.Proxy_PortType();


//Input params

input = new Z_Hus_P18_Dropdownboxes_Input();

//Output data

output = myproxy.z_Hus_P18_Dropdownboxes(input);


catch (JCO.Exception ex) {

errorBean.setErrorText("JCO.Exception (" + ex.getGroup() + "): " + ex.getMessage());


System.out.println("JCO.Exception " + ex.getMessage() );



catch(Exception ex){

errorBean.setErrorText("Exception "+ ex.getMessage());


System.out.println("Exception " + ex.getMessage() );




//always release the SAP connection

if( client.isAlive() ){





Our client now wants to limit the concurrent users being able to use these iviews to a maximum of 100. They are worried about the backend CRM being overloaded.

We've accesed to the following menu: System Administration > System Configuration > Service Configuration > Applications > > Services > jcoclient and set values Poolsize = 1, Poolsizedefault = 1, Pooltableinitialsize = 1 and Repositorytableinitialsize = 1, just to check whether this change works or not and unfortunately it allows the same amount of concurrent users as before.

Any one can help us? Any other way to set a limit of concurrent RFC from Portal?

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 08:45 AM

    Hi Felip,

    Yes you can really limit the no of connections to backend. Make use of JCOPool, and create connections out of that, while creating Pool you can specify no of active connections, once the no is reached it wont allow excess connections.

    Here is the code which you can use:


    here 3 indicates no of active connections

    200 is the client for backend system.

    i guess you need changes in code, check if this helps.


    -Kedar Kulkarni

    reward points if useful

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 08:55 AM

    Hi Felipe,

    We can set the maximum pool size for JCo. Like this Content Administration-> Web Dynpro; browse to your application from the panel in the left side. Open the application by double click. On the right hand side the JCos for the application are shown. Click on edit. In step 4 you can set the maximum pool size for JCo. Coming to overload issue, remember the backend CRM is used whenver the RFC call is active [RFC execution method is running]. So if 100 users opened the iView does not mean that 100 users are accessing the backend system unless they call RFC execution at same time.

    Hope this helps.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.