BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Deadlock using Load.ASYNCHRONOUS

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Databases
View previous topic :: View next topic  
Author Message
Nicolas GASNIER
Guest





PostPosted: Thu Mar 15, 2007 8:00 pm    Post subject: Deadlock using Load.ASYNCHRONOUS Reply with quote



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 ?

Regards.
Back to top
John Moore (TeamB)
Guest





PostPosted: Fri Mar 16, 2007 11:48 pm    Post subject: Re: Deadlock using Load.ASYNCHRONOUS Reply with quote



Nicolas GASNIER wrote:
Quote:
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
====================================================
Back to top
Nicolas GASNIER
Guest





PostPosted: Fri Mar 30, 2007 6:29 pm    Post subject: Re: Deadlock using Load.ASYNCHRONOUS Reply with quote



Quote:
Some questions:

1) You imply that both the detail and master datasets are using the "same"
instance of QueryProvider. Is that correct?

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.

Quote:

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...

Quote:

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
====================================================
Back to top
John Moore (TeamB)
Guest





PostPosted: Sat Mar 31, 2007 2:14 am    Post subject: Re: Deadlock using Load.ASYNCHRONOUS Reply with quote

Nicolas GASNIER wrote:

Quote:

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..

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
====================================================
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Databases All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.