-
Notifications
You must be signed in to change notification settings - Fork 347
Support user-specified paths for conf-file in the eclipse-link metastore manager #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Same updated on #45. Here is the setup I have: Content of persistence-local.xml (same as default one but on diff path and diff file name): With the provided code, it will be able to find the file and create the properties obj with the provided settings, however, it will later on failed on Here is the trace: I am not a Java expert and I am assuming this has something to do with the used java framework? Here is the basic debugging I did couple days back after verified the provided file path is getting loaded but failing on the next part: Dummy debugging code to print out content of Trigger bootstrap to read the config and try to configure the backend: Here is the full trace as above but with the extra dump of content of |
|
I see, thanks @MonkeyCanCode -- let me close this for now and try to reproduce |
|
@eric-maynard and @MonkeyCanCode Let me take a look if some changes got lost or it's the limitation of Persistence.createEntityManagerFactory(). |
|
Seems that's the limitation from Persistence.createEntityManagerFactory() which uses |
|
@sfcs-gh-aixu I was able to fix the issue by removing |
|
@guitcastro Actually it's not because of the properties. Of course we need the properties because we want to replace realm in the database name - each realm will have its own database. Persistence.createEntityManagerFactory() will still load configuration file from resource even without properties. Let's follow up on #95. |
* Fix regression test docker setup for purge (apache#1768) * Use canonical catalog property names in tests (apache#1766) * In `PolarisPolicyServiceIntegrationTest` * In `PolarisRestCatalogIntegrationTest` Following up to apache#1557 * Unblock test `createViewWithCustomMetadataLocation` (apache#1320) * Add test for invalid custom metadata location * Add missing properties during table/view creation * main: Update docker.io/prom/prometheus Docker tag to v3.4.1 (apache#1767) * Testing: silence a bunch of harmless test warnings (apache#1773) * `OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended` * Hibernate Validator cannot instrument static methods (`Hibernate Validator does not support constraints on static methods yet. ...`) * ForkJoinPool test lifecycle warning * Couple of split-package warnings * Add unit test for legacy config lookup (apache#1774) Following up on apache#1766 * Handle RequestScoped instance injection gracefully for DefaultConfigurationStore (apache#1758) Although we do a check of !realmContextInstance.isUnsatisfied() it only checks if there is matching bean, however, it doesn't check if the context is active or not. Similarly isResolvable also don't check if the scope is active. Therefore if getConfiguration is called when there is no active scope, it will get Exception like ContextNotActiveException. This actually fails the TaskExecutor because it runs in a separate thread. In order to fix the problem, we introduces a new getConfiguration function to handle the background tasks, and also use isResolvable instead of isUnsatisfied to handle ambiguities. * Restructure the directory and package name for persistence modules (apache#1724) * Re-add missing parameters to create_table python API (apache#1778) It looks like this method lost the `prefix` and `namespace` parameters in apache#1347. They're re-introduced to the spec here, and then I've run: ``` redocly bundle spec/polaris-catalog-service.yaml -o spec/generated/bundled-polaris-catalog-service.yaml ./gradlew regeneratePythonClient ``` Then, some manual reverts: ``` alias gitrevert='git checkout upstream/main --' gitrevert client/python/.github/workflows/python.yml gitrevert client/python/.gitlab-ci.yml gitrevert client/python/pyproject.toml ``` I still hope to automate this process as part of CI soon; see apache#1675 * Replace getConfiguration usage with PolarisCallContext to use RealmContext (PART 1) (apache#1780) * JDBC: Fix getting started config (apache#1781) Fix typo in the JDBC config for getting started, the config should be max_duration_in_ms instead of max_delay_in_ms * main: Pin dependencies (apache#1701) * main: Update dependency pytest to v8 (apache#1710) * main: Update dependency boto3 to v1.38.28 (apache#1777) * Run renovatebot only on the main branch (apache#1786) * INFO: last merged commit a827d26 --------- Co-authored-by: gh-yzou <[email protected]> Co-authored-by: Dmitri Bourlatchkov <[email protected]> Co-authored-by: Liam Bao <[email protected]> Co-authored-by: Mend Renovate <[email protected]> Co-authored-by: Yufei Gu <[email protected]> Co-authored-by: Eric Maynard <[email protected]> Co-authored-by: Prashant Singh <[email protected]> Co-authored-by: JB Onofré <[email protected]>
Description
Previously only resources bundled in the JAR could be used as the EclipseLink configuration file. This change adds support for arbitrary locations specified as the
conf-filewithout breaking support for files included in the JAR.It will first check for a file included in the JAR matching the path, and it will fall back to trying to load the file directly if that fails.
Fixes #45
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Confirmed I'm able to load a persistence.xml file at a new location with the change, where previously it gave:
Checklist:
Please delete options that are not relevant.