سؤال

أحاول تشغيل Raven في وحدة التحكم Rhino.etl لاستيراد تاريخ SQL إلى Raven.

لدي رافينينستولر:

public class RavenInstaller : IWindsorInstaller
    {
        public void Install(IWindsorContainer container, IConfigurationStore store)
        {
            container.Register(
                Component.For<IDocumentStore>().ImplementedBy<DocumentStore>()
                    .DependsOn(new { connectionStringName = "SomeRavenConnectionString" })
                    .OnCreate(DoInitialisation)
                    .LifeStyle.Singleton
                );
        }

        static IDocumentSession GetDocumentSesssion(IKernel kernel)
        {
            var store = kernel.Resolve<IDocumentStore>();
            return store.OpenSession();
        }

        public static void DoInitialisation(IKernel kernel, IDocumentStore store)
        {
            store.Initialize();
        }
    }

ومع ذلك - عندما أتصل بـ _documentesseessession.opensession () ، فإن التطبيق معلق فقط.

هل هناك شيء أحتاج إلى تحديده لبيئة تطبيق وحدة التحكم؟ يستمر في قول أنه تم توقيته - لكن عنوان URL في التكوين هو مضيف محلي: 8080 وهو الصحيح؟

لقد قمت بتغييره لاستخدامه الآن:

using (var documentStore = new DocumentStore { Url = "http://localhost:8080" })
            {
                documentStore.Initialize();
                using (var session = documentStore.OpenSession())
                {
                    var mp = _container.Resolve<MainProcess>();
                    mp.DocumentSession = session;
                    mp.Execute();
                }
            }

ولكن لا تزال معلقة على opensession.

هل كانت مفيدة؟

المحلول

أين يحدث تعليق بالفعل؟ في أي طريقة داخل Opensession؟

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top