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