[ 
https://issues.apache.org/jira/browse/SLING-249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649425#action_12649425
 ] 

Bertrand Delacretaz commented on SLING-249:
-------------------------------------------

> I'm not sure about caching domainRoots. At least in our case, we need to add 
> domains run-time. 
> So at least we need a simple way to re-scan the domain info. 

I think that would work with observation, the DomainRootMapperService would:

1. Run your suggested query when it starts, to find out about all existing 
sling:domains nodes
2. Build its mapping table from that info
3. Observe the repository for any changes to sling:domains nodes
4. When such changes occur, update the mapping table

In this way changes are (almost) immediately taken into account, but you only 
run the query at startup, running it on every request might be expensive. And 
sling:domains nodes can be anywhere in the repository.

> Allow mapping nodes to internet domains
> ---------------------------------------
>
>                 Key: SLING-249
>                 URL: https://issues.apache.org/jira/browse/SLING-249
>             Project: Sling
>          Issue Type: New Feature
>          Components: Engine
>    Affects Versions: JCR Resource 2.0.2
>            Reporter: Vidar S. Ramdal
>            Assignee: Felix Meschberger
>             Fix For: JCR Resource 2.0.4
>
>
> Sling should support hosting multiple domains, with different JCR roots.
> E.g.:
> http://www.domain1.com could map to /content/domain1.com
> http://www.domain2.com could map to /content/domain2.com
> While developing a website, the fully qualified domain might not be 
> available. Ideally, the mapping could be configured in a flexible way. One 
> option would be to maintain a set of regular expressions to match against 
> URLs. Each regexp would then match to a path in the JCR.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to