[weld-issues] [JBoss JIRA] (WELD-2062) Weld does not support dynamic jsp class update
Title: Message Title Emily Jiang created an issue Weld / WELD-2062 Weld does not support dynamic jsp class update Issue Type: Bug Affects Versions: 2.3.1.Final Assignee: Unassigned Components: Class Beans (Managed and Session) Created: 10/Nov/15 5:51 PM Environment: I have a jsp class in an application. On updating the jsp class, the updated info was ignored. After further investigation, the issue is caused by the equals method on the AnnotatedTypeIdentifier. The annoatedType return for the changed class is the cached one as the AnnotatedTypeIdentifier.equals only checks for the class name instead of class object. {{@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof AnnotatedTypeIdentifier) { AnnotatedTypeIdentifier they = (AnnotatedTypeIdentifier) obj; return equal(bdaId, they.bdaId) && equal(className, they.className) && equal(suffix, they.suffix) && equal(modified, they.modified) && equal(contextId, they.contextId); } return false; }}} The fix is to use the class instead of the className. Priority: Major Reporter: Emily Jiang
[weld-issues] [JBoss JIRA] (WELD-2062) Weld does not support dynamic jsp class update
Title: Message Title Martin Kouba updated an issue Weld / WELD-2062 Weld does not support dynamic jsp class update Change By: Martin Kouba I have a jsp class in an application. On updating the jsp class, the updated info was ignored. After further investigation, the issue is caused by the equals method on the AnnotatedTypeIdentifier.The annoatedType return for the changed class is the cached oneas the AnnotatedTypeIdentifier.equals only checks for the class nameinstead of class object.{{@Overridepublic boolean equals(Object obj) {if (this == obj) {return true;}if (obj instanceof AnnotatedTypeIdentifier) {AnnotatedTypeIdentifier they = (AnnotatedTypeIdentifier) obj;return equal(bdaId, they.bdaId) && equal(className, they.className)&& equal(suffix, they.suffix) && equal(modified, they.modified) && equal(contextId, they.contextId);}return false;}}}The fix is to use the class instead of the className. Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2062) Weld does not support dynamic jsp class update
Title: Message Title Martin Kouba updated an issue Weld / WELD-2062 Weld does not support dynamic jsp class update Change By: Martin Kouba Component/s: Class Beans (Managed and Session) Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2062) Weld does not support dynamic jsp class update
Title: Message Title Martin Kouba updated an issue Weld / WELD-2062 Weld does not support dynamic jsp class update Change By: Martin Kouba Environment: I have a jsp class in an application. On updating the jsp class, the updated info was ignored. After further investigation, the issue is caused by the equals method on the AnnotatedTypeIdentifier.The annoatedType return for the changed class is the cached oneas the AnnotatedTypeIdentifier.equals only checks for the class nameinstead of class object.{{@Overridepublic boolean equals(Object obj) {if (this == obj) {return true;}if (obj instanceof AnnotatedTypeIdentifier) {AnnotatedTypeIdentifier they = (AnnotatedTypeIdentifier) obj;return equal(bdaId, they.bdaId) && equal(className, they.className)&& equal(suffix, they.suffix) && equal(modified, they.modified) && equal(contextId, they.contextId);}return false;}}}The fix is to use the class instead of the className. Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2062) Weld does not support dynamic jsp class update
Title: Message Title Martin Kouba updated an issue Weld / WELD-2062 Weld does not support dynamic jsp class update Change By: Martin Kouba Issue Type: Bug Feature Request Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2062) Weld does not support dynamic jsp class update
Title: Message Title Martin Kouba commented on WELD-2062 Re: Weld does not support dynamic jsp class update I think we cannot simply use the class instead of the class name. The major issue is that in Weld all AnnotatedTypes are cached in a map (and no cleanup is performed at runtime). And so the map would grow indefinitely (this can be solved by setting some limit) and the outdated cache items would also prevent the original class and it's ClassLoader to be garbage collected. However, we could probably overwrite the "old" AnnotatedType if the new java class does not equal the old one. I'm going to test a prototype tomorrow. Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2062) Weld does not support dynamic jsp class update
Title: Message Title Martin Kouba commented on WELD-2062 Re: Weld does not support dynamic jsp class update Unfortunately, the prototype did not work correctly. It's a complicated topic and we should be really careful so that we don't break anything. I think we could use the same workaround as in WFLY-2690 and add a special method to the Weld API, something like org.jboss.weld.manager.api.WeldManager.createComponentAnnotatedType() - this method would use a combination of a bean archive identifier and class' classloader hashCode as the BDA ID. Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2062) Weld does not support dynamic jsp class update
Title: Message Title Issue was automatically transitioned when Martin Kouba created pull request #45 in GitHub Weld / WELD-2062 Weld does not support dynamic jsp class update Change By: Martin Kouba Status: Open Pull Request Sent Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2062) Weld does not support dynamic jsp class update
Title: Message Title Martin Kouba assigned an issue to Martin Kouba Weld / WELD-2062 Weld does not support dynamic jsp class update Change By: Martin Kouba Assignee: Martin Kouba Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2062) Weld does not support dynamic jsp class update
Title: Message Title Martin Kouba commented on WELD-2062 Re: Weld does not support dynamic jsp class update Emily Jiang Benjamin Confino We've prepared PRs for Weld API: https://github.com/weld/api/pull/45 and implementation: https://github.com/weld/core/pull/1467. It would be great if you could look at it and tell us whether it makes sense for your particular use case. Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2062) Weld does not support dynamic jsp class update
Title: Message Title Martin Kouba updated an issue Weld / WELD-2062 Weld does not support dynamic jsp class update Change By: Martin Kouba Fix Version/s: 2.4.0.Final Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2062) Weld does not support dynamic jsp class update
Title: Message Title Martin Kouba commented on WELD-2062 Re: Weld does not support dynamic jsp class update Emily Jiang So after we've discussed this on F2F is the PR for API acceptable? Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2062) Weld does not support dynamic jsp class update
Title: Message Title Martin Kouba updated WELD-2062 Weld / WELD-2062 Weld does not support dynamic jsp class update Change By: Martin Kouba Status: Pull Request Sent Git Pull Request: https://github.com/weld/core/pull/1467 Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2062) Weld does not support dynamic jsp class update
Title: Message Title Martin Kouba updated WELD-2062 Weld / WELD-2062 Weld does not support dynamic jsp class update Change By: Martin Kouba Status: Pull Request Sent Resolved Resolution: Done Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2062) Weld does not support dynamic jsp class update
Title: Message Title Martin Kouba updated an issue Weld / WELD-2062 Weld does not support dynamic jsp class update Change By: Martin Kouba Fix Version/s: 3.0.0.Beta1 Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2062) Weld does not support dynamic jsp class update
Title: Message Title Martin Kouba updated an issue Weld / WELD-2062 Weld does not support dynamic jsp class update Change By: Martin Kouba Fix Version/s: 3.0.0.Beta1 Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues