2011-07-29 8 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

関連する問題