Page 1 of 1

Shared transients and notifications

Posted: Fri Aug 07, 2009 2:41 pm
by ConvertFromOldNGs
by JensRichnow >> Thu, 5 Dec 2002 23:00:01 GMT

I thought it is worthwhile to post this topic as I spend about 4 hours to get it right.

In my case the shared transients subscribe to notifications in the ::create() method. In the ::delete() of the shared transient I have the ::endNotificationForSubscriber(self). The shared transients, however, are deleted in a different process then the creating process. This results in a number of 1227 exceptions, depending on the number of transients deleted. Now the NotificationException::notificationTarget() was a bit misleading as it pointed to different class/object.

Basically, the notification has to be ended in the same process that creates the shared transient. In my case the creating process is identical with the monitoring process, so I knew when a shared transient is about to be deleted and can end the notifications for this instance at a specific point.

Re: Shared transients and notifications

Posted: Fri Aug 07, 2009 2:41 pm
by ConvertFromOldNGs
by cdshearer >> Fri, 6 Dec 2002 3:50:19 GMT

Notifications can be tricky when dealing with SharedTransients! The point that isn't really mentioned in the help is that when you begin a notification, you're beginning it for a particular *process*. If that process goes away, the notification no longer exists!

I have used a technique whereby there is a separate background application responsible for subscribing, and receiving notifications for SharedTransient objects.

Craig