Author Message
sercanoztorun
Joined: Feb 14, 2018
Messages: 31
Offline
Hi everyone,

i have some problems on releasing session.

After 5 try server said that "All available connection are in use.Try again later".
how can i solve this problem?

(i send the session with static sessionId and that not solve the error .)

Thanks for help. You can chech release method on below.



//we call releaseSession() method like
private void releaseSession() {
ReturnType result = null; // release also returns a result structure

// Display resulting Session ID
//System.out.println("\nReleasing SessionID[" + requestSID + "]...");
try {

// always send a null value for the argument result =
// result = this.port.release(SessionIDLogicalHandler.SID);
// result = this.port.release("");

result = this.port.release(null);

// Get resulting session ID... Should be null String
responseSID = SIDHandler.getSID();
// The actual result may be ignored. If release returns (i.e.,
// does not raise a fault), then it always succeeds, and a
// result_code of zero is returned.

} catch (Exception re) {
// A fault was raised. The fault message will contain the
// explanation
re.printStackTrace();
return;
}

//System.out.println("The SMS session was released. result_code=" + result.getReturn().getResultCode());
}

GwilymEvans
Joined: Feb 12, 2007
Messages: 1
Offline
I'm not sure what is the issue here, since your code is quite straight forward! One small note is that, according to the documentation, the "release" request takes no parameters, while you have specified an empty string parameter. I'm not convinced that it will make a difference, but it may be worth changing this.

Another known issue with session release is that there are actually two sessions to be considered - the Telephony Web Services (TWS) session and the Tomcat session. Although you may have successfully ended the TWS session, it is possible that the Tomcat session is still hanging around (and, possibly, holding on to the CM connection). The release of the Tomcat sessions is known to be a "lazy" mechanism. Essentially, Tomcat does not release a session immediately. Instead, the released session is put on an "expired" queue, and Tomcat gets around to releasing its expired sessions at a later. time

If it is possible, I recommend that, instead of releasing your TWS session (and then creating a new one) you try to re-use it. If this is not possible, you can try increasing the allowed number of concurrent connections to CM. Having more concurrent connections may allow Tomcat more time to clean up its expired sessions.
Go to:   
Mobile view