Re: RFR: 8263311: Watch registry changes for remote printers update instead of polling

2021-03-14 Thread Sergey Bylokhov
On Wed, 10 Mar 2021 15:38:27 GMT, Alexey Ivanov wrote: > [JDK-8153732](https://bugs.openjdk.java.net/browse/JDK-8153732) implemented > polling for remote printers. > That bug description also mentions watching the registry for changes and > links to the article which describes the method yet it

Re: RFR: 8263311: Watch registry changes for remote printers update instead of polling

2021-03-13 Thread Alexey Ivanov
On Sat, 13 Mar 2021 00:18:25 GMT, Sergey Bylokhov wrote: > Any idea why RegistryValueChange was rejected as a solution? I've no idea. I read that comment, it's exactly the comment that was in the code above `RemotePrinterChangeListener` class in `PrintServiceLookupProvider.java`. > RegistryVa

Re: RFR: 8263311: Watch registry changes for remote printers update instead of polling

2021-03-12 Thread Sergey Bylokhov
On Wed, 10 Mar 2021 15:38:27 GMT, Alexey Ivanov wrote: > [JDK-8153732](https://bugs.openjdk.java.net/browse/JDK-8153732) implemented > polling for remote printers. > That bug description also mentions watching the registry for changes and > links to the article which describes the method yet it

Re: RFR: 8263311: Watch registry changes for remote printers update instead of polling

2021-03-12 Thread Prasanta Sadhukhan
On Fri, 12 Mar 2021 12:30:13 GMT, Alexey Ivanov wrote: >> I can understand that as a user, you cannot /shouldn't change the name of a >> remote network printer but a network admin can change the name, so shouldn't >> we get notification on that name change when this method gets called after >>

Re: RFR: 8263311: Watch registry changes for remote printers update instead of polling

2021-03-12 Thread Prasanta Sadhukhan
On Wed, 10 Mar 2021 15:38:27 GMT, Alexey Ivanov wrote: > [JDK-8153732](https://bugs.openjdk.java.net/browse/JDK-8153732) implemented > polling for remote printers. > That bug description also mentions watching the registry for changes and > links to the article which describes the method yet it

Re: RFR: 8263311: Watch registry changes for remote printers update instead of polling

2021-03-12 Thread Alexey Ivanov
On Fri, 12 Mar 2021 11:38:08 GMT, Prasanta Sadhukhan wrote: >>> Is this only about addition/removal? What about printer name change? >> >> You cannot change the name of a remote printer. >> >> Opening *Printer Properties* dialog from the printer context menu on the >> local host and editing i

Re: RFR: 8263311: Watch registry changes for remote printers update instead of polling

2021-03-12 Thread Prasanta Sadhukhan
On Fri, 12 Mar 2021 11:29:17 GMT, Alexey Ivanov wrote: >> Is this only about addition/removal? What about printer name change? >> Shouldn't we get notified in that case as trying to print on printer with >> old name will not find the printer!! >> If yes, in that regard I guess REG_NOTIFY_CHANGE

Re: RFR: 8263311: Watch registry changes for remote printers update instead of polling

2021-03-12 Thread Alexey Ivanov
On Fri, 12 Mar 2021 04:55:45 GMT, Prasanta Sadhukhan wrote: > Is this only about addition/removal? What about printer name change? You cannot change the name of a remote printer. Opening *Printer Properties* dialog from the printer context menu on the local host and editing its name changes t

Re: RFR: 8263311: Watch registry changes for remote printers update instead of polling

2021-03-11 Thread Prasanta Sadhukhan
On Thu, 11 Mar 2021 14:49:59 GMT, Alexey Ivanov wrote: >> I also am not sure on this. But I think since this is for remote printer, >> sometimes network availability issue might be there so it may fail more >> compared to local printer so I guess we should give this method a fair >> chance, mo

Re: RFR: 8263311: Watch registry changes for remote printers update instead of polling

2021-03-11 Thread Prasanta Sadhukhan
On Thu, 11 Mar 2021 14:59:55 GMT, Alexey Ivanov wrote: >> [JDK-8153732](https://bugs.openjdk.java.net/browse/JDK-8153732) implemented >> polling for remote printers. >> That bug description also mentions watching the registry for changes and >> links to the article which describes the method ye

Re: RFR: 8263311: Watch registry changes for remote printers update instead of polling

2021-03-11 Thread Alexey Ivanov
On Wed, 10 Mar 2021 15:38:27 GMT, Alexey Ivanov wrote: > [JDK-8153732](https://bugs.openjdk.java.net/browse/JDK-8153732) implemented > polling for remote printers. > That bug description also mentions watching the registry for changes and > links to the article which describes the method yet it

Re: RFR: 8263311: Watch registry changes for remote printers update instead of polling

2021-03-11 Thread Alexey Ivanov
On Thu, 11 Mar 2021 11:30:52 GMT, Prasanta Sadhukhan wrote: >>> I guess having "FALSE" as fAsynchronous value mean the function does not >>> return until a change has occurred so do we still need this do-while >>> monitoring loop? >> >> You're right, `FALSE` for `fAsynchronous` means the func

Re: RFR: 8263311: Watch registry changes for remote printers update instead of polling

2021-03-11 Thread Prasanta Sadhukhan
On Thu, 11 Mar 2021 10:54:12 GMT, Alexey Ivanov wrote: >> src/java.desktop/windows/native/libawt/windows/WPrinterJob.cpp line 259: >> >>> 257: NULL, >>> 258: FALSE); >>> 259:

Re: RFR: 8263311: Watch registry changes for remote printers update instead of polling

2021-03-11 Thread Alexey Ivanov
On Thu, 11 Mar 2021 10:39:56 GMT, Prasanta Sadhukhan wrote: > I guess having "FALSE" as fAsynchronous value mean the function does not > return until a change has occurred so do we still need this do-while > monitoring loop? You're right, `FALSE` for `fAsynchronous` means the function doesn't

Re: RFR: 8263311: Watch registry changes for remote printers update instead of polling

2021-03-11 Thread Prasanta Sadhukhan
On Wed, 10 Mar 2021 15:38:27 GMT, Alexey Ivanov wrote: > [JDK-8153732](https://bugs.openjdk.java.net/browse/JDK-8153732) implemented > polling for remote printers. > That bug description also mentions watching the registry for changes and > links to the article which describes the method yet it

RFR: 8263311: Watch registry changes for remote printers update instead of polling

2021-03-10 Thread Alexey Ivanov
[JDK-8153732](https://bugs.openjdk.java.net/browse/JDK-8153732) implemented polling for remote printers. That bug description also mentions watching the registry for changes and links to the article which describes the method yet it does so in terms of WMI. Using WMI is not necessary to watch fo