2

下载了 Quartz.NET 集成项目的最新源以重现我遇到的错误后,我担心源 SampleApp 会产生相同的问题。

https://github.com/castleprojectcontrib/QuartzNetIntegration

启动程序时,我尝试像这样配置容器:

var container = new WindsorContainer(new XmlInterpreter());
container.Install(FromAssembly.This());

在到达我的石英安装程序之前,它失败了,但以下情况除外:

“设施元素需要必需的非空白属性类型”

在此处输入图像描述

我已经将此(我希望)追溯到应用程序配置的这一部分(取自 github 源的 SampleApp):

在此处输入图像描述

而如果我将配置更改为此它会通过配置的这一步但无法注册 Quartz Facility 的两个实例(应该如此)

在此处输入图像描述

任何建议如何启动和运行?

干杯。

4

2 回答 2

0

The documentation on the wiki says to register the Quartz.NET facility like this:

<castle>
  <facilities>
    <facility id="startable.facility" type="Castle.Facilities.Startable.StartableFacility, Castle.Windsor"/>
    <facility id="quartznet" type="Castle.Facilities.QuartzIntegration.QuartzFacility, Castle.Facilities.QuartzIntegration">
      <quartz>
        <item key="quartz.scheduler.instanceName">XmlConfiguredInstance</item>
        <item key="quartz.threadPool.type">Quartz.Simpl.SimpleThreadPool, Quartz</item>
        <item key="quartz.threadPool.threadCount">5</item>
        <item key="quartz.threadPool.threadPriority">Normal</item>
        <item key="quartz.plugin.xml.type">Quartz.Plugin.Xml.JobInitializationPlugin, Quartz</item>
        <item key="quartz.plugin.xml.overwriteExistingJobs">true</item>
        <item key="quartz.plugin.xml.scanInterval">10</item>
      </quartz>
    </facility>
  </facilities>
</castle>

http://docs.castleproject.org/Contrib.Quartz-Net-integration.ashx

This is because from Windsor 3.0 the type attribute is now required for the facility configuration/ https://github.com/castleproject/Windsor/commit/40f8eefb16226fb279389b732ab89c8c55853ba5

于 2012-11-14T15:55:21.530 回答
0

我会让事情变成这样:

<facility id="startable.facility" type="Castle.Facilities.Startrable.StartableFacility, Castle.Windsor"/>
<facility id="quartznet" type="Namespace.Castle.QuartzFacility, Namespace">
    <globalJobListener>
        <!-- the rest-->
</facility>

在代码中:

var container = new WindsorContainer(new XmlInterpreter());  
// container.AddFacility("quartznet", new QuartzFacility()); 

希望这会有所帮助。

于 2012-11-14T15:00:23.890 回答