You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "David E. Jones (JIRA)" <ji...@apache.org> on 2008/12/31 06:08:44 UTC

[jira] Commented: (OFBIZ-2107) run many websites from one webapplication/dynamically add websites to ofbiz

    [ https://issues.apache.org/jira/browse/OFBIZ-2107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12660020#action_12660020 ] 

David E. Jones commented on OFBIZ-2107:
---------------------------------------

The problem is that if the webSiteId isn't in the web.xml file, how do we know which WebSite record to use for that webapp?

In your patch I see that you try to figure it out using the port and server name, but those may not be unique and in fact there is a many-to-many relationship between those and the webapp. In other words, there could be many possible ports and server names that reach the same webapp, and in the other direction many webapps on the same port and server name (because it is not guaranteed to be the full URL).

It is more reliable to get server settings from the WebSite record identified by the webSiteId in the web.xml file (which is how it is done now) than it is to get the WebSite record from certain settings on a particular request.

So my vote would be a -1 on this. I am still interested in hearing what others think though... should anyone be brave enough to comment. ;)

> run many websites from one webapplication/dynamically add websites to ofbiz
> ---------------------------------------------------------------------------
>
>                 Key: OFBIZ-2107
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2107
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: any
>            Reporter: Hans Bakker
>            Assignee: Hans Bakker
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: getWebSiteId.patch
>
>
> I was always wondering why the 'webSiteId' is hardcoded in the web.xml.
> If a request comes in, the domainname and port is normally known and depending on this information the websiteId can be found in the website entity. 
> If this would be implemented a new website can be dynamically configured and many websites can be run from the same webapplication within a component and no configuration and/or restart is required to make the website active with ofbiz.
> Am i overlooking something or is there a reason that the websiteId is harcoded in web.xml?

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