Consultor Eletrônico



Kbase P122239: What messages will be generated when a Progress client using Sonic Adapter disconnects or loses conn
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   2/14/2007
Status: Unverified

GOAL:

What messages will be generated when a Progress client using Sonic Adapter disconnects or loses connection to the Adapter.

FIX:

Tests were made using a customized version of the exampl1.p provided in the $DLC/src/samples/sonicmq/adapter/examples directory.
/* Publishes A Text message. */
DEFINE VARIABLE pubsubsession AS HANDLE.
DEFINE VARIABLE messageH AS HANDLE.
/* Creates a session object. */
RUN jms/pubsubsession.p PERSISTENT SET pubsubsession ("-H localhost -S 5162 ").
RUN setBrokerURL IN pubsubsession ("localhost:2506").
RUN beginSession IN pubsubsession.
/* Create a text message */
DEFINE VARIABLE counter AS INTEGER NO-UNDO.
REPEAT counter = 1 TO 10.
RUN createTextMessage IN pubsubsession (OUTPUT messageH).
RUN setText IN messageH ("Golf shoes on sale today").
IF counter = 5 THEN
MESSAGE "I'm paused at 5 view-as alert-box.
END.
/* Publish the message on the "GolfTopic" topic */
RUN publish IN pubsubsession ("GolfTopic", messageH, ?, ?, ?).
RUN deleteMessage IN messageH.
RUN deleteSession IN pubsubsession.

This piece of code pauses halfway thru the sending of 10 messages.
At that paused state, processes were killed to generate the below messages.
This was for testing purposes only and is not recommended.
If a sonic adapter connection is made and the adapter connection is disconnected from the Sonic Management Console the following exception errors will appear in the sonicMQ1.server.log:

ClientListener $CONNECTION$ >(Feb 7, 2007 09:22:42:930) 172.16.114.54::sonicMQ1::3620::f8af243539f92dfd:a1807c:1109c8ee946:-7f07
javax.jms.JMSException: Connection dropped
at progress.message.jimpl.JMSExceptionUtil.createJMSException(Unknown Source)
at progress.message.jimpl.dw.handleMessage(Unknown Source)
at progress.message.zclient.MessageHandler.deliverToClient(Unknown Source)
at progress.message.zclient.ay.KFC_(Unknown Source)
at progress.message.zclient.ay.JFC_(Unknown Source)
at progress.message.zclient.MessageHandler.XO_(Unknown Source)
at progress.message.zclient.xd.uR_(Unknown Source)
at progress.message.zclient.xd.dispatchLocalEnv(Unknown Source)
at progress.message.zclient.Connection.connectionDropped(Unknown Source)
at progress.message.zclient.Connection.nRB_(Unknown Source)
at progress.message.zclient.DefaultDropHandler.socketDropped(Unknown Source)
at progress.message.zclient.Connection.pRB_(Unknown Source)
at progress.message.zclient.ClientListener.BGC_(Unknown Source)
at progress.message.zclient.ClientListener.AGC_(Unknown Source)
at progress.message.zclient.ClientListener.threadMain(Unknown Source)
at progress.message.zclient.DebugThread.run(Unknown Source)
ClientListener $CONNECTION$ >172.16.114.54::sonicMQ1::3620::f8af243539f92dfd:a1807c:1109c8ee946:-7f07: Error Code -5
ClientListener $CONNECTION$ >172.16.114.54::sonicMQ1::3620::f8af243539f92dfd:a1807c:1109c8ee946:-7f07
java.io.IOException
at progress.message.jimpl.dw.handleMessage(Unknown Source)
at progress.message.zclient.MessageHandler.deliverToClient(Unknown Source)
at progress.message.zclient.ay.KFC_(Unknown Source)
at progress.message.zclient.ay.JFC_(Unknown Source)
at progress.message.zclient.MessageHandler.XO_(Unknown Source)
at progress.message.zclient.xd..uR_(Unknown Source)
at progress.message.zclient.xd.dispatchLocalEnv(Unknown Source)
at progress.message.zclient.Connection.connectionDropped(Unknown Source)
at progress.message.zclient.Connection.nRB_(Unknown Source)
at progress.message.zclient.DefaultDropHandler.socketDropped(Unknown Source)
at progress.message.zclient.Connection.pRB_(Unknown Source)
at progress.message.zclient.ClientListener.BGC_(Unknown Source)
at progress.message.zclient.ClientListener.AGC_(Unknown Source)
at progress.message.zclient.ClientListener.threadMain(Unknown Source)
at progress.message.zclient.DebugThread.run(Unknown Source)


When the client session is allowed to continue from it's paused state it realizes the connection has close and throws this in the sonicMQ1.server.log
S-0006>(Feb 7, 2007 09:22:56:199) 172.16.114.54::sonicMQ1::3620::f8af243539f92dfd:a1807c:1109c8ee946:-7f07
javax.jms.IllegalStateException: The connection is closed.
at progress.message.jimpl.Connection.OAC_(Unknown Source)
at progress.message.jimpl.Connection.NAC_(Unknown Source)
at progress.message.jimpl.Connection.stop(Unknown Source)
at com.progress.javafrom4gl.services.jms.SessionContainer.stop(SessionContainer.java:1037)
at com.progress.javafrom4gl.services.jms.SessionContainer.closeSession(SessionContainer.java:1118)
at com.progress.javafrom4gl.services.jms.JmsConnection._disconnect(JmsConnection.java:61)
at com.progress.javafrom4gl.implementation.JavaServlet.disconnect(JavaServlet.java:177)
at com.progress.ubroker.broker.ubServerThreadIPC.write(ubServerThreadIPC.java:430)
at com.progress.ubroker.broker.ubASserverThread.processWrite(ubASserverThread.java:735)
at com.progress.ubroker.broker.ubASserverThread.processWriteClose(ubASserverThread.java:763)
at com.progress.ubroker.broker.ubServerThread.processEvent(ubServerThread.java:1035)
at com.progress.ubroker.broker.ubServerThread.mainline(ubServerThread.java:411)
at com.progress.ubroker.broker.ubServerThread.run(ubServerThread.java:320)
S-0006>(Feb 7, 2007 09:22:56:199) 172.16.114.54::sonicMQ1::3620::f8af243539f92dfd:a1807c:1109c8ee946:-7f07: Client was disconnected without calling deleteSession()! (9294)
S-0006>(Feb 7, 2007 09:22:56:199) 172.16.114.54::sonicMQ1::3620::f8af243539f92dfd:a1807c:1109c8ee946:-7f07: The JMS session has been closed. (9295)

If the Progress client is terminated (by using the Windows Task Manager or Unix kill commands) the following will appear in the sonicMQ1.server.log but with no java exception listings:
S-0012>(Feb 7, 2007 09:28:24:111) 172.16.114.54::sonicMQ1::3620::f8af243539f92dfd:a1807c:1109c8ee946:-7f04: Client was disconnected without calling deleteSession()! (9294)
S-0012>(Feb 7, 2007 09:28:24:141) 172.16.114.54::sonicMQ1::3620::f8af243539f92dfd:a1807c:1109c8ee946:-7f04: The JMS session has been closed. (9295).