Skip to content

Do not close JNDI-resolved DataSource in JDBCQuotaStore.close()#1523

Merged
aaime merged 1 commit into
GeoWebCache:mainfrom
groldan:fix/jdbcquotastore_closes_jndi_datasources
May 11, 2026
Merged

Do not close JNDI-resolved DataSource in JDBCQuotaStore.close()#1523
aaime merged 1 commit into
GeoWebCache:mainfrom
groldan:fix/jdbcquotastore_closes_jndi_datasources

Conversation

@groldan
Copy link
Copy Markdown
Member

@groldan groldan commented May 5, 2026

JNDI lookups return a DataSource owned by the JNDI provider; consumers must not close it, since the same name can be (and typically is) shared with other parts of the application.

Add an ownsDataSource flag (default true to keep the previous behavior for direct setDataSource callers) that JDBCQuotaStoreFactory clears whenever the configuration uses a JNDISource.

JNDI lookups return a DataSource owned by the JNDI provider; consumers must
not close it, since the same name can be (and typically is) shared with other
parts of the application.

Add an ownsDataSource flag (default true to keep the previous behavior for
direct setDataSource callers) that JDBCQuotaStoreFactory clears whenever the
configuration uses a JNDISource.

on-behalf-of: @camptocamp <info@camptocamp.com>
Copy link
Copy Markdown
Member

@aaime aaime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aaime aaime merged commit 06ad555 into GeoWebCache:main May 11, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants