Skip to content

Add support for NHibernate Custom Statistic #2060

Open
@gokhanabatay

Description

@gokhanabatay

I want to inject a custom statistic implementation into NHibernate, but as I can see, it is not allowed right now.

I think its a good option to make this injectable like 'ISQLExceptionConverter' also configurable via config file, because we need to collect metrics on time consuming things at db calls.

In SessionFactoryImpl, the statistics member is type as a concrete implementation instead of an IStatistics or IStatisticsImplementor.

[NonSerialized]
private StatisticsImpl statistics;

If we just define to statistic object one for session statistic with IStatistics type other is factory statistic with IStatisticsImplementor type then we can easily inject it.

ISessionFactoryImplementor has StatisticsImplementor but its not injectable as I see.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions