cancel
Showing results for 
Search instead for 
Did you mean: 

Limit JCO connections from Portal

Former Member
0 Kudos

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

queryOneBean.setFlowState(ERROR);

return;

}

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();

myproxy.messageSpecifier.setJcoClient(client);

//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());

queryOneBean.setFlowState(ERROR);

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

return;

}

catch(Exception ex){

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

queryOneBean.setFlowState(ERROR);

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

return;

}

finally{

//always release the SAP connection

if( client.isAlive() ){

client.disconnect();

poolEntry.release();

}

}

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 > com.sap.portal.runtime.application.jcoclient > 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.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member197348
Active Contributor
0 Kudos

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.

regards,

Siva

Former Member
0 Kudos

Hi Siva,

we're using Java iViews as said in my question, not webdynpros. Thanks anyway for your response.

Former Member
0 Kudos

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:

JCO.addClientPool("POOL_NAME",3,"200","<USER_ID>","<PASSWORD>","EN","<SYSTEM_NAME>","<SYS_NO>");

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.

regards

-Kedar Kulkarni

reward points if useful

Former Member
0 Kudos

Thanks Kedar but we'd like to avoid changing our source code at this stage. We're looking for a service configuration solution or something like that.