Hello, we are developing an asp.net web application which has two database one called "Master", which holds security and administration tables and another called "Company"(may be more than one company, which hold business tables), we are using SessionManager to manage "Master" database's sessions (as there is only one master database) and manually manage company database's sessions.

the master database and the company database have UpgradeMode = "Perform".

sometimes after leave the published application without interaction (may be one day or more), then try to use it we find that master database tables are empty, we can't find any reason or a startpoint to catch the error (it happens very few times, nearly 2 times in the last few months), and we aren't sure if this happens due to a recereation to the database or not.

After add logging to build database, the following exception(s) happened :

Error Building Company DB: at Xtensive.Core.LockableExtensions.EnsureNotLocked(ILockable lockable) at Xtensive.Collections.TypeRegistry.Register(Type type) at Xtensive.Orm.Configuration.Internals.DomainTypeRegistrationHandler.Process(TypeRegistry registry, TypeRegistration registration, Type type) at Xtensive.Collections.TypeRegistrationProcessorBase.Process(TypeRegistry registry, TypeRegistration registration) at Xtensive.Collections.TypeRegistry.ProcessPendingActions() at Xtensive.Collections.TypeRegistry.Lock(Boolean recursive) at Xtensive.Orm.Configuration.DomainConfiguration.Lock(Boolean recursive) at Xtensive.Orm.Upgrade.UpgradingDomainBuilder.Build(DomainConfiguration configuration) at Xtensive.Orm.Domain.Build(DomainConfiguration configuration) at Microtech.Andalus.Business.DomainManager.BuildCompany() in D:\Fawzy\SVN\Framework\Microtech.Andalus.Business\Core\DomainManager.cs:line 63

Error Building Company DB: []Instance is locked.

asked Jul 25 '12 at 10:40

ahmad%20emad's gravatar image

ahmad emad

edited Oct 31 '12 at 02:27

Hello Ahmad. This might happen if you use single DomainConfigration for building two Domains. Could you check your code for that?

(Nov 01 '12 at 04:22) Denis Krjuchkov Denis%20Krjuchkov's gravatar image

Hello Dmitri, no, but i think may be 2 user connect (log in to the application, we build the domains on first request) to build the same domain(database) but with 2 different DomainConfigration.

I could send you the class we use to build the domains for our database by mail if you need that.

(Nov 05 '12 at 04:06) ahmad emad ahmad%20emad's gravatar image

Could you please send relevant code to support@dataobjects.net This would help us resolve your issue.

(Nov 06 '12 at 06:44) Denis Krjuchkov Denis%20Krjuchkov's gravatar image

hello Denis, as our project is large i need to know just what code should i send(our application consists of many projects).

(Nov 07 '12 at 03:13) ahmad emad ahmad%20emad's gravatar image

You've said you're using session manager for creating one domain. It would be useful to see the code that creates the second domain.

(Nov 07 '12 at 03:15) Denis Krjuchkov Denis%20Krjuchkov's gravatar image

One Answer:

Dear Ahmad Emad,

This is not expected behavior in any case.

I'd suggest you to set UpgradeMode to PerformSafely to get a chance to catch an exception in your log at the moment when Master database is suddenly being recreated.

Hope that helps.

answered Jul 26 '12 at 09:16

Dmitri%20Maximov's gravatar image

Dmitri Maximov

Hello Dmitri, i will try your suggestion and inform you with the result

(Jul 31 '12 at 03:05) ahmad emad ahmad%20emad's gravatar image
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


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



Asked: Jul 25 '12 at 10:40

Seen: 47,163 times

Last updated: Nov 07 '12 at 03:15

powered by OSQA