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.
Happy S Singh wrote:I mean when the thread starts,I should be able to work with my application but It halts until the thread task is completed.
Well I'm afraid I've never used ExecutorService, but your acQueryExecutor (and BTW, it should be AcQueryExecutor) looks pretty much as I would expect.
Have you tried testing it by just doing:
acQueryExecutor a = new acQueryExecutor(id,usrname,pswd,driver,url);
new Thread(a).start(); ?
I would expect a program to carry on quite happily after that.
You could also test it with a Runnable that simply waits for 1 minute and then prints out something to the console, or opens a dialog box.
If you can continue doing other things while it's running, then your problem obviously lies elsewhere (eg, possibly in the way you're using ExecutorService).
Now I am planning to use RMI which in turn will start the thread.
Fine, but don't start loading on other layers until you've got this one working.
Happy S Singh
Joined: Nov 14, 2011
The task are running in background without bothering the front end or other tasks.
@ Winston Gutkowski thank you