Why the urlHandler protocol "profile:" returns wrong data ?
Issue
- If more than one profiles are assigned to the container and if those profiles contains some resources (like properties files), then the bundles deployed to those containers see incorrect data while using
"profile:"urlHandler. -
Create two profiles with default profile as parent (I'll call them profile-one and profile-two). Create a
"data.properties"file in each. Putone = oneto in firstdata.propertiesfile andtwo = twoin the second one. -
Now create a pair of bundles (
bundle-one, andbundle-two) that log the contents of URL"profile:data.properties"and add them to their respective profiles (bundle-one -> profile-one, bundle-two -> profile-two). Assign the profiles to a container.
Expected result should be:
bundle-one logs key: one, value = one (=contents of data.properties in profile-one)
bundle-two logs key: two, value = two (=contents of data.properties in profile-two)
- Actual result noticed as both bundles log every entry of every data.properties file in every assigned profile. Which indicates a problem in overlay profile handling.
- This causes our per-service user credentials (kept in
users.propertiesin various profiles) to spill over profile boundaries. - The only Workaround is to name every resource file uniquely. Is that work as designed or a bug ?
Environment
- Red Hat JBoss Fuse
- 6.1.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
