cancel
Showing results for 
Search instead for 
Did you mean: 

Jco connection problem

Amey-Mogare
Contributor
0 Kudos

Hi,

I'm importing some 12 RFC models in my web dynpro application.

I have used single JCO for application.

Now what is happening is when application is started and RFC calls take place, multiple sessions for are getting created..

This is eventually leading to saturation of connections limit (ie 100)..

I have heard that for a applications, regardless number of Adaptive RFC models imported, only two sessions (one for modeldata , other for metadata) are created...

Can anybody guide me to resolution of this problem.. This is very critical and restricting no of users of application..

Pls help

Regards,

Amey

Accepted Solutions (1)

Accepted Solutions (1)

SB9
Active Participant
0 Kudos

Hi,

Try to close the JCO connection as soon as the call gets over. Instead of closing the connection in finally clause -

Dont do this ---


try
{
  // code for calling RFC
}catch(Exception ex)
{
 // exception handling
}
finally
{
 // close RFC connection if it is alive - 
}

instead do this --


try
{
  // code for calling RFC
  // close the connection if it is alive
}catch(Exception ex)
{
 // exception handling
}
finally
{
 // close RFC connection if it is alive - 
}

Hope, this helps in your case.

Amey-Mogare
Contributor
0 Kudos

yup...

Solved my problem.. Thank you so much to you.

Now there is only one JCO is maintained for multiple RFC calls.

It was very urgent. Thanks for the quick help.

I observed that, even after i close the browser RFC session remains alive for some time..Is there any default value which we can change?

Thanks n regards

Amey

SB9
Active Participant
0 Kudos

Hi Amey,

Can you please explain what do you mean by RFC session remains open ? How do you check that this session is open.

Are you hinting at http session object instead ?

Thanks,

Soujanya

Amey-Mogare
Contributor
0 Kudos

Hi Soujanya,

What i mean to say is, when i closed my browser window and checked users list with transaction code 'se04' in SAP, it was showing the live RFC session for some time..it then disappeared.

So is there any time-out parameter which controls the time for which RFC session remains active??

Thanks n regards,

Amey

Answers (1)

Answers (1)

SB9
Active Participant
0 Kudos

try to close the JCO connection as soon as the call gets over. instead of closing the connection in finally clause -

try

{

// code for calling RFC

}catch(Exception ex)

{