1

raven を rhino.etl コンソールで動作させて、sql から raven に日付をインポートしようとしています。

私は RavenInstaller を持っています:

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();
        }
    }

ただし、_documentSession.OpenSession() を呼び出すと、アプリがハングします。

コンソール アプリ環境で指定する必要があるものはありますか? タイムアウトしたと言い続けますが、設定の URL は localhost: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にかかっています。

4

1 に答える 1

1

ハングは実際にどこで発生しますか? OpenSession 内のどのメソッドで?

于 2010-12-01T16:43:50.363 に答える