-
Notifications
You must be signed in to change notification settings - Fork 9
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
Embedded Tomcat support for custom webapp resources #701
Conversation
This looks great. I think it would let us rip out the |
This also gives me an idea of how we can make the DataSource and extra webapp config a little cleaner... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my one recommendation. After we merge the Tomcat 10 branch I'll rip out my more hard-coded handling for JMS and LDAP config.
resourceMap.putAll(entry.getValue()); | ||
if (!resourceMap.containsKey("name")) | ||
{ | ||
logger.error("Resource configuration error: Ignoring unnamed resource 'context.resources.%s'".formatted(entry.getKey())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some other config errors are fatal on startup, throwing an exception. I think that's probably the right direction to lean unless there's a good reason to be tolerant of an invalid config.
# Conflicts: # server/embedded/src/org/labkey/embedded/LabKeyServer.java
Rationale
A more generic solution for adding Resources to the webapp.
labkey.xml
could have arbitrary<Resource>
elements. This adds similar capability toapplication.properties
.This JMS resource from
labkey.xml
:Can be represented like this in
application.properties
:The
jms
in the property names is required to link related resource properties together but its exact text is unimportant.Related Pull Requests
Changes