This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi, Me and my colleagues are simulating a project on Network Print Spooling wherein Multiple Clients are sending there Print Requests to the PrintServer and PrintServer is having multiple Printers attached to it. We have maintained an entity called Printer Manager for removing the jobs from the Main Queue and feeding that job to the Printer's Queue. For doing this we are running a thread of Printer Manager Class which does this.We are showing separate consoles for simulating Server,Client and Printer respectively. But the problem we are facing is that when we close the connection from the Server console then our Printing on the Printer Console gets stopped. Because it also kills the Printer thread.But we want that even after closing the Server connection the printing should be continued on the Printer console till the end of file. How to tackle this problem in Java?
Unfortunately, you have not describe enough detail for us to envision your problem.
But the problem we are facing is that when we close the connection from the Server console then our Printing on the Printer Console gets stopped.
What do you mean by "close the connection"? Do you mean that you have a network connection to the printer program? Or do you mean killing the GUI that represents you printer simulator? Or is it something else?