Skip to content

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

Open
groldan wants to merge 1 commit intoGeoWebCache:mainfrom
groldan:fix/jdbcquotastore_closes_jndi_datasources
Open

Do not close JNDI-resolved DataSource in JDBCQuotaStore.close()#1523
groldan wants to merge 1 commit intoGeoWebCache: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>
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.

1 participant