Skip to content

DataSourcePoolNewConnectionListener for listening of new connections#139

Merged
rbygrave merged 3 commits intoebean-orm:masterfrom
Ryszard-Trojnacki:feature/extra-connection-initialize
Nov 5, 2025
Merged

DataSourcePoolNewConnectionListener for listening of new connections#139
rbygrave merged 3 commits intoebean-orm:masterfrom
Ryszard-Trojnacki:feature/extra-connection-initialize

Conversation

@Ryszard-Trojnacki
Copy link
Contributor

I have implemented a ConnectionListener that is called when a new connection is created and added to the pool.

This listener has two methods. One (onCreatedConnection) is called at the begining of initialization of new connection by Ebean (start of initConnection method) second (onAfterInitialized) is called at the end of initialization process.

Not sure is two are needed.

This can be used to extend connection parameters like:

void onCreatedConnection(Connection connection) {
    PGvector.registerTypes(conn)
}

@rbygrave rbygrave added this to the 10.2 milestone Nov 5, 2025
@rbygrave rbygrave merged commit 7292498 into ebean-orm:master Nov 5, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants