[Progress Communities] [Progress OpenEdge ABL] Forum Post: Unable to clean up ptpsession in the event of a failure.

Status
Not open for further replies.
D

dbeavon

Guest
This error message doesn't have many google hits. I'm looking for some help with the inner implementation details of jms\impl\session.r. Attempt to reference an UNDO GLOBAL variable after a transaction backout has removed its definition. (9084) Consider the code below. It fails after one second, and the FINALLY block is intended to clean up the orphaned session (so it doesn't retain "brokerconnect" resources). However the FINALLY block also fails ... and as it does so it generates the strange error message you see above. DEFINE VARIABLE h_Session AS HANDLE NO-UNDO. DEFINE VARIABLE h_SessionMsg AS HANDLE NO-UNDO. DEFINE VARIABLE m_LongCharData AS LONGCHAR NO-UNDO. DEFINE VARIABLE m_CountTransfer AS INTEGER NO-UNDO. DEFINE VARIABLE m_CountUnsupported AS INTEGER NO-UNDO. DEFINE VARIABLE m_Error AS CHARACTER NO-UNDO. DEFINE VARIABLE m_ErrorUnex AS CHARACTER NO-UNDO. /* ************************************************************************ */ /* BlockForTransaction */ /* As a last resort we try to stop after 1 full second */ /* ************************************************************************ */ BlockForTransaction: DO TRANSACTION STOP-AFTER (1) ON STOP UNDO BlockForTransaction, RETURN ERROR m_ErrorUnex ON ERROR UNDO BlockForTransaction, RETURN ERROR m_ErrorUnex ON ENDKEY UNDO BlockForTransaction, RETURN ERROR m_ErrorUnex: /* ********************************************************************* */ /* Build actual data for transfer. */ /* ********************************************************************* */ m_LongCharData = " ". /* ********************************************************************* */ /* Create Sonic session */ /* ********************************************************************* */ RUN jms/ptpsession.p PERSISTENT SET h_Session ("-H localhost -S 5162"). /* ********************************************************************* */ /* Persistent messages are required when sending data. */ /* ********************************************************************* */ RUN setDefaultPersistency IN h_Session("PERSISTENT"). /* ********************************************************************* */ /* Broker, user, and password */ /* ********************************************************************* */ RUN setBrokerURL IN h_Session ("tcp://ActiveMQDev.ufpi.com:61616?jms.prefetchPolicy.queuePrefetch=1&jms.redeliveryPolicy.maximumRedeliveries=-1&soTimeout=60000&soWriteTimeout=60000"). RUN setUser IN h_Session ("APP_Application"). RUN setPassword IN h_Session ("ufp"). RUN setTransactedSend IN h_Session. /* ********************************************************************* */ /* Begin session */ /* ********************************************************************* */ RUN beginSession IN h_Session. /* ********************************************************************* */ /* Pause briefly - creates an excessive delay that causes STOP */ /* ********************************************************************* */ PAUSE 3. MESSAGE "WILL NOT GET HERE {&FILE-NAME} {&LINE-NUMBER} ". PAUSE. /* ********************************************************************* */ /* Create message handle and send. */ /* ********************************************************************* */ RUN createTextMessage IN h_Session (OUTPUT h_SessionMsg). RUN setLongText IN h_SessionMsg(m_LongCharData). RUN sendToQueue IN h_Session ("MYQUEUE", h_SessionMsg, ?, ?, ?). /* ********************************************************************* */ /* Success. */ /* Commit all messages. */ /* Clean up our message and session handles. */ /* OpenEdge database transaction must end immediately after this! */ /* ********************************************************************* */ RUN commitSend IN h_Session. RUN deleteMessage IN h_SessionMsg. RUN deleteSession IN h_Session. FINALLY: IF VALID-OBJECT(h_Session) THEN DO: MESSAGE "HERE {&FILE-NAME} {&LINE-NUMBER} valid". PAUSE. RUN deleteSession IN h_Session. IF VALID-OBJECT(h_Session) THEN DO: DELETE OBJECT h_Session. END. END. END. END. Any help would be greatly appreciated. I suspect that the "UNDO GLOBAL variable" is not anything that I have control over. I don't believe that the source code is visible to the public. Below is the full stack of the origin of that error: [19/12/27@15:58:20.446-0500] P-024804 T-002528 1 4GL -- Attempt to reference an UNDO GLOBAL variable after a transaction backout has removed its definition. (9084) [19/12/27@15:58:20.446-0500] P-024804 T-002528 1 4GL -- ** ABL Debug-Alert Stack Trace ** [19/12/27@15:58:20.446-0500] P-024804 T-002528 1 4GL -- --> deleteMessage jms/impl/message.p at line 364 (C:\Progress\OpenEdge\jms\impl\message.r) [19/12/27@15:58:20.446-0500] P-024804 T-002528 1 4GL -- disconnect jms/impl/msgreceiver.p at line 911 (C:\Progress\OpenEdge\jms\impl\msgreceiver.r) [19/12/27@15:58:20.446-0500] P-024804 T-002528 1 4GL -- deleteSession jms/impl/session.p at line 2350 (C:\Progress\OpenEdge\jms\impl\session.r) [19/12/27@15:58:20.446-0500] P-024804 T-002528 1 4GL -- deleteSession jms/ptpsession.p at line 20 (C:\Progress\OpenEdge\jms\ptpsession.r) [19/12/27@15:58:20.446-0500] P-024804 T-002528 1 4GL -- FetchAsyncDataTransaction app/p/custom123.p at line 992

Continue reading...
 
Status
Not open for further replies.
Top