sanoopsivan / jsmpp

Automatically exported from code.google.com/p/jsmpp
Apache License 2.0
0 stars 0 forks source link

Reconnecting problems #23

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem (see JUnit Test)?
1. SMPPSession session = new SMPPSession()
2. session.connectAndBind(...)
3. session.submitShortMessage(...)
4. session.unbindAndClose()
5. session.connectAndBind(...) --> throws a java.io.IOException: Failed
connecting

Environment:
Java 5 (IBM SDK )
OS Windows XP Servicepack 3
Library jsmpp-2.0.1.jar
SMPPSim from http://www.seleniumsoftware.com/downloads.html

If we lost the connection to the smsc and receive a SocketException if we
send a sms, we try to reconnect to the smsc. The reconnect (see the steps
below) fails, because the current value of the sequence is not one. But if
we create a new session, the connectAndBind succeed. I think you should
reset the sequence in the unbindAndClose() method.

Regards,
Christian

Original issue reported on code.google.com by christia...@gmail.com on 30 Mar 2009 at 11:05

Attachments:

GoogleCodeExporter commented 8 years ago
Hi,

because this is a critical issue for us, we made a branch and fix it in our 
branch.
Maybe you can apply this patches with little changes (I use junit instead of 
testng)
for your code base.

If you also add the integration test, I can send you the configuration for the 
SMPPSim.

Regards,
Christian

Original comment by christia...@gmail.com on 6 Apr 2009 at 12:37

Attachments:

GoogleCodeExporter commented 8 years ago
SMPPSession cannot be reuse after closed. It designed to be like that. When you 
want to create new session, it 
means you create new SMPPSession, when it closed you want to create new session 
again so you create new 
SMPPSession again too.

Original comment by uuda...@gmail.com on 8 Apr 2009 at 11:34

GoogleCodeExporter commented 8 years ago
So what is the solution?i'm also facing to same issue saying.After session 
closed and when try to bindandConnect it gives ESME is already bound.

I'm using  AutoReconnectGateway.java  for this implementation with more or less 
modification.I remove creating new thread reconnectAfter method.

Please reply to this issue.
It's urgent.
Thanks

Original comment by udeshi...@gmail.com on 7 Jun 2011 at 5:10