<Swing Dev> [11] JDK-8153732: Windows remote printer changes do not reflect in lookupPrintServices()

Philip Race philip.race at oracle.com
Thu Jun 21 00:03:56 UTC 2018

This is on the wrong lists. Not Swing. Not AWT. Should be 2d.
I'll forward it there and continue there. Consider the AWT+Swing threads 


On 6/20/18, 3:12 AM, Shashidhara Veerabhadraiah wrote:
> Hi All, Please review this code changes for the below enhancement.
> Enhancement: https://bugs.openjdk.java.net/browse/JDK-8153732
> Webrev: http://cr.openjdk.java.net/~sveerabhadra/8153732/webrev.00/ 
> <http://cr.openjdk.java.net/%7Esveerabhadra/8153732/webrev.00/>
> Details of the changes: Windows provides *PrinterChangeNotification* 
> functions that provides information about printer status changes of 
> the local printers(subset) but not network printers.
> Alternatively, Windows provides a way thro' which one can get the 
> network printer status changes by using WMI, RegistryKeyChange 
> combination, which is a slightly complex mechanism.
> The Windows WMI offers an async and sync method to read thro' registry 
> via the WQL query. The async method is considered dangerous as it 
> leaves open a channel until we close it. But the async method has the 
> advantage of being notified of a change in registry by calling 
> callback without polling for it. The sync method uses the polling 
> mechanism to notify.
> RegistryValueChange cannot be used in combination with WMI to get 
> registry value change notification because of an error that may be 
> generated because the scope of the query would be too big to handle(at 
> times).
> Hence an alternative mechanism is choosen via the EnumPrinters by 
> polling for the count of printer status changes(add\remove) and based 
> on it update the printers list(both local and remote printers - superset).
> Thanks and regards,
> Shashi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20180620/e5bd95f9/attachment.html>

More information about the swing-dev mailing list