]
RH Bugzilla Integration commented on GTNPORTAL-3506:
----------------------------------------------------
Tomas Kyjovsky <tkyjovsk(a)redhat.com> changed the Status of [bug
Allow multiple apps registering the very same AMD paths
-------------------------------------------------------
Key: GTNPORTAL-3506
URL:
https://issues.jboss.org/browse/GTNPORTAL-3506
Project: GateIn Portal
Issue Type: Task
Security Level: Public(Everyone can see)
Reporter: Peter Palaga
Assignee: Peter Palaga
Fix For: 3.8.3.Final, 3.9.0.Final
h4. Current state
GTNPORTAL-3502 introduced a common deployer for JavaScript and skin services with the
following characteristics: when an app attempts to add an AMD path mapping that is
available in the portal already,
all JS and CSS resources from that app are rejected. The path mapping comparison is done
on path prefixes only, the target paths are not inspected at all.
Example:
* Application {{app.war}} wants to register the AMD module ID prefix
{{/dojo}} to be mapped to target path {{http://fastcdn.com/dojo/1.7.0}}
* But the prefix {{/dojo}} was registered already for
{{http://othercdn.com/dojo/1.9.1}} by some other application.
* All JS and CSS resources from {{app.war}} are rejected by skin and JSConfig services.
h4. Proposed change
The above approach is unnecessarily restrictive, because it rejects also applications
that want to register the very same target path for a given prefix as is registered in the
portal already.
Example:
* Application {{app2.war}} wants to register the AMD module ID prefix
{{/dojo}} to be mapped to target path {{http://fastcdn.com/dojo/1.7.0}}
* The prefix {{/dojo}} was previously registered by some other application {{app1.war}}
to point to the very same target path {{http://fastcdn.com/dojo/1.7.0}}.
* JS and CSS resources from {{app2.war}} should be accepted by the portal because no
inconsistency is introduced by {{app2.war}}.
* However, having accepted two or more apps relying on one path mapping, the portal must
reject all changes that could break any of the affected applications. E.g. the portal may
not remove the mapping on {{app1.war}} undeploy or it may not allow for re-deploying
{{app1.war}} with a modified path mapping while {{app2.war}} is still active.