Hi,

I'm currently evaluating the Telerik Reporting tool for our project. I've discovered that the Reporting tool uses a worker thread to fetch the data. At the moment we use a static class that opens 1 Session to the DB for the whole application. Of course this Session is not available in the worker thread. I've tried the following

using(var Session session = Session.Open(Domain))
{
    // Getting data here
}

but that only posponed the next exception saying 'the connection is closed'. Could you give me a few pointers?

Regards
Paul Sinnema
Diartis AG

asked Nov 28 '10 at 10:51

Paul%20Sinnema's gravatar image

Paul Sinnema
261888896

edited Nov 28 '10 at 15:50

Alex%20Yakunin's gravatar image

Alex Yakunin
29714412


One Answer:

I see two options:

  • You must ensure working Session is activated in the worker thread. I'm almost sure there should be some entry points for this.
  • Or you can try to disable this feature of Telerik Reporting. Normally any multithreading stuff can be turned off.

Also, usage of current Session is fully optional in v4.4 (this will help, if this is the root of this issue) - shortly we'll show its beta (actually, the only TODO we must finish to release it is documentation). Beta already passes the same set of tests, so it's as stable as v4.3; but since there lots of API changes, we need to gather some comments before final release. A part of these changes (namespace renames and fixes of references - there are just 3 assemblies you must reference) can be applied via Upgrade Tool; for almost everything else we left existing API intact, but old-style calls are marked as [Obsolete], so migration shouldn't be complex as well. And certainly, you won't need to do anything with the data.

answered Nov 28 '10 at 15:59

Alex%20Yakunin's gravatar image

Alex Yakunin
29714412

Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

Subscription:

Once you sign in you will be able to subscribe for any updates here

Tags:

×574
×2

Asked: Nov 28 '10 at 10:51

Seen: 3,009 times

Last updated: Nov 28 '10 at 15:59

powered by OSQA