cancel
Showing results for 
Search instead for 
Did you mean: 

To disconnect or not to disconnect

Former Member
0 Kudos

Hi all,

We are using wd4j our main issue this days is to force JCO connection to discoonect or not ?

Should we let the framework to handle the Pool ?

Thanks,

Amit Yosha

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Our issue is should I disconnect the connection or should I leave it to the frameworl to handle ??

Former Member
0 Kudos

You are not really disconnecting. The connection is returned to the Pool. If you do not disconnect the framework will run out of connections and sooner or later your programs won't work anymore.

J

Former Member
0 Kudos

For Designing Applications for Efficient Use of JCo Connections have a look at this doc:

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/705f2b2e-e77d-2b10-de8a-95f37f4c...

former_member197348
Active Contributor
0 Kudos

Hi Amit,

We can do that with coding.

If you want to connect simply execute the model, then JCO connection becomes active.It will expires when it reaches the connection timeout.

If you want to disconnect JCO connection your self , then try with

wdContext.current<RFC>_InputElement().modelObject().modelInstance().disconnectIfAlive();

check this [thread |]too.

Regards,

Siva