Shared transients and notifications
Posted: Fri Aug 07, 2009 2:41 pm
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.
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.