Fighting with browser popup block

Background Recently in our project, we have a need of refactoring some old struct¬†actions to rest based pages. This way we avoid¬†multiple page navigation for our user so that all the stuff can be done in a single page. One example is file download. Previously in the struts based app, if a page have 12…

java synchronized on object, class and block

synchronized Blocks do have advantages over methods, most of all in flexibility because you can use other object as lock whereas syncing the method would lock the complete class. Compare: // locks the whole object … private synchronized void someInputRelatedWork() { … } private synchronized void someOutputRelatedWork() { … } Vs. // Using specific locks…