Not sure how valuable it is, but this is the call stack for the two different 
times my diagnostics code is invoked:  

DiagnosticListener.Format(FluentNHibernate.Diagnostics.DiagnosticResults 
results) Line 127
DiagnosticListener.Receive.AnonymousMethod__0(Common.Logging.FormatMessageHandler
 f) Line 35 + 0x11 bytes
DiagnosticListener.Receive(FluentNHibernate.Diagnostics.DiagnosticResults 
results) Line 35 + 0x33 bytes
FluentNHibernate.DLL!FluentNHibernate.Diagnostics.DefaultDiagnosticMessageDespatcher.Publish(FluentNHibernate.Diagnostics.DiagnosticResults
 results) Line 18 + 0xc bytes
FluentNHibernate.DLL!FluentNHibernate.Diagnostics.DefaultDiagnosticLogger.Flush()
 Line 28 + 0xf bytes
FluentNHibernate.DLL!FluentNHibernate.PersistenceModel.BuildMappings() Line 171 
+ 0xc bytes
FluentNHibernate.DLL!FluentNHibernate.Automapping.AutoPersistenceModel.BuildMappings()
 Line 136 + 0x8 bytes
FluentNHibernate.DLL!FluentNHibernate.PersistenceModel.EnsureMappingsBuilt() 
Line 221 + 0xe bytes
FluentNHibernate.DLL!FluentNHibernate.PersistenceModel.Configure(NHibernate.Cfg.Configuration
 cfg) Line 277 + 0x8 bytes
FluentNHibernate.DLL!FluentNHibernate.Automapping.AutoPersistenceModel.Configure(NHibernate.Cfg.Configuration
 configuration) Line 201 + 0xb bytes
FluentNHibernate.DLL!FluentNHibernate.Cfg.AutoMappingsContainer.Apply(NHibernate.Cfg.Configuration
 cfg, FluentNHibernate.PersistenceModel model) Line 86 + 0xb bytes
FluentNHibernate.DLL!FluentNHibernate.Cfg.MappingConfiguration.Apply(NHibernate.Cfg.Configuration
 cfg) Line 85 + 0x1e bytes
FluentNHibernate.DLL!FluentNHibernate.Cfg.FluentConfiguration.BuildConfiguration()
 Line 252 + 0x2a bytes
FluentNHibernate.DLL!FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory()
 Line 230 + 0x8 bytes
Configurator.DoConfigure(System.Func<NHibernate.Cfg.Configuration,NHibernate.Cfg.Configuration>
 configurationFunc) Line 120 + 0x13 bytes
Configurator.Configure() Line 183 + 0xd bytes
PersistenceModelBaseTests.AfterConfiguring_TypesAreExcludedInAutomappingConfiguration()
 Line 59 + 0x8 bytes


And:

DiagnosticListener.Format(FluentNHibernate.Diagnostics.DiagnosticResults 
results) Line 127
DiagnosticListener.Receive.AnonymousMethod__0(Common.Logging.FormatMessageHandler
 f) Line 35 + 0x11 bytes
DiagnosticListener.Receive(FluentNHibernate.Diagnostics.DiagnosticResults 
results) Line 35 + 0x33 bytes
FluentNHibernate.DLL!FluentNHibernate.Diagnostics.DefaultDiagnosticMessageDespatcher.Publish(FluentNHibernate.Diagnostics.DiagnosticResults
 results) Line 18 + 0xc bytes
FluentNHibernate.DLL!FluentNHibernate.Diagnostics.DefaultDiagnosticLogger.Flush()
 Line 28 + 0xf bytes
FluentNHibernate.DLL!FluentNHibernate.PersistenceModel.BuildMappings() Line 171 
+ 0xc bytes
FluentNHibernate.DLL!FluentNHibernate.PersistenceModel.EnsureMappingsBuilt() 
Line 221 + 0xe bytes
FluentNHibernate.DLL!FluentNHibernate.PersistenceModel.Configure(NHibernate.Cfg.Configuration
 cfg) Line 277 + 0x8 bytes
FluentNHibernate.DLL!FluentNHibernate.Cfg.MappingConfiguration.Apply(NHibernate.Cfg.Configuration
 cfg) Line 87 + 0xe bytes
MappingConfigurationWrapper.AddTypesToExcludeFromAutoMappingTo(PersistenceModelList
 persistenceModels) Line 120 + 0x10 bytes
Configurator.ConfigureMapping(FluentNHibernate.Cfg.MappingConfiguration 
mappingConfiguration) Line 194 + 0xd bytes
FluentNHibernate.DLL!FluentNHibernate.Cfg.FluentConfiguration.BuildConfiguration()
 Line 250 + 0xe bytes
FluentNHibernate.DLL!FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory()
 Line 230 + 0x8 bytes
Configurator.DoConfigure(System.Func<NHibernate.Cfg.Configuration,NHibernate.Cfg.Configuration>
 configurationFunc) Line 120 + 0x13 bytes
Configurator.Configure() Line 183 + 0xd bytes
PersistenceModelBaseTests.AfterConfiguring_TypesAreExcludedInAutomappingConfiguration()
 Line 59 + 0x8 bytes


It might be the intended behavior that my IDiagnosticListener is invoked twice 
for the same code path, so the above might of course be useless information.

--  
Asbjørn Ulsberg  -=|=- [email protected] (mailto:[email protected])
«He's a loathsome offensive brute, yet I can't look away»

On mandag 5. september 2011 at 16:20, Asbjørn Ulsberg wrote:

>  Yea, I'm using Fluently.Configure(). The configuration code (without the 
> mappings) looks like this:  
>  
> NHibernate.Cfg.Configuration configuration = GetConfiguration();
> FluentConfiguration fluentConfiguration = Fluently.Configure(configuration);
> fluentConfiguration.Diagnostics(SetupDiagnostics);
>  
> AddListenersTo(configuration);
>  
> fluentConfiguration.Mappings(ConfigureMapping);
>  
> try
> {
> this.sessionFactory = fluentConfiguration.BuildSessionFactory();
> this.configured = true;
> }
> catch (Exception exception)
> {
> throw;
> }
>  
>  
> It's the BuildSessionFactory() that fails, and even though it's only invoked 
> once, the Diagnostics() stuff is invoked twice; first without much data at 
> all, second with too much (duplicate assembly and fluent mappings).  
>  
> --  
> Asbjørn Ulsberg  -=|=- [email protected] (mailto:[email protected])
> «He's a loathsome offensive brute, yet I can't look away»
>  
> On mandag 5. september 2011 at 15:55, James Gregory wrote:
>  
> > Ok, that's fair enough. Nothing immediately obvious in the stack trace. 
> > Tell me, are you using Fluently.Configure? And are you creating multiple 
> > instances of it or doing everything within one?  
> >  
> >  --  
> >  You received this message because you are subscribed to the Google Groups 
> > "Fluent NHibernate" group.
> >  To view this discussion on the web visit 
> > https://groups.google.com/d/msg/fluent-nhibernate/-/aLPhyYFU0gwJ.
> >  To post to this group, send email to [email protected] 
> > (mailto:[email protected]).
> >  To unsubscribe from this group, send email to 
> > [email protected] 
> > (mailto:[email protected]).
> >  For more options, visit this group at 
> > http://groups.google.com/group/fluent-nhibernate?hl=en.
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en.

Reply via email to