题
我试图让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();
}
}
但仍在悬而未决。
解决方案
悬挂实际发生在哪里?用什么方法进行操作?
不隶属于 StackOverflow