Delegate connection handling to Spring, still problems..
This commit is contained in:
@@ -27,18 +27,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.2005", "..\..\s
|
||||
Release.AspNetCompiler.Debug = "False"
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.Tests.2005", "..\..\test\Spring\Spring.Data.Tests\Spring.Data.Tests.2005.csproj", "{ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}"
|
||||
ProjectSection(WebsiteProperties) = preProject
|
||||
Debug.AspNetCompiler.Debug = "True"
|
||||
Release.AspNetCompiler.Debug = "False"
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Core.Tests.2005", "..\..\test\Spring\Spring.Core.Tests\Spring.Core.Tests.2005.csproj", "{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}"
|
||||
ProjectSection(WebsiteProperties) = preProject
|
||||
Debug.AspNetCompiler.Debug = "True"
|
||||
Release.AspNetCompiler.Debug = "False"
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Scheduling.Quartz.2005", "..\..\src\Spring\Spring.Scheduling.Quartz\Spring.Scheduling.Quartz.2005.csproj", "{E823D54C-CE82-4868-929F-5F95A999F61E}"
|
||||
ProjectSection(WebsiteProperties) = preProject
|
||||
Debug.AspNetCompiler.Debug = "True"
|
||||
@@ -51,6 +39,24 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Scheduling.Quartz.Te
|
||||
Release.AspNetCompiler.Debug = "False"
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Scheduling.Quartz.Integration.Tests.2005", "..\..\test\Spring\Spring.Scheduling.Quartz.Integration.Tests\Spring.Scheduling.Quartz.Integration.Tests.2005.csproj", "{E4328F68-C3FC-43E2-9D63-30CEC55215B0}"
|
||||
ProjectSection(WebsiteProperties) = preProject
|
||||
Debug.AspNetCompiler.Debug = "True"
|
||||
Release.AspNetCompiler.Debug = "False"
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{438FE108-6F55-4C8A-8BF4-C85D0906D134}"
|
||||
ProjectSection(WebsiteProperties) = preProject
|
||||
Debug.AspNetCompiler.Debug = "True"
|
||||
Release.AspNetCompiler.Debug = "False"
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{5ECE7B2B-6975-4800-982E-618794909499}"
|
||||
ProjectSection(WebsiteProperties) = preProject
|
||||
Debug.AspNetCompiler.Debug = "True"
|
||||
Release.AspNetCompiler.Debug = "False"
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|.NET = Debug|.NET
|
||||
@@ -97,26 +103,6 @@ Global
|
||||
{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}.Debug|.NET.ActiveCfg = Debug|Any CPU
|
||||
{ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}.Release|.NET.ActiveCfg = Release|Any CPU
|
||||
{ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Debug|.NET.ActiveCfg = Debug|Any CPU
|
||||
{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Release|.NET.ActiveCfg = Release|Any CPU
|
||||
{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{E823D54C-CE82-4868-929F-5F95A999F61E}.Debug|.NET.ActiveCfg = Debug|Any CPU
|
||||
{E823D54C-CE82-4868-929F-5F95A999F61E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E823D54C-CE82-4868-929F-5F95A999F61E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
@@ -137,10 +123,28 @@ Global
|
||||
{9FE720ED-2BD9-4FB9-89C8-FFFA4A491CB5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9FE720ED-2BD9-4FB9-89C8-FFFA4A491CB5}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{9FE720ED-2BD9-4FB9-89C8-FFFA4A491CB5}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{E4328F68-C3FC-43E2-9D63-30CEC55215B0}.Debug|.NET.ActiveCfg = Debug|Any CPU
|
||||
{E4328F68-C3FC-43E2-9D63-30CEC55215B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E4328F68-C3FC-43E2-9D63-30CEC55215B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E4328F68-C3FC-43E2-9D63-30CEC55215B0}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{E4328F68-C3FC-43E2-9D63-30CEC55215B0}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{E4328F68-C3FC-43E2-9D63-30CEC55215B0}.Release|.NET.ActiveCfg = Release|Any CPU
|
||||
{E4328F68-C3FC-43E2-9D63-30CEC55215B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E4328F68-C3FC-43E2-9D63-30CEC55215B0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E4328F68-C3FC-43E2-9D63-30CEC55215B0}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{E4328F68-C3FC-43E2-9D63-30CEC55215B0}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{3A3A4E65-45A6-4B20-B460-0BEDC302C02C} = {438FE108-6F55-4C8A-8BF4-C85D0906D134}
|
||||
{710961A3-0DF4-49E4-A26E-F5B9C044AC84} = {438FE108-6F55-4C8A-8BF4-C85D0906D134}
|
||||
{AE00E5AB-C39A-436F-86D2-33BFE33E2E40} = {438FE108-6F55-4C8A-8BF4-C85D0906D134}
|
||||
{E823D54C-CE82-4868-929F-5F95A999F61E} = {438FE108-6F55-4C8A-8BF4-C85D0906D134}
|
||||
{9FE720ED-2BD9-4FB9-89C8-FFFA4A491CB5} = {5ECE7B2B-6975-4800-982E-618794909499}
|
||||
{E4328F68-C3FC-43E2-9D63-30CEC55215B0} = {5ECE7B2B-6975-4800-982E-618794909499}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
NAntAddinLastFileName = Spring.build
|
||||
EndGlobalSection
|
||||
|
||||
Binary file not shown.
@@ -14,6 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
using Quartz;
|
||||
using Quartz.Impl.AdoJobStore;
|
||||
using Quartz.Spi;
|
||||
@@ -49,9 +53,8 @@ namespace Spring.Scheduling.Quartz
|
||||
/// <seealso cref="SchedulerFactoryObject#DbProvider" />
|
||||
/// <seealso cref="ConnectionUtils.GetConnection" />
|
||||
/// <seealso cref="ConnectionUtils.DisposeConnection" />
|
||||
public class LocalDataSourceJobStore : JobStoreSupport
|
||||
public class LocalDataSourceJobStore : JobStoreCMT
|
||||
{
|
||||
|
||||
/**
|
||||
* Name used for the transactional ConnectionProvider for Quartz.
|
||||
* This provider will delegate to the local Spring-managed DataSource.
|
||||
@@ -62,47 +65,39 @@ namespace Spring.Scheduling.Quartz
|
||||
|
||||
private Data.Common.IDbProvider dbProvider;
|
||||
|
||||
public Data.Common.IDbProvider DbProvider
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the instance.
|
||||
/// </summary>
|
||||
/// <value>The name of the instance.</value>
|
||||
public override string InstanceName
|
||||
{
|
||||
get { return dbProvider; }
|
||||
set { dbProvider = value; }
|
||||
}
|
||||
|
||||
|
||||
public override void Initialize(ITypeLoadHelper loadHelper, ISchedulerSignaler signaler)
|
||||
{
|
||||
|
||||
// Absolutely needs thread-bound DataSource to initialize.
|
||||
dbProvider = SchedulerFactoryObject.ConfigTimeDbProvider;
|
||||
if (dbProvider == null)
|
||||
get { return base.InstanceName; }
|
||||
set
|
||||
{
|
||||
throw new SchedulerConfigException(
|
||||
"No db provider found for configuration - " +
|
||||
"'DbProvider' property must be set on SchedulerFactoryObject");
|
||||
// use to catch property setting
|
||||
base.InstanceName = value;
|
||||
DataSource = TX_DATA_SOURCE_PREFIX + InstanceName;
|
||||
// Register transactional ConnectionProvider for Quartz.
|
||||
// Absolutely needs thread-bound DataSource to initialize.
|
||||
dbProvider = SchedulerFactoryObject.ConfigTimeDbProvider;
|
||||
if (dbProvider == null)
|
||||
{
|
||||
throw new SchedulerConfigException(
|
||||
"No db provider found for configuration - " +
|
||||
"'DbProvider' property must be set on SchedulerFactoryObject");
|
||||
}
|
||||
DBConnectionManager.Instance.AddConnectionProvider(
|
||||
TX_DATA_SOURCE_PREFIX + InstanceName, new SpringDbProviderAdapter(dbProvider));
|
||||
|
||||
}
|
||||
|
||||
// Configure transactional connection settings for Quartz.
|
||||
DataSource = TX_DATA_SOURCE_PREFIX + InstanceName;
|
||||
DontSetAutoCommitFalse = true;
|
||||
|
||||
// Register transactional ConnectionProvider for Quartz.
|
||||
DBConnectionManager.Instance.AddConnectionProvider(
|
||||
TX_DATA_SOURCE_PREFIX + InstanceName, new SpringDbProviderAdapter(dbProvider));
|
||||
|
||||
base.Initialize(loadHelper, signaler);
|
||||
}
|
||||
|
||||
protected override ConnectionAndTransactionHolder GetNonManagedTXConnection()
|
||||
{
|
||||
return GetConnection();
|
||||
ConnectionTxPair pair = ConnectionUtils.GetConnectionTxPair(dbProvider);
|
||||
return new ConnectionAndTransactionHolder(pair.Connection, pair.Transaction);
|
||||
}
|
||||
|
||||
protected override object ExecuteInLock(string lockName, ITransactionCallback txCallback)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
protected override void CloseConnection(ConnectionAndTransactionHolder connectionAndTransactionHolder)
|
||||
{
|
||||
// Will work for transactional and non-transactional connections.
|
||||
@@ -111,4 +106,112 @@ namespace Spring.Scheduling.Quartz
|
||||
|
||||
}
|
||||
|
||||
///<summary>
|
||||
///</summary>
|
||||
public class JobStoreCMT : JobStoreSupport {
|
||||
|
||||
///<summary>
|
||||
///</summary>
|
||||
///<param name="loadHelper"></param>
|
||||
///<param name="signaler"></param>
|
||||
public override void Initialize(ITypeLoadHelper loadHelper, ISchedulerSignaler signaler)
|
||||
{
|
||||
if (LockHandler == null) {
|
||||
// If the user hasn't specified an explicit lock handler,
|
||||
// then we *must* use DB locks with CMT...
|
||||
UseDBLocks = true;
|
||||
}
|
||||
|
||||
base.Initialize(loadHelper, signaler);
|
||||
|
||||
Log.Info("JobStoreCMT initialized.");
|
||||
}
|
||||
|
||||
///<summary>
|
||||
///</summary>
|
||||
public override void Shutdown() {
|
||||
|
||||
base.Shutdown();
|
||||
|
||||
try {
|
||||
DBConnectionManager.Instance.Shutdown(DataSource);
|
||||
} catch (SqlException sqle) {
|
||||
Log.Warn("Database connection shutdown unsuccessful.", sqle);
|
||||
}
|
||||
}
|
||||
|
||||
protected override ConnectionAndTransactionHolder GetNonManagedTXConnection()
|
||||
{
|
||||
IDbConnection conn;
|
||||
try {
|
||||
conn = DBConnectionManager.Instance.GetConnection(DataSource);
|
||||
} catch (SqlException sqle) {
|
||||
throw new JobPersistenceException(
|
||||
"Failed to obtain DB connection from data source '"
|
||||
+ DataSource + "': "
|
||||
+ sqle, sqle);
|
||||
} catch (Exception e) {
|
||||
throw new JobPersistenceException(
|
||||
"Failed to obtain DB connection from data source '"
|
||||
+ DataSource + "': "
|
||||
+ e, e,
|
||||
SchedulerException.ErrorPersistenceCriticalFailure);
|
||||
}
|
||||
|
||||
if (conn == null) {
|
||||
throw new JobPersistenceException(
|
||||
"Could not get connection from DataSource '"
|
||||
+ DataSource + "'");
|
||||
}
|
||||
|
||||
// Set any connection connection attributes we are to override.
|
||||
return new ConnectionAndTransactionHolder(conn, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the given callback having optionally aquired the given lock.
|
||||
* Because CMT assumes that the connection is already part of a managed
|
||||
* transaction, it does not attempt to commit or rollback the
|
||||
* enclosing transaction.
|
||||
*
|
||||
* @param lockName The name of the lock to aquire, for example
|
||||
* "TRIGGER_ACCESS". If null, then no lock is aquired, but the
|
||||
* txCallback is still executed in a transaction.
|
||||
*
|
||||
* @see JobStoreSupport#executeInNonManagedTXLock(String, TransactionCallback)
|
||||
* @see JobStoreTX#executeInLock(String, TransactionCallback)
|
||||
* @see JobStoreSupport#getNonManagedTXConnection()
|
||||
* @see JobStoreSupport#getConnection()
|
||||
*/
|
||||
protected override object ExecuteInLock(
|
||||
string lockName,
|
||||
ITransactionCallback txCallback){
|
||||
bool transOwner = false;
|
||||
ConnectionAndTransactionHolder conn = null;
|
||||
try {
|
||||
if (lockName != null) {
|
||||
// If we aren't using db locks, then delay getting DB connection
|
||||
// until after aquiring the lock since it isn't needed.
|
||||
if (LockHandler.RequiresConnection) {
|
||||
conn = GetNonManagedTXConnection();
|
||||
}
|
||||
|
||||
transOwner = LockHandler.ObtainLock(DbMetadata, conn, lockName);
|
||||
}
|
||||
|
||||
if (conn == null) {
|
||||
conn = GetNonManagedTXConnection();
|
||||
}
|
||||
|
||||
return txCallback.Execute(conn);
|
||||
} finally {
|
||||
try {
|
||||
ReleaseLock(conn, LockTriggerAccess, transOwner);
|
||||
} finally {
|
||||
CleanupConnection(conn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace Spring.Scheduling.Quartz
|
||||
private IJobListener[] jobListeners;
|
||||
private string[] jobSchedulingDataLocations;
|
||||
private bool overwriteExistingJobs;
|
||||
private NameValueCollection quartzProperties;
|
||||
private IDictionary quartzProperties;
|
||||
private IScheduler scheduler;
|
||||
private IDictionary schedulerContextMap;
|
||||
private Type schedulerFactoryType;
|
||||
@@ -227,7 +227,7 @@ namespace Spring.Scheduling.Quartz
|
||||
/// or to specify all necessary properties locally.
|
||||
/// </remarks>
|
||||
/// <seealso cref="ConfigLocation" />
|
||||
public virtual NameValueCollection QuartzProperties
|
||||
public virtual IDictionary QuartzProperties
|
||||
{
|
||||
set { quartzProperties = value; }
|
||||
}
|
||||
@@ -779,7 +779,7 @@ namespace Spring.Scheduling.Quartz
|
||||
if (taskExecutor != null)
|
||||
{
|
||||
mergedProps[StdSchedulerFactory.PropertyThreadPoolType] =
|
||||
typeof (LocalTaskExecutorThreadPool).FullName;
|
||||
typeof (LocalTaskExecutorThreadPool).AssemblyQualifiedName;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -816,7 +816,7 @@ namespace Spring.Scheduling.Quartz
|
||||
|
||||
if (dbProvider != null)
|
||||
{
|
||||
mergedProps.Add(StdSchedulerFactory.PropertyJobStoreType, typeof(LocalDataSourceJobStore).FullName);
|
||||
mergedProps.Add(StdSchedulerFactory.PropertyJobStoreType, typeof(LocalDataSourceJobStore).AssemblyQualifiedName);
|
||||
}
|
||||
|
||||
|
||||
@@ -836,11 +836,11 @@ namespace Spring.Scheduling.Quartz
|
||||
/// </summary>
|
||||
/// <param name="properties">The properties to merge into given map.</param>
|
||||
/// <param name="map">The map to merge to.</param>
|
||||
protected virtual void MergePropertiesIntoMap(NameValueCollection properties, NameValueCollection map)
|
||||
protected virtual void MergePropertiesIntoMap(IDictionary properties, NameValueCollection map)
|
||||
{
|
||||
foreach (string key in properties.Keys)
|
||||
{
|
||||
map[key] = properties[key];
|
||||
map[key] = (string) properties[key];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace Spring.Scheduling.Quartz
|
||||
/// <seealso cref="CronTriggerObject" />
|
||||
public class SimpleTriggerObject : SimpleTrigger, IJobDetailAwareTrigger, IObjectNameAware, IInitializingObject
|
||||
{
|
||||
private long startDelay = 0;
|
||||
private long startDelay;
|
||||
private JobDetail jobDetail;
|
||||
private string objectName;
|
||||
private readonly Constants constants = new Constants(typeof(MisfireInstruction.SimpleTrigger), typeof(MisfireInstruction));
|
||||
@@ -90,10 +90,7 @@ namespace Spring.Scheduling.Quartz
|
||||
/// <seealso cref="MisfireInstruction.SmartPolicy" />
|
||||
public virtual string MisfireInstructionName
|
||||
{
|
||||
set
|
||||
{
|
||||
MisfireInstruction = constants.AsNumber(value);
|
||||
}
|
||||
set { MisfireInstruction = constants.AsNumber(value); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright 2002-2007 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -14,11 +14,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Reflection;
|
||||
|
||||
using Quartz.Impl.AdoJobStore;
|
||||
using Quartz.Impl.AdoJobStore.Common;
|
||||
|
||||
using IDbMetadata=Spring.Data.Common.IDbMetadata;
|
||||
|
||||
namespace Spring.Scheduling.Quartz
|
||||
{
|
||||
/// <summary>
|
||||
@@ -28,6 +32,7 @@ namespace Spring.Scheduling.Quartz
|
||||
public class SpringDbProviderAdapter : IDbProvider
|
||||
{
|
||||
private readonly Data.Common.IDbProvider dbProvider;
|
||||
private DbMetadata metadata;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SpringDbProviderAdapter"/> class.
|
||||
@@ -36,8 +41,10 @@ namespace Spring.Scheduling.Quartz
|
||||
public SpringDbProviderAdapter(Data.Common.IDbProvider dbProvider)
|
||||
{
|
||||
this.dbProvider = dbProvider;
|
||||
metadata = new SpringMetadataAdapter(dbProvider.DbMetadata);
|
||||
}
|
||||
|
||||
|
||||
public IDbCommand CreateCommand()
|
||||
{
|
||||
return dbProvider.CreateCommand();
|
||||
@@ -71,7 +78,101 @@ namespace Spring.Scheduling.Quartz
|
||||
|
||||
public DbMetadata Metadata
|
||||
{
|
||||
get { throw new System.NotImplementedException(); }
|
||||
get { return metadata; }
|
||||
}
|
||||
}
|
||||
|
||||
public class SpringMetadataAdapter : DbMetadata
|
||||
{
|
||||
private IDbMetadata metadata;
|
||||
|
||||
public SpringMetadataAdapter(IDbMetadata metadata)
|
||||
{
|
||||
this.metadata = metadata;
|
||||
}
|
||||
|
||||
public override string ProductName
|
||||
{
|
||||
get { return metadata.ProductName; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public override Type ConnectionType
|
||||
{
|
||||
get { return metadata.ConnectionType; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public override Type CommandType
|
||||
{
|
||||
get { return metadata.CommandType; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public override Type ParameterType
|
||||
{
|
||||
get { return metadata.ParameterType; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public override Type CommandBuilderType
|
||||
{
|
||||
get { return metadata.CommandBuilderType; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public override MethodInfo CommandBuilderDeriveParametersMethod
|
||||
{
|
||||
get { return metadata.CommandBuilderDeriveParametersMethod; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public override string ParameterNamePrefix
|
||||
{
|
||||
get { return metadata.ParameterNamePrefix; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public override Type ExceptionType
|
||||
{
|
||||
get { return metadata.ExceptionType; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public override bool BindByName
|
||||
{
|
||||
get { return metadata.BindByName; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public override Type ParameterDbType
|
||||
{
|
||||
get { return metadata.ParameterDbType; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public override PropertyInfo ParameterDbTypeProperty
|
||||
{
|
||||
get { return metadata.ParameterDbTypeProperty; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public override PropertyInfo ParameterIsNullableProperty
|
||||
{
|
||||
get { return metadata.ParameterIsNullableProperty; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public override Enum DbBinaryType
|
||||
{
|
||||
get { return DbType.Binary; }
|
||||
}
|
||||
|
||||
public override bool UseParameterNamePrefixInParameterCollection
|
||||
{
|
||||
get { return metadata.UseParameterNamePrefixInParameterCollection; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2007 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
#region Imports
|
||||
|
||||
using System.Threading;
|
||||
|
||||
using NUnit.Framework;
|
||||
using Spring.Context;
|
||||
using Spring.Context.Support;
|
||||
|
||||
#endregion
|
||||
namespace Spring.Scheduling.Quartz.Integration.Tests
|
||||
{
|
||||
[TestFixture]
|
||||
public class LocalDataSourceJobStoreTest
|
||||
{
|
||||
private IApplicationContext ctx;
|
||||
|
||||
[SetUp]
|
||||
public void SetUp()
|
||||
{
|
||||
ctx = new XmlApplicationContext("assembly://Spring.Scheduling.Quartz.Integration.Tests/Spring.Scheduling.Quartz/LocalDataSourceJobStoreTest.xml");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestLocalDataSourceJobStore()
|
||||
{
|
||||
// sleep 20 seconds
|
||||
Thread.Sleep(20000);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns="http://www.springframework.net"
|
||||
xmlns:aop="http://www.springframework.net/aop"
|
||||
xmlns:db="http://www.springframework.net/database"
|
||||
xmlns:tx="http://www.springframework.net/tx">
|
||||
|
||||
|
||||
<!-- Property placeholder configurer for database settings -->
|
||||
|
||||
<object type="Spring.Objects.Factory.Config.PropertyPlaceholderConfigurer, Spring.Core">
|
||||
<property name="ConfigSections" value="appSettings"/>
|
||||
</object>
|
||||
|
||||
<!-- DB -->
|
||||
|
||||
<db:provider id="dbProvider" provider="SqlServer-2.0" connectionString="${ConnectionString}"/>
|
||||
|
||||
<object id="transactionManager" type="Spring.Data.Core.TxScopeTransactionManager, Spring.Data">
|
||||
|
||||
</object>
|
||||
|
||||
<!-- And actual Quartz -->
|
||||
|
||||
<object id="quartzSchedulerFactory" type="Spring.Scheduling.Quartz.SchedulerFactoryObject, Spring.Scheduling.Quartz">
|
||||
<property name="AutoStartup" value="true" />
|
||||
<property name="StartupDelay" value="5" />
|
||||
<property name="QuartzProperties">
|
||||
<dictionary>
|
||||
<entry key="quartz.threadPool.threadCount" value="10"/>
|
||||
<entry key="quartz.threadPool.type" value="Quartz.Simpl.SimpleThreadPool, Quartz"/>
|
||||
<entry key="quartz.threadPool.threadPriority" value="Normal"/>
|
||||
<entry key="quartz.jobStore.misfireThreshold" value="60000"/>
|
||||
<entry key="quartz.jobStore.driverDelegateType" value="Quartz.Impl.AdoJobStore.StdAdoDelegate, Quartz"/>
|
||||
<entry key="quartz.jobStore.useProperties" value="false"/>
|
||||
<entry key="quartz.jobStore.tablePrefix" value="QRTZ_"/>
|
||||
<entry key="quartz.jobStore.lockHandler.type" value="Quartz.Impl.AdoJobStore.UpdateLockRowSemaphore, Quartz"/>
|
||||
|
||||
</dictionary>
|
||||
</property>
|
||||
<property name="triggers">
|
||||
<list>
|
||||
<ref object="simpleTrigger" />
|
||||
</list>
|
||||
</property>
|
||||
<property name="DbProvider" ref="dbProvider" />
|
||||
<property name="TransactionManager" ref="transactionManager" />
|
||||
</object>
|
||||
|
||||
<object id="testJob" type="Spring.Scheduling.Quartz.JobDetailObject, Spring.Scheduling.Quartz">
|
||||
<property name="JobType" value="Spring.Scheduling.Quartz.Integration.Tests.TestJob, Spring.Scheduling.Quartz.Integration.Tests" />
|
||||
</object>
|
||||
|
||||
<object id="simpleTrigger" type="Spring.Scheduling.Quartz.SimpleTriggerObject, Spring.Scheduling.Quartz">
|
||||
<!-- see the example of method invoking job above -->
|
||||
<property name="jobDetail" ref="testJob" />
|
||||
<!-- 2 seconds -->
|
||||
<property name="startDelay" value="2" />
|
||||
<!-- repeat every 3 seconds -->
|
||||
<property name="repeatInterval" value="3000" />
|
||||
</object>
|
||||
|
||||
|
||||
</objects>
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
|
||||
using Quartz;
|
||||
|
||||
namespace Spring.Scheduling.Quartz.Integration.Tests
|
||||
{
|
||||
public class TestJob : IJob
|
||||
{
|
||||
public void Execute(JobExecutionContext context)
|
||||
{
|
||||
Console.WriteLine("Executing Execute!");
|
||||
}
|
||||
|
||||
public void DoIt()
|
||||
{
|
||||
Console.WriteLine("Executing DoIt!");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
<VisualStudioProject>
|
||||
<CSHARP
|
||||
ProjectType = "Local"
|
||||
ProductVersion = "7.10.6030"
|
||||
SchemaVersion = "2.0"
|
||||
ProjectGuid = "{ED644EA8-B6AE-457C-BF32-516DAE541FAC}"
|
||||
>
|
||||
<Build>
|
||||
<Settings
|
||||
ApplicationIcon = ""
|
||||
AssemblyKeyContainerName = ""
|
||||
AssemblyName = "Spring.Scheduling.Quartz.Integration.Tests"
|
||||
AssemblyOriginatorKeyFile = ""
|
||||
DefaultClientScript = "JScript"
|
||||
DefaultHTMLPageLayout = "Grid"
|
||||
DefaultTargetSchema = "IE50"
|
||||
DelaySign = "false"
|
||||
OutputType = "Library"
|
||||
PreBuildEvent = ""
|
||||
PostBuildEvent = ""
|
||||
RootNamespace = "Spring"
|
||||
RunPostBuildEvent = "OnBuildSuccess"
|
||||
StartupObject = ""
|
||||
>
|
||||
<Config
|
||||
Name = "Debug"
|
||||
AllowUnsafeBlocks = "false"
|
||||
BaseAddress = "285212672"
|
||||
CheckForOverflowUnderflow = "false"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = "DEBUG;TRACE"
|
||||
DocumentationFile = ""
|
||||
DebugSymbols = "true"
|
||||
FileAlignment = "4096"
|
||||
IncrementalBuild = "false"
|
||||
NoStdLib = "false"
|
||||
NoWarn = ""
|
||||
Optimize = "false"
|
||||
OutputPath = "..\..\..\build\VS.NET.2003\Spring.Scheduling.Quartz.Integration.Tests\Debug\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "4"
|
||||
/>
|
||||
<Config
|
||||
Name = "Release"
|
||||
AllowUnsafeBlocks = "false"
|
||||
BaseAddress = "285212672"
|
||||
CheckForOverflowUnderflow = "false"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = "TRACE"
|
||||
DocumentationFile = ""
|
||||
DebugSymbols = "false"
|
||||
FileAlignment = "4096"
|
||||
IncrementalBuild = "false"
|
||||
NoStdLib = "false"
|
||||
NoWarn = ""
|
||||
Optimize = "true"
|
||||
OutputPath = "..\..\..\build\VS.NET.2003\Spring.Scheduling.Quartz.Integration.Tests\Release\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "4"
|
||||
/>
|
||||
</Settings>
|
||||
<References>
|
||||
<Reference
|
||||
Name = "System"
|
||||
AssemblyName = "System"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Data"
|
||||
AssemblyName = "System.Data"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.XML"
|
||||
AssemblyName = "System.Xml"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "Spring.Scheduling.Quartz.2003"
|
||||
Project = "{0C0D8C65-90DE-4914-9940-4C684C54971B}"
|
||||
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
|
||||
/>
|
||||
<Reference
|
||||
Name = "Spring.Core"
|
||||
AssemblyName = "Spring.Core"
|
||||
HintPath = "..\..\..\lib\net\1.1\Spring.Core.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "nunit.framework"
|
||||
AssemblyName = "nunit.framework"
|
||||
HintPath = "..\..\..\lib\net\1.1\nunit.framework.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "Quartz"
|
||||
AssemblyName = "Quartz"
|
||||
HintPath = "..\..\..\lib\net\1.1\Quartz.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "Nullables"
|
||||
AssemblyName = "Nullables"
|
||||
HintPath = "..\..\..\lib\net\1.1\Nullables.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "Rhino.Mocks"
|
||||
AssemblyName = "Rhino.Mocks"
|
||||
HintPath = "..\..\..\lib\net\1.1\Rhino.Mocks.dll"
|
||||
/>
|
||||
</References>
|
||||
</Build>
|
||||
<Files>
|
||||
<Include>
|
||||
<File
|
||||
RelPath = "Scheduling\Quartz\AdaptableJobFactoryTest.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Scheduling\Quartz\CronTriggerObjectTest.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Scheduling\Quartz\JobDetailObjectTest.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Scheduling\Quartz\MethodInvokingJobDetailFactoryObjectTest.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Scheduling\Quartz\MethodInvokingJobTest.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Scheduling\Quartz\SchedulerFactoryObjectTest.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Scheduling\Quartz\SimpleTriggerObjectTest.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Scheduling\Quartz\SpringObjectJobFactoryTest.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Scheduling\Quartz\TestUtil.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Scheduling\Quartz\TriggerObjectTest.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
</Include>
|
||||
</Files>
|
||||
</CSHARP>
|
||||
</VisualStudioProject>
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{E4328F68-C3FC-43E2-9D63-30CEC55215B0}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Spring</RootNamespace>
|
||||
<AssemblyName>Spring.Scheduling.Quartz.Integration.Tests</AssemblyName>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>2.0</OldToolsVersion>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.NET.2005\Spring.Scheduling.Quartz.Integration.Tests\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;NET_2_0</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.NET.2005\Spring.Scheduling.Quartz.Integration.Tests\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NET_2_0</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="nunit.framework, Version=2.2.7.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\net\2.0\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Quartz, Version=0.7.0.15571, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\net\2.0\Quartz.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Rhino.Mocks, Version=2.9.6.40380, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\Rhino.Mocks.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.2005.csproj">
|
||||
<Project>{710961A3-0DF4-49E4-A26E-F5B9C044AC84}</Project>
|
||||
<Name>Spring.Core.2005</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Scheduling.Quartz\Spring.Scheduling.Quartz.2005.csproj">
|
||||
<Project>{E823D54C-CE82-4868-929F-5F95A999F61E}</Project>
|
||||
<Name>Spring.Scheduling.Quartz.2005</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Spring.Scheduling.Quartz.Integration.Tests.dll.config">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Scheduling\Quartz\LocalDataSourceJobStoreTest.cs" />
|
||||
<Compile Include="Scheduling\Quartz\TestJob.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Scheduling\Quartz\LocalDataSourceJobStoreTest.xml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" ?>
|
||||
<project name="Spring.Scheduling.Quartz.Integration.Tests" default="build" xmlns="http://nant.sf.net/schemas/nant.xsd">
|
||||
<!--
|
||||
Required properties:
|
||||
* current.bin.dir - (path) root level to build to
|
||||
* build.debug - (true|false) debug build?
|
||||
* current.build.defines.csc - framework-specific build defines
|
||||
-->
|
||||
<target name="build">
|
||||
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
<nowarn>
|
||||
<warning number="${nowarn.numbers.test}" />
|
||||
</nowarn>
|
||||
<sources failonempty="true">
|
||||
<include name="**/*.cs" />
|
||||
<include name="../CommonAssemblyInfo.cs" />
|
||||
</sources>
|
||||
<references basedir="${current.bin.dir}">
|
||||
<include name="*.dll" />
|
||||
<exclude name="${project::get-name()}.dll" />
|
||||
</references>
|
||||
</csc>
|
||||
<copy todir="${current.bin.dir}">
|
||||
<fileset basedir="${project::get-name()}/Data">
|
||||
<include name="**/*.xml" />
|
||||
<include name="**/*.test" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${current.bin.dir}">
|
||||
<fileset basedir="${project::get-name()}">
|
||||
<include name="**/*.config" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="test" depends="build">
|
||||
<nunit2>
|
||||
<formatter type="Plain" />
|
||||
<formatter type="Xml" usefile="true" extension=".xml"
|
||||
outputdir="${current.bin.dir}/results" />
|
||||
<test assemblyname="${current.bin.dir}/${project::get-name()}.dll"
|
||||
appconfig="${current.bin.dir}/${project::get-name()}.dll.config" />
|
||||
</nunit2>
|
||||
</target>
|
||||
|
||||
<target name="test-mono-1.0" >
|
||||
<nunit2>
|
||||
<formatter type="Plain" />
|
||||
<formatter type="Xml" usefile="true" extension=".xml"
|
||||
outputdir="${current.bin.dir}/results" />
|
||||
<test assemblyname="${bin.dir}/net/1.1/${current.build.config}/${project::get-name()}.dll"
|
||||
appconfig="${bin.dir}/net/1.1/${current.build.config}/${project::get-name()}.dll.config" />
|
||||
</nunit2>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
|
||||
<configSections>
|
||||
<sectionGroup name="common">
|
||||
<section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
|
||||
</sectionGroup>
|
||||
<sectionGroup name="spring">
|
||||
<section name="typeAliases" type="Spring.Context.Support.TypeAliasesSectionHandler, Spring.Core"/>
|
||||
<section name="parsers" type="Spring.Context.Support.NamespaceParsersSectionHandler, Spring.Core"/>
|
||||
<section name="context" type="Spring.Context.Support.WebContextHandler, Spring.Web"/>
|
||||
<section name="objects" type="Spring.Context.Support.DefaultSectionHandler, Spring.Core"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
|
||||
<common>
|
||||
<logging>
|
||||
|
||||
<factoryAdapter type="Common.Logging.Simple.ConsoleOutLoggerFactoryAdapter, Common.Logging">
|
||||
<arg key="level" value="DEBUG" />
|
||||
|
||||
</factoryAdapter>
|
||||
|
||||
</logging>
|
||||
</common>
|
||||
|
||||
<spring>
|
||||
<parsers>
|
||||
<parser type="Spring.Data.Config.DatabaseNamespaceParser, Spring.Data"/>
|
||||
<parser type="Spring.Transaction.Config.TxNamespaceParser, Spring.Data"/>
|
||||
<parser type="Spring.Aop.Config.AopNamespaceParser, Spring.Aop"/>
|
||||
</parsers>
|
||||
</spring>
|
||||
|
||||
|
||||
<appSettings>
|
||||
<add key="ConnectionString" value="Server=(local);initial catalog=quartz;Integrated Security=true"/>
|
||||
</appSettings>
|
||||
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Common.Logging"
|
||||
publicKeyToken="af08829b84f0328e" />
|
||||
<!-- Assembly versions can be redirected in application, publisher policy, or machine configuration files. -->
|
||||
<bindingRedirect oldVersion="1.1.0.0"
|
||||
newVersion="1.2.0.0"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user