2011-07-29 3 views
0

Spring.NET을 사용하여 Quartz.NET 인스턴스를 설정해야한다. 아주 단순한 경우를 제외하고는이 작업을 수행하는 방법의 예를 찾을 수 없었습니다. 나는 우리를 위해 API를 통해 수행되기 때문에 작업/트리거 설정이 필요하지 않습니다. 필요한 것은 이러한 설정을 구성하는 방법입니다.Spring.NET으로 Quartz.NET 호스트를 설정하는 방법

quartz.scheduler.instanceName = ServerScheduler 
quartz.threadPool.type = Quartz.Simpl.SimpleThreadPool, Quartz 

quartz.threadPool.threadCount = 10 

quartz.threadPool.threadPriority = Normal 

quartz.plugin.xml.type = Quartz.Plugin.Xml.JobInitializationPlugin, Quartz 

quartz.plugin.xml.fileNames = C:/Tools/Forge/DataImport/Config/quartz_jobs.xml 

quartz.jobStore.type = Quartz.Impl.AdoJobStore.JobStoreTX, Quartz 

quartz.jobStore.driverDelegateType = Quartz.Impl.AdoJobStore.StdAdoDelegate, Quartz 

quartz.jobStore.dataSource = ForgePlatformDatasource 

quartz.dataSource.ForgePlatformDatasource.connectionString = Server=172.20.0.113 Database=ForgeQuartz;Uid=sa;Pwd=654321 

quartz.dataSource.ForgePlatformDatasource.provider = SqlServer-40 

quartz.jobStore.useProperties = true 

quartz.scheduler.exporter.type = Quartz.Simpl.RemotingSchedulerExporter, Quartz 

quartz.scheduler.exporter.port = 555 

quartz.scheduler.exporter.bindName = QuartzScheduler 

quartz.scheduler.exporter.channelType = tcp 

답변

1

내가 기억하는 바에 따르면 SchedulerFactoryObject -> QuartzProperties 속성에서 모든 구성 세부 정보를 설정할 수 있습니다.

<object name="SomeName" type="Spring.Scheduling.Quartz.SchedulerFactoryObject, Spring.Scheduling.Quartz"> 
    <property name="QuartzProperties"> 
     <dictionary> 
     <entry key="quartz.scheduler.instanceName" value="ServerScheduler"/> 
     <entry key="quartz.threadPool.type" value="Quartz.Simpl.SimpleThreadPool, Quartz"/> 
     <entry key="quartz.threadPool.threadCount" value="10"/> 
     ... and many more ... 
    </dictionary> 
    </property> 
</object> 

이 API-문서 :

/// <summary> 
    /// Set Quartz properties, like "quartz.threadPool.type". 
    /// </summary> 
    /// <remarks> 
    /// Can be used to override values in a Quartz properties config file, 
    /// or to specify all necessary properties locally. 
    /// </remarks> 
    /// <seealso cref="ConfigLocation" /> 
    public virtual IDictionary QuartzProperties 
    { 
     set { quartzProperties = value; } 
    } 
+0

소스는 여기에 있습니다 : https://fisheye.springsource.org/browse/spring-net/trunk/src/Spring/Spring.Scheduling. Quartz/Scheduling/Quartz/SchedulerFactoryObject.cs? hb = true – Andreas