[JBoss JIRA] (JBWEB-279) Overlays do not work as expected
by Tom Fonteyne (JIRA)
[ https://issues.jboss.org/browse/JBWEB-279?page=com.atlassian.jira.plugin.... ]
Tom Fonteyne commented on JBWEB-279:
------------------------------------
Remu, from your own words:
> AS added at some point another feature called "overlay", which is not the same thing (here, it is a proprietary feature unrelated to any EE spefication
and this functionality in jbossweb is *broken*
> Overlays do not work as expected
> --------------------------------
>
> Key: JBWEB-279
> URL: https://issues.jboss.org/browse/JBWEB-279
> Project: JBoss Web
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Core
> Affects Versions: JBossWeb-7.2.1.GA
> Reporter: Mustafa Musaji
> Assignee: Remy Maucherat
> Attachments: fix.proposal.txt
>
>
> It is expected that the <overlay> element in jboss-web.xml has the same outcome as the overlay feature in the CLI: https://docs.jboss.org/author/display/AS72/Deployment+Overlays
> In jboss-web.xml the overlays element is not used to actually overlay existing files but to add files to a deployment. This is confusing and either this should work the same as the CLI or the documentation around the <overlay> element in jboss-web.xml should clearly state this is not the case and that we do not replace artifacts but rather
> Attached is a proposed patch that fixes this issue.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (JBWEB-279) Overlays do not work as expected
by Remy Maucherat (JIRA)
[ https://issues.jboss.org/browse/JBWEB-279?page=com.atlassian.jira.plugin.... ]
Remy Maucherat commented on JBWEB-279:
--------------------------------------
I thought my sentence was clear enough: "This code is the implementation for the specification /META-INF/resources mechanism. As a result, it must follow the specification's behavior. I'm sorry, but there is little way around that."
This is not the implementation for a JBoss specific feature, this is the specifcation standard feature. The xml configuration allows specifying a JAR as if it was included directly in the WAR itself. AS added at some point another feature called "overlay", which is not the same thing (here, it is a proprietary feature unrelated to any EE spefication).
So, well, have fun with the JIRA, but this is a "bug" that will not be fixed.
> Overlays do not work as expected
> --------------------------------
>
> Key: JBWEB-279
> URL: https://issues.jboss.org/browse/JBWEB-279
> Project: JBoss Web
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Core
> Affects Versions: JBossWeb-7.2.1.GA
> Reporter: Mustafa Musaji
> Assignee: Remy Maucherat
> Attachments: fix.proposal.txt
>
>
> It is expected that the <overlay> element in jboss-web.xml has the same outcome as the overlay feature in the CLI: https://docs.jboss.org/author/display/AS72/Deployment+Overlays
> In jboss-web.xml the overlays element is not used to actually overlay existing files but to add files to a deployment. This is confusing and either this should work the same as the CLI or the documentation around the <overlay> element in jboss-web.xml should clearly state this is not the case and that we do not replace artifacts but rather
> Attached is a proposed patch that fixes this issue.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (JBWEB-279) Overlays do not work as expected
by Mustafa Musaji (JIRA)
[ https://issues.jboss.org/browse/JBWEB-279?page=com.atlassian.jira.plugin.... ]
Mustafa Musaji reopened JBWEB-279:
----------------------------------
> Overlays do not work as expected
> --------------------------------
>
> Key: JBWEB-279
> URL: https://issues.jboss.org/browse/JBWEB-279
> Project: JBoss Web
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Core
> Affects Versions: JBossWeb-7.2.1.GA
> Reporter: Mustafa Musaji
> Assignee: Remy Maucherat
> Attachments: fix.proposal.txt
>
>
> It is expected that the <overlay> element in jboss-web.xml has the same outcome as the overlay feature in the CLI: https://docs.jboss.org/author/display/AS72/Deployment+Overlays
> In jboss-web.xml the overlays element is not used to actually overlay existing files but to add files to a deployment. This is confusing and either this should work the same as the CLI or the documentation around the <overlay> element in jboss-web.xml should clearly state this is not the case and that we do not replace artifacts but rather
> Attached is a proposed patch that fixes this issue.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (JBWEB-279) Overlays do not work as expected
by Mustafa Musaji (JIRA)
[ https://issues.jboss.org/browse/JBWEB-279?page=com.atlassian.jira.plugin.... ]
Mustafa Musaji commented on JBWEB-279:
--------------------------------------
[~rmaucher] I don't think overlays has anything to do with the spec. This is when you are a deploy to JBoss and yes we should follow the spec to look for resources as stated in your first comment. In addition to the spec, we allow overlays to be included and this is as [~tfonteyn] points out, is a JBoss specific feature. With the overlays we blatently do one thing via CLI and another thing with jboss-web.xml.
> Overlays do not work as expected
> --------------------------------
>
> Key: JBWEB-279
> URL: https://issues.jboss.org/browse/JBWEB-279
> Project: JBoss Web
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Core
> Affects Versions: JBossWeb-7.2.1.GA
> Reporter: Mustafa Musaji
> Assignee: Remy Maucherat
> Attachments: fix.proposal.txt
>
>
> It is expected that the <overlay> element in jboss-web.xml has the same outcome as the overlay feature in the CLI: https://docs.jboss.org/author/display/AS72/Deployment+Overlays
> In jboss-web.xml the overlays element is not used to actually overlay existing files but to add files to a deployment. This is confusing and either this should work the same as the CLI or the documentation around the <overlay> element in jboss-web.xml should clearly state this is not the case and that we do not replace artifacts but rather
> Attached is a proposed patch that fixes this issue.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (JBWEB-279) Overlays do not work as expected
by Remy Maucherat (JIRA)
[ https://issues.jboss.org/browse/JBWEB-279?page=com.atlassian.jira.plugin.... ]
Remy Maucherat resolved JBWEB-279.
----------------------------------
Resolution: Rejected
This code is the implementation for the specification /META-INF/resources mechanism. As a result, it must follow the specification's behavior. I'm sorry, but there is little way around that.
> Overlays do not work as expected
> --------------------------------
>
> Key: JBWEB-279
> URL: https://issues.jboss.org/browse/JBWEB-279
> Project: JBoss Web
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Core
> Affects Versions: JBossWeb-7.2.1.GA
> Reporter: Mustafa Musaji
> Assignee: Remy Maucherat
> Attachments: fix.proposal.txt
>
>
> It is expected that the <overlay> element in jboss-web.xml has the same outcome as the overlay feature in the CLI: https://docs.jboss.org/author/display/AS72/Deployment+Overlays
> In jboss-web.xml the overlays element is not used to actually overlay existing files but to add files to a deployment. This is confusing and either this should work the same as the CLI or the documentation around the <overlay> element in jboss-web.xml should clearly state this is not the case and that we do not replace artifacts but rather
> Attached is a proposed patch that fixes this issue.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (JBWEB-279) Overlays do not work as expected
by Tom Fonteyne (JIRA)
[ https://issues.jboss.org/browse/JBWEB-279?page=com.atlassian.jira.plugin.... ]
Tom Fonteyne updated JBWEB-279:
-------------------------------
Attachment: (was: overlay.patch)
> Overlays do not work as expected
> --------------------------------
>
> Key: JBWEB-279
> URL: https://issues.jboss.org/browse/JBWEB-279
> Project: JBoss Web
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Core
> Affects Versions: JBossWeb-7.2.1.GA
> Reporter: Mustafa Musaji
> Assignee: Remy Maucherat
> Attachments: fix.proposal.txt
>
>
> It is expected that the <overlay> element in jboss-web.xml has the same outcome as the overlay feature in the CLI: https://docs.jboss.org/author/display/AS72/Deployment+Overlays
> In jboss-web.xml the overlays element is not used to actually overlay existing files but to add files to a deployment. This is confusing and either this should work the same as the CLI or the documentation around the <overlay> element in jboss-web.xml should clearly state this is not the case and that we do not replace artifacts but rather
> Attached is a proposed patch that fixes this issue.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (JBWEB-279) Overlays do not work as expected
by Tom Fonteyne (JIRA)
[ https://issues.jboss.org/browse/JBWEB-279?page=com.atlassian.jira.plugin.... ]
Tom Fonteyne edited comment on JBWEB-279 at 9/2/13 8:35 AM:
------------------------------------------------------------
Fix proposal:
Here is how the code *should* look like in my opinion:
src/main/java/org/apache/naming/resources/ProxyDirContext.java
copy/paste of code gets garbled up, will add attachement
was (Author: tfonteyn):
Fix proposal:
Here is how the code *should* look like in my opinion:
src/main/java/org/apache/naming/resources/ProxyDirContext.java
1701 // Retrieve missing info
1702 boolean foundOriginal = false;
1704 // Retrieving attributes
1705 if (entry.attributes == null) {
1706 try {
1707 Attributes attributes = currentContext.getAttributes(entry.name);
1708 if (!(attributes instanceof ResourceAttributes)) {
1709 entry.attributes =
1710 new ResourceAttributes(attributes);
1711 } else {
1712 entry.attributes = (ResourceAttributes) attributes;
1713 }
foundOriginal = true
1714 } catch (NamingException e) {
1715 // Ignore
1716 }
1717 }
1718
boolean foundOverlay = false;
1719 // Check overlays
1720 if (overlays != null) {
1721 for (int i = 0; (i < overlays.length) && !foundOverlay; i++) {
1722 try {
1723 Attributes attributes = overlays[i].getAttributes(entry.name);
1724 if (!(attributes instanceof ResourceAttributes)) {
1725 entry.attributes =
1726 new ResourceAttributes(attributes);
1727 } else {
1728 entry.attributes = (ResourceAttributes) attributes;
1729 }
1730 currentContext = overlays[i];
1731 foundOverlay = true;
1732 } catch (NamingException e) {
1733 // Ignore
1734 }
1735 }
1736 }
1737
boolean exists = foundOriginal || foundOverlay;
1738 // Retriving object
1739 if ((exists) && (entry.resource == null) && (entry.context == null)) {
> Overlays do not work as expected
> --------------------------------
>
> Key: JBWEB-279
> URL: https://issues.jboss.org/browse/JBWEB-279
> Project: JBoss Web
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Core
> Affects Versions: JBossWeb-7.2.1.GA
> Reporter: Mustafa Musaji
> Assignee: Remy Maucherat
> Attachments: fix.proposal.txt, overlay.patch
>
>
> It is expected that the <overlay> element in jboss-web.xml has the same outcome as the overlay feature in the CLI: https://docs.jboss.org/author/display/AS72/Deployment+Overlays
> In jboss-web.xml the overlays element is not used to actually overlay existing files but to add files to a deployment. This is confusing and either this should work the same as the CLI or the documentation around the <overlay> element in jboss-web.xml should clearly state this is not the case and that we do not replace artifacts but rather
> Attached is a proposed patch that fixes this issue.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (JBWEB-279) Overlays do not work as expected
by Tom Fonteyne (JIRA)
[ https://issues.jboss.org/browse/JBWEB-279?page=com.atlassian.jira.plugin.... ]
Tom Fonteyne updated JBWEB-279:
-------------------------------
Attachment: fix.proposal.txt
> Overlays do not work as expected
> --------------------------------
>
> Key: JBWEB-279
> URL: https://issues.jboss.org/browse/JBWEB-279
> Project: JBoss Web
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Core
> Affects Versions: JBossWeb-7.2.1.GA
> Reporter: Mustafa Musaji
> Assignee: Remy Maucherat
> Attachments: fix.proposal.txt, overlay.patch
>
>
> It is expected that the <overlay> element in jboss-web.xml has the same outcome as the overlay feature in the CLI: https://docs.jboss.org/author/display/AS72/Deployment+Overlays
> In jboss-web.xml the overlays element is not used to actually overlay existing files but to add files to a deployment. This is confusing and either this should work the same as the CLI or the documentation around the <overlay> element in jboss-web.xml should clearly state this is not the case and that we do not replace artifacts but rather
> Attached is a proposed patch that fixes this issue.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months