Skip to content

[#TODO] connection and pool improvements#1657

Open
jeanouii wants to merge 4 commits intoapache:mainfrom
jeanouii:fix/connection-and-pool-improvements
Open

[#TODO] connection and pool improvements#1657
jeanouii wants to merge 4 commits intoapache:mainfrom
jeanouii:fix/connection-and-pool-improvements

Conversation

@jeanouii
Copy link
Contributor

@jeanouii jeanouii commented Feb 6, 2026

No description provided.

…ence

 activemq-pool tests use default broker name causing BrokerRegistry collisions
 Missing waitUntilStopped() after broker.stop() in tests
…ent and prevent task execution on closed connections
@mattrpav
Copy link
Contributor

mattrpav commented Feb 6, 2026

I need to think through impacts of making PooledConnectionFactory AutoCloseable. It usually is more of an init/destroy or start/stop lifecycle since it is long lived for the lifetime of the JVM.

Adding AutoCloseable may lead to a lot of users getting WARN from IDE

@jeanouii
Copy link
Contributor Author

jeanouii commented Feb 6, 2026

When using the resource adapter inside an app server for example (Apache TomEE), the connection pool might be created and destroyed multiple times without restart the entire server (deploy / undeploy). It delegates to stop(). For tests it's convenient to avoid leaking a connection factory from one test to the other or having to cope with try/catch.

It's not the end of the world. I can revert that and rework all the tests. I don't think it harms though.

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