I want to improve my user interface reactivity by setting the
Load.ASYNCHRONOUS option on my QueryDataSet. On this dataset, I have a
"navigated" event I use to refresh two other datasets based on the the
current row ID (I don't want to use mastelinks, the detail dataset would be
too big). But this sometimes causes deadlocks between the event thread and
the thread of the provider. I think the first dataset I'm trying to refresh
wait for the QueryProvider to be released by the main dataset, but for a
reason I don't really understand, the main dataset is waiting for that too.
Does anyone experienced such problem, and how did you manage to solve it ?
Regards.
I have not experienced this problem, nor do I remember anyone reporting
it here..
Some questions:
1) You imply that both the detail and master datasets are using the
"same" instance of QueryProvider. Is that correct?
2) If so I would question the wisdom of this.. (DX if left to it's
defaults creates a new instance of the default QueryProvider for each
instance of QueryDataSet. (example out of DX QueryDataSet source**)
if (currentProvider == null) {
setQueryProvider(new QueryProvider());
currentProvider.setAccumulateResults(accumulateResults);
}
..where..
private void setQueryProvider(QueryProvider provider) /*-throws
DataSetException-*/ {
super.setProvider(provider);
currentProvider = (QueryProvider)provider;
}
So.. I would guess you could be doing something else that is forcing the
QueryDataSet to share a Provider.. (Maybe you should not be doing that..??)
Hope that helps..
John..
--
=============================================
TeamB are volunteer helpers. Please DO NOT REPLY VIA EMAIL!
Post all questions and replies to this newsgroup ONLY
For papers on DataExpress, Applets, JSP, and Web Development go to:
http://www.microps.com/mps/paperFAQ.html
====================================================
I tried the JBuilder deadlock monitor to find where the lock is, and it
seems to happen between two threads that wait for the monitor on the
provider.
>
> 2) If so I would question the wisdom of this.. (DX if left to it's
> defaults creates a new instance of the default QueryProvider for each
> instance of QueryDataSet. (example out of DX QueryDataSet source**)
>.....
> So.. I would guess you could be doing something else that is forcing the
> QueryDataSet to share a Provider.. (Maybe you should not be doing
> that..??)
I never change the provider, it is always left to default. May the lock be
due to the fact that two dataset, event with different providers, can't
provide simultaneously ? When I launch my app main window, there is two
components that will open their respective dataset, and sometimes they are
in conflict to get a lock on something internal to data express...
>
> I never change the provider, it is always left to default. May the lock be
> due to the fact that two dataset, event with different providers, can't
> provide simultaneously ? When I launch my app main window, there is two
> components that will open their respective dataset, and sometimes they are
> in conflict to get a lock on something internal to data express...
Since I've never encountered this before and have never heard of anyone
else encountering that has reported here...
I don't have much to suggest..
I would look and see if maybe the driver is where the problem is occuring..
Sorry I could not be more help on this..