WNmrwu / jsmpp

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

submitShortMessage IO error #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I have to separate programs, first program is message_listener, second 
is message_sender. when my message_listener receive the messages it will 
be inserted to database, the second program see for messages which not 
sent and will try to send their to destination
2. Both programs working in the loop "while(true)", once the get 
SMPPSession they will be keep it and do their work
3. Situation, i'm listen for messages to the short number for exm., 1221, 
due to some prevention works the administrator restart the SMPP server, 
after restart, my message_listener continue successfully receive the 
messages, but my message_sender get the following error due to 
submitShortMessage:
java.net.SocketException: Socket closed
    at java.net.SocketOutputStream.socketWrite
(SocketOutputStream.java:99)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:124)
    at org.jsmpp.DefaultPDUSender.writeAndFlush
(DefaultPDUSender.java:419)
    at org.jsmpp.DefaultPDUSender.sendSubmitSm
(DefaultPDUSender.java:203)
    at org.jsmpp.SynchronizedPDUSender.sendSubmitSm
(SynchronizedPDUSender.java:192)
    at org.jsmpp.session.SubmitSmCommandTask.executeTask
(SubmitSmCommandTask.java:86)
    at org.jsmpp.session.AbstractSession.executeSendCommand
(AbstractSession.java:248)
    at org.jsmpp.session.SMPPSession.submitShortMessage
(SMPPSession.java:317)

the operation system is CentOS Linux. I don't no about version which i use 
now, but i'm getting this jsmpp jar file from code.google.com 
approximately October 2008. 

My Question is, why my message_listener continue receive the messages 
after smpp server restarted (smmp server is not my server) but my message 
sender get an error. Both programs create SMPPSession at once in main 
method and never recreate it again at runtime

Original issue reported on code.google.com by itfik...@gmail.com on 20 Apr 2009 at 7:22

GoogleCodeExporter commented 9 years ago
It has 2 session the, the sender and receiver.
The receiver still accept the messages without disconnected even the SMPP 
Server restarted. You should question 
on the SMPP Server then. How can plain socket still connected while SMPP Server 
restarted, so it might never 
closed. Does the SMPP Server process really dead? or the connection never 
really closed?

The sender has normal behavior.

Please inform me for further report of your programs.

Original comment by uuda...@gmail.com on 18 Aug 2009 at 10:47