StatementPreparerImpl should not need to retrieve the JDBCService as often

Description

The StatementPreparerImpl class is using a rather expensive (performance wise) implementation of getJdbcService(), which seems to be invoked regularly now in each StatementPreparationTemplate#prepareStatement.

The existing getJdbcService() seems was previously used only in exceptional cases, but this newly introduced usage is quite hot. The getJdbcService() method should be optimised so to not become a bottleneck as it's used more often: inject the service in the constructor? Or is there a cheaper way to retrieve it from other things we have here?

Environment

None

Status

Assignee

Andrea Boriero

Reporter

Sanne Grinovero

Fix versions

Labels

backPortable

Backport?

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Priority

Major
Configure