cancel
Showing results for 
Search instead for 
Did you mean: 

Number of connections expiry problem - URGENT

former_member1191927
Participant
0 Kudos

Hi all,

We are using Adaptive RFC model to connect to R/3 and call BAPIs. All the applications use a single JCO connection (which we create in content admin->webdynpro) to connect to R/3.

<b>We were getting "<u>max no of 100 conversations</u> exceeded" exception with the JCO.</b>

Here's the exact exception :-

com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed Connect_PM GWHOST=149.183.181.210, GWSERV=3318, ASHOST=149.183.181.210, SYSNR=18 LOCATION CPIC (TCP/IP) on local host ERROR max no of 100 conversations exceeded TIME Wed Dec 21 22:43:55 2005 RELEASE 640 COMPONENT CPIC (TCP/IP) VERSION 3 RC 466 MODULE r3cpic.c LINE 9704 COUNTER 3

Here is the code which we are using to connect and disconnect to R/3</b> :-

IWDJCOClientConnection connection = WDSystemLandscape.getJCOClientConnection(

"PROD_MODELDATA_RFC",

"");

JCO.Client client = connection.getClient()

<modelobj>.setJcoClient(client);

<code to execut the BAPI>

...

...

JCO.releaseClient(client);

connection.release();

All the applications use the same JCO and the same code (as mentioned above) to connect and disconnect.

Even now we are getting the same exception with the JCO and thus no data is returned and no application works.

<b>I have checked in R/3, <u>the connections are getting created, but not getting closed</u>.</b>

<b>So, now my question is, am I using the right API to connect and disconnect??</b>

Please help me in this. This is very urgent.

Regards,

Narahari

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Your code looks okay to me.probably you can try disconnect instead of release.

Former Member
0 Kudos

AFAIK it is an error to call disconnect on JCO connection received from pool, error message states that release is necessary.

VS

former_member1191927
Participant
0 Kudos

Hi all,

Yes. Like Valery has pointed out, if i try to use JCO.Client.disconnect(), it throws the following exception:-

com.sap.mw.jco.JCO$Exception: (106) JCO_ERROR_RESOURCE: A client allocated from pool PROD_MODELDATA_RFC_sunih1_EN_useDefinedUser cannot be disconnected directly. Please, use JCO.releaseClient(JCO.Client) instead.

So can I use the following lines:-

JCO.releaseClient(client);

connection.release();

if (client.isAlive()){

client.disconnect();

}

Regards,

Narahari

former_member1191927
Participant
0 Kudos

Hi all,

Yes. Like Valery has pointed out, if i try to use JCO.Client.disconnect(), it throws the following exception:-

com.sap.mw.jco.JCO$Exception: (106) JCO_ERROR_RESOURCE: A client allocated from pool PROD_MODELDATA_RFC_sunih1_EN_useDefinedUser cannot be disconnected directly. Please, use JCO.releaseClient(JCO.Client) instead.

So can I use the following lines:-

JCO.releaseClient(client);

connection.release();

if (client.isAlive()){

client.disconnect();

}

Regards,

Narahari

Former Member
0 Kudos

Oops, sorry for the wrong suggestion and thanks to VS for correction at right time as it always.

Former Member
0 Kudos

Narahari,

It seems that I found something useful in SDN weblogs:

<a href="/people/sap.user72/blog/2005/01/08/adaptive-rfc-models-in-web-dynprosome-pointers RFC models in Web Dynpro...Some pointers</a> by <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=q6tinfoihtu%3d">pran Bhas</a>

See section 3, "Connection life time"

VS