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 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. |
[ https://issues.apache.org/jira/browse/OFBIZ-2107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hans Bakker updated OFBIZ-2107: ------------------------------- Attachment: getWebSiteId.patch The attached patch just does what is proposed in this issue... Additional thing we can think about is to add fields to the website which are available in the 'ofbiz' fields in web.xml like the localDispatcherName, entityDelegatorName and mainDecoratorLocation. with this patch, the webSiteId will be taken from the WebSite entity when they are not defined in web.xml. Or should be better use 'web.xml' as the default which can be overridden in the Website entity? > 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. |
Hi Hans,
I did not test your patch yet but I think having websites added dinamically is a great function. Looking forward to it. -Bruno 2008/12/29 Hans Bakker (JIRA) <[hidden email]>: > > [ https://issues.apache.org/jira/browse/OFBIZ-2107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] > > Hans Bakker updated OFBIZ-2107: > ------------------------------- > > Attachment: getWebSiteId.patch > > The attached patch just does what is proposed in this issue... > > Additional thing we can think about is to add fields to the website which are available in the 'ofbiz' fields in web.xml like the localDispatcherName, entityDelegatorName and mainDecoratorLocation. > > with this patch, the webSiteId will be taken from the WebSite entity when they are not defined in web.xml. > > Or should be better use 'web.xml' as the default which can be overridden in the Website entity? > >> 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. > > |
In reply to this post by Nicolas Malin (Jira)
[ 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. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12667054#action_12667054 ] Hans Bakker commented on OFBIZ-2107: ------------------------------------ Hi David, it looks like not too may people are interested. However i am... Since this is a function which only gets active if the website is NOT defined in web.xml i do not see a reason why you will have objections committing this change. That a domainname and a port is not unique? please explain? Anyhow, they are in my case. I also would like to duplicate some fields from the web.xml on the website entity, again these only get active when NOT defined in web.xml: 1. mainDecoratorLocation 2. entityDelegatorName 3. localDispatcherName I have to run a number of websites and it is a real pain setting up separate webapplications for them. Lastly, because the domainname gets now more important, i would impement a warning that if a duplicate domainname is added on different website records. If the community does not have any major objections, i will commit this change in the next few days. > 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. |
On Jan 25, 2009, at 1:05 AM, Hans Bakker (JIRA) wrote: > That a domainname and a port is not unique? please explain? Anyhow, > they are in my case. They are not unique for a webapp since you can have multiple webapps mounted on different paths for the same domain name and port. -David |
Free forum by Nabble | Edit this page |