[Progress Communities] [Progress OpenEdge ABL] Forum Post: PTP messaging sessions, and subtle difference between DELETE OBJECT and RUN deleteSession

Status
Not open for further replies.
D

dbeavon

Guest
Can someone please remind me what the difference is between using DELETE OBJECT on a handle and calling a method like "deleteSession". There seems to be some nuances between them and I'm trying to sort that out. Consider a handle like so... DEFINE VARIABLE h_Session AS HANDLE NO-UNDO. RUN jms/ptpsession.p PERSISTENT SET h_Session ("-H localhost -S 5162"). If I use either (DELETE OBJECT h_Session) or (RUN deleteSession IN h_Session) then I have a slightly different end result. In both cases the function VALID-OBJECT(h_Session) will return FALSE. That is what is expected. However what is unexpected is that the first variation (DELETE OBJECT) will not actually close the connection to the "brokerconnect" adapter. That will be leaked and will not be recovered. Since I'm running my ABL session within the context of PASOE the stakes are quite high that I get this right. The ABL sessions are long-lived and any leaked resources are a big problem - not just for the current sessions but for others as well. While we are on this topic, I'm hoping someone can point me to a "WidgetHandle" similar to OpenEdge.Core.WidgetHandle that would properly clean up a jms/ptpsession in the finalizer. I found a document (*link below) that says to use deleteSession and doesn't mention DELETE OBJECT at all. So I'm guessing that approach is the most standard one. I had started getting in the habit of using the DELETE OBJECT pattern on handles, via WidgetHandle if possible. But in this case it isn't accomplishing what I need it to since the "brokerconnect" adapter is claiming that the client connection is still active (via adaptman -query -all). OpenEdge 11.7 Documentation

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