Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Support
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv17021/src/Spring/Spring.Core/Objects/Factory/Support
Modified Files:
AbstractAutowireCapableObjectFactory.cs
AbstractObjectFactory.cs
Log Message:
SPRNET-953
SPRNET-952
SPRNET-949
SPRNET-948
SPRNET-947
Index: AbstractAutowireCapableObjectFactory.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Support/AbstractAutowireCapableObjectFactory.cs,v
retrieving revision 1.89
retrieving revision 1.90
diff -C2 -d -r1.89 -r1.90
*** AbstractAutowireCapableObjectFactory.cs 5 May 2008 22:42:17 -0000 1.89
--- AbstractAutowireCapableObjectFactory.cs 29 May 2008 12:13:27 -0000 1.90
***************
*** 97,102 ****
/// </remarks>
/// <param name="caseSensitive">Flag specifying whether to make this object factory case sensitive or not.</param>
! protected AbstractAutowireCapableObjectFactory(bool caseSensitive) : this(caseSensitive, null)
! {}
/// <summary>
--- 97,103 ----
/// </remarks>
/// <param name="caseSensitive">Flag specifying whether to make this object factory case sensitive or not.</param>
! protected AbstractAutowireCapableObjectFactory(bool caseSensitive)
! : this(caseSensitive, null)
! { }
/// <summary>
***************
*** 112,116 ****
/// <param name="caseSensitive">Flag specifying whether to make this object factory case sensitive or not.</param>
/// <param name="parentFactory">The parent object factory, or <see langword="null"/> if none.</param>
! protected AbstractAutowireCapableObjectFactory(bool caseSensitive, IObjectFactory parentFactory) : base(caseSensitive, parentFactory)
{
this.IgnoreDependencyInterface(typeof(IObjectFactoryAware));
--- 113,118 ----
/// <param name="caseSensitive">Flag specifying whether to make this object factory case sensitive or not.</param>
/// <param name="parentFactory">The parent object factory, or <see langword="null"/> if none.</param>
! protected AbstractAutowireCapableObjectFactory(bool caseSensitive, IObjectFactory parentFactory)
! : base(caseSensitive, parentFactory)
{
this.IgnoreDependencyInterface(typeof(IObjectFactoryAware));
***************
*** 239,243 ****
{
// clear return type found: all factory methods return same type...
! return (Type) ObjectUtils.EnumerateFirstElement(returnTypes);
}
else
--- 241,245 ----
{
// clear return type found: all factory methods return same type...
! return (Type)ObjectUtils.EnumerateFirstElement(returnTypes);
}
else
***************
*** 265,269 ****
if (definition != null)
{
! log.Debug(string.Format( "configuring object '{0}' using definition '{1}'", instance, name ));
ApplyPropertyValues(name, definition, new ObjectWrapper(instance), definition.PropertyValues);
}
--- 267,271 ----
if (definition != null)
{
! log.Debug(string.Format("configuring object '{0}' using definition '{1}'", instance, name));
ApplyPropertyValues(name, definition, new ObjectWrapper(instance), definition.PropertyValues);
}
***************
*** 400,404 ****
}
}
! return (string[]) result.ToArray(typeof(string));
}
--- 402,406 ----
}
}
! return (string[])result.ToArray(typeof(string));
}
***************
*** 459,463 ****
if (!continueWithPropertyPopulation)
{
! return;
}
--- 461,465 ----
if (!continueWithPropertyPopulation)
{
! return;
}
***************
*** 468,472 ****
if (properties.PropertyValues.Length > 0)
{
! throw new ObjectCreationException(definition.ResourceDescription,
name, "Cannot apply property values to null instance.");
}
--- 470,474 ----
if (properties.PropertyValues.Length > 0)
{
! throw new ObjectCreationException(definition.ResourceDescription,
name, "Cannot apply property values to null instance.");
}
***************
*** 556,560 ****
if (handlerValue.Source is RuntimeObjectReference)
{
! RuntimeObjectReference roref = (RuntimeObjectReference) handlerValue.Source;
handler = ResolveReference(definition, name, eventName, roref);
}
--- 558,562 ----
if (handlerValue.Source is RuntimeObjectReference)
{
! RuntimeObjectReference roref = (RuntimeObjectReference)handlerValue.Source;
handler = ResolveReference(definition, name, eventName, roref);
}
***************
*** 866,874 ****
log.Debug("Eagerly caching object '" + name + "' to allow for resolving potential circular references");
}
! AddSingleton(name, instance);
eagerlyCached = true;
}
! instance = ConfigureObject(name, definition, instanceWrapper);
}
catch (ObjectCreationException)
--- 868,876 ----
log.Debug("Eagerly caching object '" + name + "' to allow for resolving potential circular references");
}
! AddEagerlyCachedSingleton(name, definition, instance);
eagerlyCached = true;
}
! instance = ConfigureObject(name, definition, instanceWrapper);
}
catch (ObjectCreationException)
***************
*** 876,880 ****
if (eagerlyCached)
{
! RemoveSingleton(name);
}
throw;
--- 878,882 ----
if (eagerlyCached)
{
! RemoveEagerlyCachedSingleton(name, definition);
}
throw;
***************
*** 884,888 ****
if (eagerlyCached)
{
! RemoveSingleton(name);
}
throw new ObjectCreationException(definition.ResourceDescription, name, "Initialization of object failed : " + ex.Message, ex);
--- 886,890 ----
if (eagerlyCached)
{
! RemoveEagerlyCachedSingleton(name, definition);
}
throw new ObjectCreationException(definition.ResourceDescription, name, "Initialization of object failed : " + ex.Message, ex);
***************
*** 892,895 ****
--- 894,926 ----
/// <summary>
+ /// Add the created, but yet unpopulated singleton to the singleton cache
+ /// to be able to resolve circular references
+ /// </summary>
+ /// <param name="objectName">the name of the object to add to the cache.</param>
+ /// <param name="objectDefinition">the definition used to create and populated the object.</param>
+ /// <param name="rawSingletonInstance">the raw object instance.</param>
+ /// <remarks>
+ /// Derived classes may override this method to select the right cache based on the object definition.
+ /// </remarks>
+ protected virtual void AddEagerlyCachedSingleton(string objectName, IObjectDefinition objectDefinition, object rawSingletonInstance)
+ {
+ base.AddSingleton(objectName, rawSingletonInstance);
+ }
+
+ /// <summary>
+ /// Remove the specified singleton from the singleton cache that has
+ /// been added before by a call to <see cref="AddEagerlyCachedSingleton"/>
+ /// </summary>
+ /// <param name="objectName">the name of the object to remove from the cache.</param>
+ /// <param name="objectDefinition">the definition used to create and populated the object.</param>
+ /// <remarks>
+ /// Derived classes may override this method to select the right cache based on the object definition.
+ /// </remarks>
+ protected virtual void RemoveEagerlyCachedSingleton(string objectName, IObjectDefinition objectDefinition)
+ {
+ base.RemoveSingleton(objectName);
+ }
+
+ /// <summary>
/// Creates an <see cref="IObjectWrapper"/> instance from the <see cref="RootObjectDefinition"/> passed in <paramref name="definition"/>
/// using constructor <paramref name="arguments"/>
***************
*** 911,915 ****
instanceWrapper = AutowireConstructor(name, definition, arguments);
}
! else if (definition.ResolvedAutowireMode == AutoWiringMode.Constructor ||
definition.HasConstructorArgumentValues)
{
--- 942,946 ----
instanceWrapper = AutowireConstructor(name, definition, arguments);
}
! else if (definition.ResolvedAutowireMode == AutoWiringMode.Constructor ||
definition.HasConstructorArgumentValues)
{
***************
*** 1032,1037 ****
}
// if we get here, we found a factory method...
!
! if (ReflectionUtils.GetMethodByArgumentValues(new MethodInfo[]{factoryMethod}, arguments) == null)
{
continue;
--- 1063,1068 ----
}
// if we get here, we found a factory method...
!
! if (ReflectionUtils.GetMethodByArgumentValues(new MethodInfo[] { factoryMethod }, arguments) == null)
{
continue;
***************
*** 1093,1097 ****
searchType.FindMembers(MemberTypes.Method, methodFlags, new MemberFilter(new CriteriaMemberFilter().FilterMemberByCriteria),
methodCriteria);
! return (MethodInfo[]) ArrayList.Adapter(methods).ToArray(typeof(MethodInfo));
}
--- 1124,1128 ----
searchType.FindMembers(MemberTypes.Method, methodFlags, new MemberFilter(new CriteriaMemberFilter().FilterMemberByCriteria),
methodCriteria);
! return (MethodInfo[])ArrayList.Adapter(methods).ToArray(typeof(MethodInfo));
}
***************
*** 1137,1143 ****
methodType, valueHolder.Value,
parameterType, ex.Message);
! unsatisfiedDependencyExceptionData = new UnsatisfiedDependencyExceptionData(j,parameterType, errorMessage);
!
!
return null;
}
--- 1168,1174 ----
methodType, valueHolder.Value,
parameterType, ex.Message);
! unsatisfiedDependencyExceptionData = new UnsatisfiedDependencyExceptionData(j, parameterType, errorMessage);
!
!
return null;
}
***************
*** 1152,1156 ****
methodType);
unsatisfiedDependencyExceptionData = new UnsatisfiedDependencyExceptionData(j, parameterType, errorMessage);
!
return null;
}
--- 1183,1187 ----
methodType);
unsatisfiedDependencyExceptionData = new UnsatisfiedDependencyExceptionData(j, parameterType, errorMessage);
!
return null;
}
***************
*** 1170,1174 ****
parameterName, name);
unsatisfiedDependencyExceptionData = new UnsatisfiedDependencyExceptionData(j, parameterType, errorMessage);
!
return null;
}
--- 1201,1205 ----
parameterName, name);
unsatisfiedDependencyExceptionData = new UnsatisfiedDependencyExceptionData(j, parameterType, errorMessage);
!
return null;
}
***************
*** 1299,1307 ****
if (i == constructors.Length - 1 && constructorToUse == null)
{
! throw new UnsatisfiedDependencyException(definition.ResourceDescription,
! name,
! unsatisfiedDependencyExceptionData.ParameterIndex,
! unsatisfiedDependencyExceptionData.ParameterType,
! unsatisfiedDependencyExceptionData.ErrorMessage);
}
// try next constructor...
--- 1330,1338 ----
if (i == constructors.Length - 1 && constructorToUse == null)
{
! throw new UnsatisfiedDependencyException(definition.ResourceDescription,
! name,
! unsatisfiedDependencyExceptionData.ParameterIndex,
! unsatisfiedDependencyExceptionData.ParameterType,
! unsatisfiedDependencyExceptionData.ErrorMessage);
}
// try next constructor...
***************
*** 1379,1383 ****
foreach (DictionaryEntry de in definition.ConstructorArgumentValues.IndexedArgumentValues)
{
! int index = (int) de.Key;
if (index < 0)
{
--- 1410,1414 ----
foreach (DictionaryEntry de in definition.ConstructorArgumentValues.IndexedArgumentValues)
{
! int index = (int)de.Key;
if (index < 0)
{
***************
*** 1389,1398 ****
}
string argName = "constructor argument with index " + index;
! ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) de.Value;
object resolvedValue = ResolveValueIfNecessary(name, definition, argName, valueHolder.Value);
! resolvedValues.AddIndexedArgumentValue(index, resolvedValue,
StringUtils.HasText(valueHolder.Type)
! ? TypeResolutionUtils.ResolveType(valueHolder.Type).AssemblyQualifiedName
! : null);
}
foreach (ConstructorArgumentValues.ValueHolder valueHolder in definition.ConstructorArgumentValues.GenericArgumentValues)
--- 1420,1429 ----
}
string argName = "constructor argument with index " + index;
! ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder)de.Value;
object resolvedValue = ResolveValueIfNecessary(name, definition, argName, valueHolder.Value);
! resolvedValues.AddIndexedArgumentValue(index, resolvedValue,
StringUtils.HasText(valueHolder.Type)
! ? TypeResolutionUtils.ResolveType(valueHolder.Type).AssemblyQualifiedName
! : null);
}
foreach (ConstructorArgumentValues.ValueHolder valueHolder in definition.ConstructorArgumentValues.GenericArgumentValues)
***************
*** 1400,1413 ****
string argName = "constructor argument";
object resolvedValue = ResolveValueIfNecessary(name, definition, argName, valueHolder.Value);
! resolvedValues.AddGenericArgumentValue(resolvedValue,
StringUtils.HasText(valueHolder.Type)
! ? TypeResolutionUtils.ResolveType(valueHolder.Type).AssemblyQualifiedName
! : null);
}
foreach (DictionaryEntry namedArgumentEntry in definition.ConstructorArgumentValues.NamedArgumentValues)
{
! string argumentName = (string) namedArgumentEntry.Key;
string syntheticArgumentName = "constructor argument with name " + argumentName;
! ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) namedArgumentEntry.Value;
object resolvedValue = ResolveValueIfNecessary(name, definition, syntheticArgumentName, valueHolder.Value);
resolvedValues.AddNamedArgumentValue(argumentName, resolvedValue);
--- 1431,1444 ----
string argName = "constructor argument";
object resolvedValue = ResolveValueIfNecessary(name, definition, argName, valueHolder.Value);
! resolvedValues.AddGenericArgumentValue(resolvedValue,
StringUtils.HasText(valueHolder.Type)
! ? TypeResolutionUtils.ResolveType(valueHolder.Type).AssemblyQualifiedName
! : null);
}
foreach (DictionaryEntry namedArgumentEntry in definition.ConstructorArgumentValues.NamedArgumentValues)
{
! string argumentName = (string)namedArgumentEntry.Key;
string syntheticArgumentName = "constructor argument with name " + argumentName;
! ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder)namedArgumentEntry.Value;
object resolvedValue = ResolveValueIfNecessary(name, definition, syntheticArgumentName, valueHolder.Value);
resolvedValues.AddNamedArgumentValue(argumentName, resolvedValue);
***************
*** 1448,1452 ****
return;
}
!
PropertyInfo[] filteredPropInfo = FilterPropertyInfoForDependencyCheck(wrapper);
if (HasInstantiationAwareBeanPostProcessors)
--- 1479,1483 ----
return;
}
!
PropertyInfo[] filteredPropInfo = FilterPropertyInfoForDependencyCheck(wrapper);
if (HasInstantiationAwareBeanPostProcessors)
***************
*** 1483,1487 ****
if (unsatisfied)
{
! throw new UnsatisfiedDependencyException(definition.ResourceDescription, name, property.Name,
"Set this property value or disable dependency checking for this object.");
}
--- 1514,1518 ----
if (unsatisfied)
{
! throw new UnsatisfiedDependencyException(definition.ResourceDescription, name, property.Name,
"Set this property value or disable dependency checking for this object.");
}
***************
*** 1500,1511 ****
lock (filteredPropertyDescriptorsCache)
{
! PropertyInfo[] filtered = (PropertyInfo[]) filteredPropertyDescriptorsCache[wrapper.WrappedType];
if (filtered == null)
{
!
ArrayList list = new ArrayList(wrapper.GetPropertyInfos());
! for (int i = list.Count -1 ; i >= 0; i--)
{
! PropertyInfo pi = (PropertyInfo) list[i];
if (IsExcludedFromDependencyCheck(pi))
{
--- 1531,1542 ----
lock (filteredPropertyDescriptorsCache)
{
! PropertyInfo[] filtered = (PropertyInfo[])filteredPropertyDescriptorsCache[wrapper.WrappedType];
if (filtered == null)
{
!
ArrayList list = new ArrayList(wrapper.GetPropertyInfos());
! for (int i = list.Count - 1; i >= 0; i--)
{
! PropertyInfo pi = (PropertyInfo)list[i];
if (IsExcludedFromDependencyCheck(pi))
{
***************
*** 1513,1518 ****
}
}
!
! filtered = (PropertyInfo[]) list.ToArray(typeof(PropertyInfo));
filteredPropertyDescriptorsCache.Add(wrapper.WrappedType, filtered);
}
--- 1544,1549 ----
}
}
!
! filtered = (PropertyInfo[])list.ToArray(typeof(PropertyInfo));
filteredPropertyDescriptorsCache.Add(wrapper.WrappedType, filtered);
}
***************
*** 1572,1576 ****
#endregion
! ((IInitializingObject) target).AfterPropertiesSet();
}
if (StringUtils.HasText(definition.InitMethodName))
--- 1603,1607 ----
#endregion
! ((IInitializingObject)target).AfterPropertiesSet();
}
if (StringUtils.HasText(definition.InitMethodName))
***************
*** 1634,1638 ****
{
// #%&^! try to find the method with a boolean "force" parameter
! targetMethod = target.GetType().GetMethod(destroyMethodName, MethodResolutionFlags, null, new Type[] {typeof(bool)}, null);
if (targetMethod != null)
{
--- 1665,1669 ----
{
// #%&^! try to find the method with a boolean "force" parameter
! targetMethod = target.GetType().GetMethod(destroyMethodName, MethodResolutionFlags, null, new Type[] { typeof(bool) }, null);
if (targetMethod != null)
{
***************
*** 1650,1654 ****
else
{
! object[] args = usingForcingVersion ? new object[] {true} : ObjectUtils.EmptyObjects;
try
{
--- 1681,1685 ----
else
{
! object[] args = usingForcingVersion ? new object[] { true } : ObjectUtils.EmptyObjects;
try
{
***************
*** 1717,1721 ****
try
{
! ((IDisposable) target).Dispose();
}
catch (Exception ex)
--- 1748,1752 ----
try
{
! ((IDisposable)target).Dispose();
}
catch (Exception ex)
***************
*** 1819,1823 ****
{
// contains an IObjectDefinition with name and aliases...
! ObjectDefinitionHolder holder = (ObjectDefinitionHolder) argumentValue;
resolvedValue = ResolveInnerObjectDefinition(name, holder.ObjectName, argumentName, holder.ObjectDefinition, definition.IsSingleton);
}
--- 1850,1854 ----
{
// contains an IObjectDefinition with name and aliases...
! ObjectDefinitionHolder holder = (ObjectDefinitionHolder)argumentValue;
resolvedValue = ResolveInnerObjectDefinition(name, holder.ObjectName, argumentName, holder.ObjectDefinition, definition.IsSingleton);
}
***************
*** 1825,1840 ****
{
// resolve plain IObjectDefinition, without contained name: use dummy name...
! IObjectDefinition def = (IObjectDefinition) argumentValue;
! resolvedValue = ResolveInnerObjectDefinition(name, "(inner object)", argumentName, def, definition.IsSingleton);
}
else if (argumentValue is RuntimeObjectReference)
{
! RuntimeObjectReference roref = (RuntimeObjectReference) argumentValue;
resolvedValue = ResolveReference(definition, name, argumentName, roref);
}
else if (argumentValue is ExpressionHolder)
{
! ExpressionHolder expHolder = (ExpressionHolder) argumentValue;
object context = null;
IDictionary variables = null;
--- 1856,1871 ----
{
// resolve plain IObjectDefinition, without contained name: use dummy name...
! IObjectDefinition def = (IObjectDefinition)argumentValue;
! resolvedValue = ResolveInnerObjectDefinition(name, "(inner object)", argumentName, def, definition.IsSingleton);
}
else if (argumentValue is RuntimeObjectReference)
{
! RuntimeObjectReference roref = (RuntimeObjectReference)argumentValue;
resolvedValue = ResolveReference(definition, name, argumentName, roref);
}
else if (argumentValue is ExpressionHolder)
{
! ExpressionHolder expHolder = (ExpressionHolder)argumentValue;
object context = null;
IDictionary variables = null;
***************
*** 1845,1849 ****
context = contextProperty == null
? null
! : ResolveValueIfNecessary(name, definition, "Context",
contextProperty.Value);
PropertyValue variablesProperty = expHolder.Properties.GetPropertyValue("Variables");
--- 1876,1880 ----
context = contextProperty == null
? null
! : ResolveValueIfNecessary(name, definition, "Context",
contextProperty.Value);
PropertyValue variablesProperty = expHolder.Properties.GetPropertyValue("Variables");
***************
*** 1854,1858 ****
if (vars is IDictionary)
{
! variables = (IDictionary) vars;
}
else
--- 1885,1889 ----
if (vars is IDictionary)
{
! variables = (IDictionary)vars;
}
else
***************
*** 1864,1868 ****
if (variables == null) variables = CollectionsUtil.CreateCaseInsensitiveHashtable();
// add 'this' objectfactory reference to variables
! variables.Add( Expression.ReservedVariableNames.CurrentObjectFactory, this );
resolvedValue = expHolder.Expression.GetValue(context, variables);
--- 1895,1899 ----
if (variables == null) variables = CollectionsUtil.CreateCaseInsensitiveHashtable();
// add 'this' objectfactory reference to variables
! variables.Add(Expression.ReservedVariableNames.CurrentObjectFactory, this);
resolvedValue = expHolder.Expression.GetValue(context, variables);
***************
*** 1871,1880 ****
{
resolvedValue =
! ((IManagedCollection) argumentValue).Resolve(name, definition, argumentName,
new ManagedCollectionElementResolver(ResolveValueIfNecessary));
}
else if (argumentValue is TypedStringValue)
{
! TypedStringValue tsv = (TypedStringValue) argumentValue;
try
{
--- 1902,1911 ----
{
resolvedValue =
! ((IManagedCollection)argumentValue).Resolve(name, definition, argumentName,
new ManagedCollectionElementResolver(ResolveValueIfNecessary));
}
else if (argumentValue is TypedStringValue)
{
! TypedStringValue tsv = (TypedStringValue)argumentValue;
try
{
***************
*** 1888,1897 ****
resolvedValue = tsv.Value;
}
! } catch (Exception ex)
{
throw new ObjectCreationException(definition.ResourceDescription, name,
"Error converted typed String value for " + argumentName, ex);
}
!
}
else
--- 1919,1929 ----
resolvedValue = tsv.Value;
}
! }
! catch (Exception ex)
{
throw new ObjectCreationException(definition.ResourceDescription, name,
"Error converted typed String value for " + argumentName, ex);
}
!
}
else
***************
*** 2072,2076 ****
{
return ConfigureObject(name, definition, new ObjectWrapper(target));
! }
return null;
--- 2104,2108 ----
{
return ConfigureObject(name, definition, new ObjectWrapper(target));
! }
return null;
***************
*** 2114,2118 ****
protected virtual object ConfigureObject(string name, RootObjectDefinition definition, IObjectWrapper wrapper)
{
! object instance = wrapper.WrappedInstance;
#region Instrumentation
--- 2146,2150 ----
protected virtual object ConfigureObject(string name, RootObjectDefinition definition, IObjectWrapper wrapper)
{
! object instance = wrapper.WrappedInstance;
#region Instrumentation
***************
*** 2139,2143 ****
#endregion
! ((IObjectNameAware) instance).ObjectName = name;
}
--- 2171,2175 ----
#endregion
! ((IObjectNameAware)instance).ObjectName = name;
}
***************
*** 2155,2159 ****
#endregion
! ((IObjectFactoryAware) instance).ObjectFactory = this;
}
--- 2187,2191 ----
#endregion
! ((IObjectFactoryAware)instance).ObjectFactory = this;
}
***************
*** 2280,2285 ****
#endregion
!
! object result = instance;
foreach (IObjectPostProcessor objectProcessor in ObjectPostProcessors)
{
--- 2312,2317 ----
#endregion
!
! object result = instance;
foreach (IObjectPostProcessor objectProcessor in ObjectPostProcessors)
{
***************
*** 2287,2291 ****
if (result == null)
{
! throw new ObjectCreationException(name,
string.Format(CultureInfo.InvariantCulture,
"PostProcessBeforeInitialization method of IObjectPostProcessor [{0}] "
--- 2319,2323 ----
if (result == null)
{
! throw new ObjectCreationException(name,
string.Format(CultureInfo.InvariantCulture,
"PostProcessBeforeInitialization method of IObjectPostProcessor [{0}] "
***************
*** 2326,2330 ****
#endregion
! object result = instance;
foreach (IObjectPostProcessor objectProcessor in ObjectPostProcessors)
{
--- 2358,2362 ----
#endregion
! object result = instance;
foreach (IObjectPostProcessor objectProcessor in ObjectPostProcessors)
{
***************
*** 2332,2336 ****
if (result == null)
{
! throw new ObjectCreationException(name,
string.Format(CultureInfo.InvariantCulture,
"PostProcessAfterInitialization method of IObjectPostProcessor [{0}] "
--- 2364,2368 ----
if (result == null)
{
! throw new ObjectCreationException(name,
string.Format(CultureInfo.InvariantCulture,
"PostProcessAfterInitialization method of IObjectPostProcessor [{0}] "
Index: AbstractObjectFactory.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectFactory.cs,v
retrieving revision 1.76
retrieving revision 1.77
diff -C2 -d -r1.76 -r1.77
*** AbstractObjectFactory.cs 5 Apr 2008 13:35:35 -0000 1.76
--- AbstractObjectFactory.cs 29 May 2008 12:13:27 -0000 1.77
***************
*** 279,286 ****
{
// create object instance...
! lock (singletonCache)
! {
! sharedInstance = CreateAndCacheSingletonInstance(objectName, mergedObjectDefinition, arguments);
! }
instance = GetObjectForInstance(name, sharedInstance);
}
--- 279,283 ----
{
// create object instance...
! sharedInstance = CreateAndCacheSingletonInstance(objectName, mergedObjectDefinition, arguments);
instance = GetObjectForInstance(name, sharedInstance);
}
|