Showing results for 
Search instead for 
Did you mean: 

JCA Close()

Former Member
0 Kudos

Iam Using JCA to connect to Backend R3 for my portal application.It works fine.

After modifying the code and re-deploying it for several times (may be 30 times) then the Iview starts behaving strangely.It fails to connect to backend as iam able to print a statement in the catch block.

Seems like client.close() is not doing what it supposed to.I can see lots of RFC connections opened under my name using the transaction SM04.

I looked at the following thread:

/thread/8950 [original link is broken]

Someone talked abt the JNDI pool settings in the above thread.

Could someone point me what parameters are to be set and how to open the settings view of JNDI?

Did SAP talk anything about Such settings in any of it's JCA documentation?

Guys I need Help,

Thanks & Regards!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You need to put the client.close() code in a finally block.

finally { 
try { 
if ( client != null )  client.close();
   } catch (Exception e) {}

Former Member
0 Kudos

Thanks prakash, Iam closing the connection in the function like this:

try {

callRfc(getConnection(request, "SAP_R3"));

} catch (Exception e) {.....



and in the callRfc function, iam closing it, i can only put the finally block where there is a try block.

I tried creating a IConnection client in the above try block but it says client cannot be resolved..

can u help me ?

Former Member
0 Kudos

But prakash, the problem is also with the client.close() because i found user session opened on SM04 even after putting the close in the finally block for a simple application.

Can u tell me more?