Article View: borland.public.jbuilder.database
Article #295Re: Deadlock using Load.ASYNCHRONOUS
From: John Moore (TeamB)
Date: Fri, 16 Mar 2007 18:48
Date: Fri, 16 Mar 2007 18:48
56 lines
2983 bytes
2983 bytes
Nicolas GASNIER wrote:
> Hi,
>
> 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 ?
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
====================================================
Technical Details
Message-ID:
<45fae68c$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<45f95f4c$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1073da,fb15afe4eee0d18e X-Google-Attributes: gid1073da,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Fri, 16 Mar 2007 11:48:45 -0700 From: "John Moore (TeamB)" <jbm@microps.com> User-Agent: Thunderbird 1.5.0.10 (Macintosh/20070221) MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.database Subject: Re: Deadlock using Load.ASYNCHRONOUS References: <45f95f4c$1@newsgroups.borland.com> In-Reply-To: <45f95f4c$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 207.137.13.178 Message-ID: <45fae68c$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1174070924 207.137.13.178 (16 Mar 2007 11:48:44 -0800) Lines: 56 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail