🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.database
4 messages
4 total messages Started by Nicolas GASNIER Thu, 15 Mar 2007 15:00
Deadlock using Load.ASYNCHRONOUS
#294
Author: Nicolas GASNIER
Date: Thu, 15 Mar 2007 15:00
14 lines
1630 bytes
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. 
Re: Deadlock using Load.ASYNCHRONOUS
#295
Author: John Moore (TeamB)
Date: Fri, 16 Mar 2007 18:48
56 lines
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
====================================================
Re: Deadlock using Load.ASYNCHRONOUS
#301
Author: Nicolas GASNIER
Date: Fri, 30 Mar 2007 13:29
40 lines
2444 bytes
> 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.

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

>
> 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
> ==================================================== 
Re: Deadlock using Load.ASYNCHRONOUS
#302
Author: John Moore (TeamB)
Date: Fri, 30 Mar 2007 21:14
28 lines
2072 bytes
Nicolas GASNIER wrote:

> 
> 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
====================================================
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads