-
Notifications
You must be signed in to change notification settings - Fork 332
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. |
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.