question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve configuration support for customizing JDBC session SQL statements

See original GitHub issue

I want to simply override the prepareQueries method in this repository class and add my overriden queries there. For some reason this is private for no obvious reason (perhaps I am missing it).

Would be like to make this method protected

protected void prepareQueries() {
    this.createSessionQuery = getQuery(CREATE_SESSION_QUERY);
    this.createSessionAttributeQuery = getQuery(CREATE_SESSION_ATTRIBUTE_QUERY);
    this.getSessionQuery = getQuery(GET_SESSION_QUERY);
    this.updateSessionQuery = getQuery(UPDATE_SESSION_QUERY);
    this.updateSessionAttributeQuery = getQuery(UPDATE_SESSION_ATTRIBUTE_QUERY);
    this.deleteSessionAttributeQuery = getQuery(DELETE_SESSION_ATTRIBUTE_QUERY);
    this.deleteSessionQuery = getQuery(DELETE_SESSION_QUERY);
    this.listSessionsByPrincipalNameQuery =
            getQuery(LIST_SESSIONS_BY_PRINCIPAL_NAME_QUERY);
    this.deleteSessionsByExpiryTimeQuery =
            getQuery(DELETE_SESSIONS_BY_EXPIRY_TIME_QUERY);
}

Thanks!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
pmgkrishnacommented, Apr 17, 2020

@vpavic can you share any spring document to ovverride a jdbcOperationsSessionRepository with customOperationSessionRepository to provide a custom sql queries?

1reaction
vpaviccommented, Mar 12, 2019

Hi @moleksyuk - as your request is a bit different, could you please open a new issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

The best way to log SQL statements with JDBC, JPA or ...
Introduction. In this article, I'm going to show you the best way to log SQL statements when using either JDBC, JPA, or Hibernate....
Read more >
Setting the connection properties - JDBC Driver for SQL Server
The connection string properties for the Microsoft JDBC Driver for SQL Server can be specified in various ways.
Read more >
Configuring the JDBC Connector (Optional)
Ensure that the JDBC driver for the external SQL database supports any statement-level property that you specify. Session-Level Properties. To set session-level ...
Read more >
Tableau JDBC Capability Customizations Reference
Set to 'yes' to force the transaction isolation level to Read Uncommitted if the data source supports it. Only one of the four...
Read more >
Properties reference: JDBC connector - IBM
Usage · Isolation level: Specify how the connector manages statements in transactions. · Auto-commit mode: Configure the stage to run in auto-commit mode....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found