Question

I'm trying to get raven working in a rhino.etl console to import date from sql to raven.

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

However - when I call _documentSession.OpenSession() the app just hangs.

Is there something I need to specify for the console app environment? It keeps saying it's timed out - but the url in the config is localhost:8080 which is correct?

i've changed it to now use:

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

but still hanging on opensession.

Was it helpful?

Solution

Where is the hang actually occurs? In what method inside OpenSession?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top