Running OFBiz in Tomcat, without embedded container

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Running OFBiz in Tomcat, without embedded container

jonwimp
Anybody knows how to run OFBiz in Tomcat, without embedded container?

I want to run multiple instances of OFBiz using the same ports via virtual hosts.

Jonathon
Reply | Threaded
Open this post in threaded view
|

Re: Running OFBiz in Tomcat, without embedded container

Andrew Sykes
Jonathon,

This doesn't answer your question, but are you aware that OfBiz has
virtual host support?

On Tue, 2007-01-09 at 10:24 +0800, Jonathon -- Improov wrote:
> Anybody knows how to run OFBiz in Tomcat, without embedded container?
>
> I want to run multiple instances of OFBiz using the same ports via virtual hosts.
>
> Jonathon
--
Kind Regards
Andrew Sykes <[hidden email]>
Sykes Development Ltd
http://www.sykesdevelopment.com

Reply | Threaded
Open this post in threaded view
|

Re: Running OFBiz in Tomcat, without embedded container

jonwimp
Yes, I know there's virtual host support. But can I use it to deploy 2 different versions of OFBiz?

I suppose I could:

1. Make 2 copies of say module Manufacturing.
2. Edit applications/component-load.xml to load both copies (2 components
    altogether).
3. Edit the ofbiz-component.xml in the modules themselves to give different
    names for the 2 components.
4. Edit the ofbiz-component.xml to add <virtual-host> entities.

Then I'd get 2 different versions of manufacturing module. I suppose I could do that for all the
modules until I effectively make a full copy of the entire OFBiz, both running on the same ports
(on a single engine, so to speak).

Hmm. Or I could edit framework/base/config/component-load.xml to add a new set of
<load-components> entities to load from say "${ofbiz.home}/ofbiz_copy/" components from framework
to hot-deploy. I can then create a folder ofbiz_copy, copy folder framework to hot-deploy into it,
and run a completely separate copy of OFBiz on the same engine.

Will it work? Sounds like it will. I'll give it a shot and let you know. Thanks!

Jonathon

Andrew Sykes wrote:

> Jonathon,
>
> This doesn't answer your question, but are you aware that OfBiz has
> virtual host support?
>
> On Tue, 2007-01-09 at 10:24 +0800, Jonathon -- Improov wrote:
>> Anybody knows how to run OFBiz in Tomcat, without embedded container?
>>
>> I want to run multiple instances of OFBiz using the same ports via virtual hosts.
>>
>> Jonathon

Reply | Threaded
Open this post in threaded view
|

Re: Running OFBiz in Tomcat, without embedded container

Torsten Schlabach-2
In reply to this post by Andrew Sykes
 > This doesn't answer your question, but are you aware that OfBiz has
 > virtual host support?

Tell us more about this, please?

Regards,
Torsten

Andrew Sykes schrieb:

> Jonathon,
>
> This doesn't answer your question, but are you aware that OfBiz has
> virtual host support?
>
> On Tue, 2007-01-09 at 10:24 +0800, Jonathon -- Improov wrote:
>
>>Anybody knows how to run OFBiz in Tomcat, without embedded container?
>>
>>I want to run multiple instances of OFBiz using the same ports via virtual hosts.
>>
>>Jonathon
Reply | Threaded
Open this post in threaded view
|

Re: Running OFBiz in Tomcat, without embedded container

jonwimp
Hi Torsten,

If you want to help steer OFBiz to support virtual hosts (with respect to delegators), you may
want to join discussion at http://lists.ofbiz.org/pipermail/jira/2006-May/003933.html . (JIRA for
OFBiz seems down now, though).

Andrew is right. You can set up a single instance of OFBiz to point to multiple databases using
virtual hosts. But my requirement is different: I need different versions of OFBiz running on a
single webserver (Tomcat or otherwise).

You might also need what I'm looking for now. David is right about something. The
one-size-fits-all ERP system of the past is no longer valid. If you're to serve multiple customers
on a single webserver (to maximize usage of resources), you should be prepared to make minor
customizations so that you can capture a wider audience. Have you done any research as to what
size/color of OFBiz serves the widest audience?

Jonathon

Torsten Schlabach wrote:

>  > This doesn't answer your question, but are you aware that OfBiz has
>  > virtual host support?
>
> Tell us more about this, please?
>
> Regards,
> Torsten
>
> Andrew Sykes schrieb:
>> Jonathon,
>>
>> This doesn't answer your question, but are you aware that OfBiz has
>> virtual host support?
>>
>> On Tue, 2007-01-09 at 10:24 +0800, Jonathon -- Improov wrote:
>>
>>> Anybody knows how to run OFBiz in Tomcat, without embedded container?
>>>
>>> I want to run multiple instances of OFBiz using the same ports via
>>> virtual hosts.
>>>
>>> Jonathon
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Running OFBiz in Tomcat, without embedded container

Andrew Sykes
In reply to this post by Torsten Schlabach-2
Jonathon,

Sorry to labour the point, but I guess you are aware that you can simply
make copies of all the relevant components and run them in a single
OfBiz?

This is a pretty simple task, all you need is a copy of the config files
for each component you are interested in.

So for example you would create a webtools1 component in hot-deploy with
the relevant config and the mount point changed and you will have a new
copy of webtools.

It certainly saves a lot of resources doing it this way compared to
running two copies of everything.

- Andrew

On Tue, 2007-01-09 at 21:15 +0800, Jonathon -- Improov wrote:

> Hi Torsten,
>
> If you want to help steer OFBiz to support virtual hosts (with respect to delegators), you may
> want to join discussion at http://lists.ofbiz.org/pipermail/jira/2006-May/003933.html . (JIRA for
> OFBiz seems down now, though).
>
> Andrew is right. You can set up a single instance of OFBiz to point to multiple databases using
> virtual hosts. But my requirement is different: I need different versions of OFBiz running on a
> single webserver (Tomcat or otherwise).
>
> You might also need what I'm looking for now. David is right about something. The
> one-size-fits-all ERP system of the past is no longer valid. If you're to serve multiple customers
> on a single webserver (to maximize usage of resources), you should be prepared to make minor
> customizations so that you can capture a wider audience. Have you done any research as to what
> size/color of OFBiz serves the widest audience?
>
> Jonathon
>
> Torsten Schlabach wrote:
> >  > This doesn't answer your question, but are you aware that OfBiz has
> >  > virtual host support?
> >
> > Tell us more about this, please?
> >
> > Regards,
> > Torsten
> >
> > Andrew Sykes schrieb:
> >> Jonathon,
> >>
> >> This doesn't answer your question, but are you aware that OfBiz has
> >> virtual host support?
> >>
> >> On Tue, 2007-01-09 at 10:24 +0800, Jonathon -- Improov wrote:
> >>
> >>> Anybody knows how to run OFBiz in Tomcat, without embedded container?
> >>>
> >>> I want to run multiple instances of OFBiz using the same ports via
> >>> virtual hosts.
> >>>
> >>> Jonathon
> >
> >
>
--
Kind Regards
Andrew Sykes <[hidden email]>
Sykes Development Ltd
http://www.sykesdevelopment.com

Reply | Threaded
Open this post in threaded view
|

Re: Running OFBiz in Tomcat, without embedded container

Andrew Sykes
In reply to this post by Andrew Sykes
Torsten,

You can specify a virtual host in the ofbiz-component.xml file like
so...

        <webapp name="myapp"
                title="myapp"
                server="default-server"
                location="webapp/myapp"
                mount-point="/"
                app-bar-display="false">
                <virtual-host host-name="www.myhost.com"/>
        </webapp>

Last time I tried it work a treat, although it's been a while ;-)

Good luck
- Andrew

On Tue, 2007-01-09 at 14:02 +0100, Torsten Schlabach wrote:

>  > This doesn't answer your question, but are you aware that OfBiz has
>  > virtual host support?
>
> Tell us more about this, please?
>
> Regards,
> Torsten
>
> Andrew Sykes schrieb:
> > Jonathon,
> >
> > This doesn't answer your question, but are you aware that OfBiz has
> > virtual host support?
> >
> > On Tue, 2007-01-09 at 10:24 +0800, Jonathon -- Improov wrote:
> >
> >>Anybody knows how to run OFBiz in Tomcat, without embedded container?
> >>
> >>I want to run multiple instances of OFBiz using the same ports via virtual hosts.
> >>
> >>Jonathon
--
Kind Regards
Andrew Sykes <[hidden email]>
Sykes Development Ltd
http://www.sykesdevelopment.com

Reply | Threaded
Open this post in threaded view
|

Re: Running OFBiz in Tomcat, without embedded container

jonwimp
In reply to this post by Andrew Sykes
Hi Andrew,

Yes, that's what I did, almost. I couldn't manage to copy JUST the config files.

So, say I want to run 2 different versions of OFBiz at the same time. I'd have in my applications
folder 2 copies of every component. For eg, I'd have applications/manufacturing and
applications/manufacturing2, both different from each other. Is this what you mean?

What Torsten wants, if I remember right, is to run a single version of OFBiz, but have multiple
virtual hosts, each accessing a different database.

For Torsten's case, the best I can manage is to duplicate the "webapp" folder and add an extra
<webapp> entity in ofbiz-component.xml for every virtual host. So, Torsten may have in
applications/manufacturing/webapp/ folder 2 folders: manufacturing and manufacturing2 (exact
replicas except for the delegator specified in web.xml). (Torsten, please take what I say with
pinch of salt; I just started researching all these a few hours back since your message reminded
me you were on to "delegator switching" or similar).

The big question I have here is: Can we avoid duplicating the entire "webapp" folder? Note that
the delegator can only be specified in web.xml, far as I know.

Here are the steps, in case Torsten wants them:

1. Edit framework/entity/config/entityengine.xml to add a new delegator
    "default2" that points to a new datasource, say "localmysql2" connecting to
    a new database.

2. Copy applications/manufacturing/webapp/manufacturing to manufacturing2.

3. Edit param "entityDelegatorName" in manufacturing2/WEB-INF/web.xml to point
    to default2.

4. Edit applications/manufacturing/ofbiz-component.xml. Copy the original
    <webapp> entity, but set the copy's "location" attribute to
    "webapp/manufacturing2" and embed a <virtual-host> entity into it. (Do we
    have to name the 2nd <webapp> "manufacturing2"? I don't think so.)

And, I think that about covers it. That runs one instance of Manufacturing module for 2 virtual
hosts with 2 separate databases. The "location" attribute is the key here, really.

So, I hope the above will let you know where I am now so you can help me better. Sorry to have you
laboring the point. Can you confirm that my understanding is "as good as it gets" for the current
OFBiz framework? I had hoped for a cleaner approach, like a central place to configure it all
rather than go into every module (applications/*).

Am I doing things right? Or is there a better way?

Thanks, Andrew.

Jonathon

Andrew Sykes wrote:

> Jonathon,
>
> Sorry to labour the point, but I guess you are aware that you can simply
> make copies of all the relevant components and run them in a single
> OfBiz?
>
> This is a pretty simple task, all you need is a copy of the config files
> for each component you are interested in.
>
> So for example you would create a webtools1 component in hot-deploy with
> the relevant config and the mount point changed and you will have a new
> copy of webtools.
>
> It certainly saves a lot of resources doing it this way compared to
> running two copies of everything.
>
> - Andrew
>
> On Tue, 2007-01-09 at 21:15 +0800, Jonathon -- Improov wrote:
>> Hi Torsten,
>>
>> If you want to help steer OFBiz to support virtual hosts (with respect to delegators), you may
>> want to join discussion at http://lists.ofbiz.org/pipermail/jira/2006-May/003933.html . (JIRA for
>> OFBiz seems down now, though).
>>
>> Andrew is right. You can set up a single instance of OFBiz to point to multiple databases using
>> virtual hosts. But my requirement is different: I need different versions of OFBiz running on a
>> single webserver (Tomcat or otherwise).
>>
>> You might also need what I'm looking for now. David is right about something. The
>> one-size-fits-all ERP system of the past is no longer valid. If you're to serve multiple customers
>> on a single webserver (to maximize usage of resources), you should be prepared to make minor
>> customizations so that you can capture a wider audience. Have you done any research as to what
>> size/color of OFBiz serves the widest audience?
>>
>> Jonathon
>>
>> Torsten Schlabach wrote:
>>>  > This doesn't answer your question, but are you aware that OfBiz has
>>>  > virtual host support?
>>>
>>> Tell us more about this, please?
>>>
>>> Regards,
>>> Torsten
>>>
>>> Andrew Sykes schrieb:
>>>> Jonathon,
>>>>
>>>> This doesn't answer your question, but are you aware that OfBiz has
>>>> virtual host support?
>>>>
>>>> On Tue, 2007-01-09 at 10:24 +0800, Jonathon -- Improov wrote:
>>>>
>>>>> Anybody knows how to run OFBiz in Tomcat, without embedded container?
>>>>>
>>>>> I want to run multiple instances of OFBiz using the same ports via
>>>>> virtual hosts.
>>>>>
>>>>> Jonathon
>>>

Reply | Threaded
Open this post in threaded view
|

Re: Running OFBiz in Tomcat, without embedded container

Andrew Sykes
In reply to this post by Andrew Sykes
Jonathon,

That sounds pretty much like you're going down the right track, you
don't need to copy the whole webapp directory though.

There are only a few files required, I hope I can remember them all...
myapp/ofbiz-component.xml
myapp/build.xml
myapp/webapp/myapp/WEB-INF/web.xml
myapp/webapp/myapp/WEB-INF/controller.xml

Er, I think that's all ;-)

Just copy the controller.xml from the app you are duplicating, you don't
need to change anything, because the component:// urls within the file
will point to the original app from which you are "inheriting" all your
functionality. If you need to make a change to the generic app, just put
it in your new app and adjust the controller.xml entry accordingly.

As you said before, the delegator is setup in web.xml

That's about it.

Let me know how you get on...
Andrew


On Tue, 2007-01-09 at 23:34 +0800, Jonathon -- Improov wrote:

> Hi Andrew,
>
> Yes, that's what I did, almost. I couldn't manage to copy JUST the config files.
>
> So, say I want to run 2 different versions of OFBiz at the same time. I'd have in my applications
> folder 2 copies of every component. For eg, I'd have applications/manufacturing and
> applications/manufacturing2, both different from each other. Is this what you mean?
>
> What Torsten wants, if I remember right, is to run a single version of OFBiz, but have multiple
> virtual hosts, each accessing a different database.
>
> For Torsten's case, the best I can manage is to duplicate the "webapp" folder and add an extra
> <webapp> entity in ofbiz-component.xml for every virtual host. So, Torsten may have in
> applications/manufacturing/webapp/ folder 2 folders: manufacturing and manufacturing2 (exact
> replicas except for the delegator specified in web.xml). (Torsten, please take what I say with
> pinch of salt; I just started researching all these a few hours back since your message reminded
> me you were on to "delegator switching" or similar).
>
> The big question I have here is: Can we avoid duplicating the entire "webapp" folder? Note that
> the delegator can only be specified in web.xml, far as I know.
>
> Here are the steps, in case Torsten wants them:
>
> 1. Edit framework/entity/config/entityengine.xml to add a new delegator
>     "default2" that points to a new datasource, say "localmysql2" connecting to
>     a new database.
>
> 2. Copy applications/manufacturing/webapp/manufacturing to manufacturing2.
>
> 3. Edit param "entityDelegatorName" in manufacturing2/WEB-INF/web.xml to point
>     to default2.
>
> 4. Edit applications/manufacturing/ofbiz-component.xml. Copy the original
>     <webapp> entity, but set the copy's "location" attribute to
>     "webapp/manufacturing2" and embed a <virtual-host> entity into it. (Do we
>     have to name the 2nd <webapp> "manufacturing2"? I don't think so.)
>
> And, I think that about covers it. That runs one instance of Manufacturing module for 2 virtual
> hosts with 2 separate databases. The "location" attribute is the key here, really.
>
> So, I hope the above will let you know where I am now so you can help me better. Sorry to have you
> laboring the point. Can you confirm that my understanding is "as good as it gets" for the current
> OFBiz framework? I had hoped for a cleaner approach, like a central place to configure it all
> rather than go into every module (applications/*).
>
> Am I doing things right? Or is there a better way?
>
> Thanks, Andrew.
>
> Jonathon
>
> Andrew Sykes wrote:
> > Jonathon,
> >
> > Sorry to labour the point, but I guess you are aware that you can simply
> > make copies of all the relevant components and run them in a single
> > OfBiz?
> >
> > This is a pretty simple task, all you need is a copy of the config files
> > for each component you are interested in.
> >
> > So for example you would create a webtools1 component in hot-deploy with
> > the relevant config and the mount point changed and you will have a new
> > copy of webtools.
> >
> > It certainly saves a lot of resources doing it this way compared to
> > running two copies of everything.
> >
> > - Andrew
> >
> > On Tue, 2007-01-09 at 21:15 +0800, Jonathon -- Improov wrote:
> >> Hi Torsten,
> >>
> >> If you want to help steer OFBiz to support virtual hosts (with respect to delegators), you may
> >> want to join discussion at http://lists.ofbiz.org/pipermail/jira/2006-May/003933.html . (JIRA for
> >> OFBiz seems down now, though).
> >>
> >> Andrew is right. You can set up a single instance of OFBiz to point to multiple databases using
> >> virtual hosts. But my requirement is different: I need different versions of OFBiz running on a
> >> single webserver (Tomcat or otherwise).
> >>
> >> You might also need what I'm looking for now. David is right about something. The
> >> one-size-fits-all ERP system of the past is no longer valid. If you're to serve multiple customers
> >> on a single webserver (to maximize usage of resources), you should be prepared to make minor
> >> customizations so that you can capture a wider audience. Have you done any research as to what
> >> size/color of OFBiz serves the widest audience?
> >>
> >> Jonathon
> >>
> >> Torsten Schlabach wrote:
> >>>  > This doesn't answer your question, but are you aware that OfBiz has
> >>>  > virtual host support?
> >>>
> >>> Tell us more about this, please?
> >>>
> >>> Regards,
> >>> Torsten
> >>>
> >>> Andrew Sykes schrieb:
> >>>> Jonathon,
> >>>>
> >>>> This doesn't answer your question, but are you aware that OfBiz has
> >>>> virtual host support?
> >>>>
> >>>> On Tue, 2007-01-09 at 10:24 +0800, Jonathon -- Improov wrote:
> >>>>
> >>>>> Anybody knows how to run OFBiz in Tomcat, without embedded container?
> >>>>>
> >>>>> I want to run multiple instances of OFBiz using the same ports via
> >>>>> virtual hosts.
> >>>>>
> >>>>> Jonathon
> >>>
>
--
Kind Regards
Andrew Sykes <[hidden email]>
Sykes Development Ltd
http://www.sykesdevelopment.com

Reply | Threaded
Open this post in threaded view
|

Re: Running OFBiz in Tomcat, without embedded container

cjhowe
In reply to this post by jonwimp
http://ofbizwiki.go-integral.com/Wiki.jsp?page=FAQ21


--- Jonathon -- Improov <[hidden email]> wrote:

> Hi Andrew,
>
> Yes, that's what I did, almost. I couldn't manage to
> copy JUST the config files.
>
> So, say I want to run 2 different versions of OFBiz
> at the same time. I'd have in my applications
> folder 2 copies of every component. For eg, I'd have
> applications/manufacturing and
> applications/manufacturing2, both different from
> each other. Is this what you mean?
>
> What Torsten wants, if I remember right, is to run a
> single version of OFBiz, but have multiple
> virtual hosts, each accessing a different database.
>
> For Torsten's case, the best I can manage is to
> duplicate the "webapp" folder and add an extra
> <webapp> entity in ofbiz-component.xml for every
> virtual host. So, Torsten may have in
> applications/manufacturing/webapp/ folder 2 folders:
> manufacturing and manufacturing2 (exact
> replicas except for the delegator specified in
> web.xml). (Torsten, please take what I say with
> pinch of salt; I just started researching all these
> a few hours back since your message reminded
> me you were on to "delegator switching" or similar).
>
> The big question I have here is: Can we avoid
> duplicating the entire "webapp" folder? Note that
> the delegator can only be specified in web.xml, far
> as I know.
>
> Here are the steps, in case Torsten wants them:
>
> 1. Edit framework/entity/config/entityengine.xml to
> add a new delegator
>     "default2" that points to a new datasource, say
> "localmysql2" connecting to
>     a new database.
>
> 2. Copy
> applications/manufacturing/webapp/manufacturing to
> manufacturing2.
>
> 3. Edit param "entityDelegatorName" in
> manufacturing2/WEB-INF/web.xml to point
>     to default2.
>
> 4. Edit
> applications/manufacturing/ofbiz-component.xml. Copy
> the original
>     <webapp> entity, but set the copy's "location"
> attribute to
>     "webapp/manufacturing2" and embed a
> <virtual-host> entity into it. (Do we
>     have to name the 2nd <webapp> "manufacturing2"?
> I don't think so.)
>
> And, I think that about covers it. That runs one
> instance of Manufacturing module for 2 virtual
> hosts with 2 separate databases. The "location"
> attribute is the key here, really.
>
> So, I hope the above will let you know where I am
> now so you can help me better. Sorry to have you
> laboring the point. Can you confirm that my
> understanding is "as good as it gets" for the
> current
> OFBiz framework? I had hoped for a cleaner approach,
> like a central place to configure it all
> rather than go into every module (applications/*).
>
> Am I doing things right? Or is there a better way?
>
> Thanks, Andrew.
>
> Jonathon
>
> Andrew Sykes wrote:
> > Jonathon,
> >
> > Sorry to labour the point, but I guess you are
> aware that you can simply
> > make copies of all the relevant components and run
> them in a single
> > OfBiz?
> >
> > This is a pretty simple task, all you need is a
> copy of the config files
> > for each component you are interested in.
> >
> > So for example you would create a webtools1
> component in hot-deploy with
> > the relevant config and the mount point changed
> and you will have a new
> > copy of webtools.
> >
> > It certainly saves a lot of resources doing it
> this way compared to
> > running two copies of everything.
> >
> > - Andrew
> >
> > On Tue, 2007-01-09 at 21:15 +0800, Jonathon --
> Improov wrote:
> >> Hi Torsten,
> >>
> >> If you want to help steer OFBiz to support
> virtual hosts (with respect to delegators), you may
> >> want to join discussion at
>
http://lists.ofbiz.org/pipermail/jira/2006-May/003933.html

> . (JIRA for
> >> OFBiz seems down now, though).
> >>
> >> Andrew is right. You can set up a single instance
> of OFBiz to point to multiple databases using
> >> virtual hosts. But my requirement is different: I
> need different versions of OFBiz running on a
> >> single webserver (Tomcat or otherwise).
> >>
> >> You might also need what I'm looking for now.
> David is right about something. The
> >> one-size-fits-all ERP system of the past is no
> longer valid. If you're to serve multiple customers
> >> on a single webserver (to maximize usage of
> resources), you should be prepared to make minor
> >> customizations so that you can capture a wider
> audience. Have you done any research as to what
> >> size/color of OFBiz serves the widest audience?
> >>
> >> Jonathon
> >>
> >> Torsten Schlabach wrote:
> >>>  > This doesn't answer your question, but are
> you aware that OfBiz has
> >>>  > virtual host support?
> >>>
> >>> Tell us more about this, please?
> >>>
> >>> Regards,
> >>> Torsten
> >>>
> >>> Andrew Sykes schrieb:
> >>>> Jonathon,
> >>>>
> >>>> This doesn't answer your question, but are you
> aware that OfBiz has
> >>>> virtual host support?
> >>>>
> >>>> On Tue, 2007-01-09 at 10:24 +0800, Jonathon --
> Improov wrote:
> >>>>
> >>>>> Anybody knows how to run OFBiz in Tomcat,
> without embedded container?
> >>>>>
> >>>>> I want to run multiple instances of OFBiz
> using the same ports via
> >>>>> virtual hosts.
> >>>>>
> >>>>> Jonathon
> >>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Running OFBiz in Tomcat, without embedded container

jonwimp
In reply to this post by Andrew Sykes
Andrew,

Got on fine. You're right, I just needed the web.xml and controller.xml . I was testing with
/manufacturing/control (without /main), and I thought it didn't work.

Now I can set up 2-3 virtual instances of OFBiz with no more cost than one physical instance!
That's all I require for my testing needs. Well, of course, there's harddisk space required for
MySQL databases (100-300MB for each virtual instance).

I suspect RAM costs is the same as for one physical instance. After all, this isn't EJB.

Thanks, Andrew! I hope Torsten is reading these. He's been asking about this topic for some time
now, I think. A little later, I'll try to put up some documentation.

There's still no clean way to deploy 2 different versions of OFBiz on a single catalina engine,
though. But I suppose I can try to view OFBiz as a collection of softwares (modules), rather than
a single simple entity.

Jonathon

Andrew Sykes wrote:

> Jonathon,
>
> That sounds pretty much like you're going down the right track, you
> don't need to copy the whole webapp directory though.
>
> There are only a few files required, I hope I can remember them all...
> myapp/ofbiz-component.xml
> myapp/build.xml
> myapp/webapp/myapp/WEB-INF/web.xml
> myapp/webapp/myapp/WEB-INF/controller.xml
>
> Er, I think that's all ;-)
>
> Just copy the controller.xml from the app you are duplicating, you don't
> need to change anything, because the component:// urls within the file
> will point to the original app from which you are "inheriting" all your
> functionality. If you need to make a change to the generic app, just put
> it in your new app and adjust the controller.xml entry accordingly.
>
> As you said before, the delegator is setup in web.xml
>
> That's about it.
>
> Let me know how you get on...
> Andrew
>
>
> On Tue, 2007-01-09 at 23:34 +0800, Jonathon -- Improov wrote:
>> Hi Andrew,
>>
>> Yes, that's what I did, almost. I couldn't manage to copy JUST the config files.
>>
>> So, say I want to run 2 different versions of OFBiz at the same time. I'd have in my applications
>> folder 2 copies of every component. For eg, I'd have applications/manufacturing and
>> applications/manufacturing2, both different from each other. Is this what you mean?
>>
>> What Torsten wants, if I remember right, is to run a single version of OFBiz, but have multiple
>> virtual hosts, each accessing a different database.
>>
>> For Torsten's case, the best I can manage is to duplicate the "webapp" folder and add an extra
>> <webapp> entity in ofbiz-component.xml for every virtual host. So, Torsten may have in
>> applications/manufacturing/webapp/ folder 2 folders: manufacturing and manufacturing2 (exact
>> replicas except for the delegator specified in web.xml). (Torsten, please take what I say with
>> pinch of salt; I just started researching all these a few hours back since your message reminded
>> me you were on to "delegator switching" or similar).
>>
>> The big question I have here is: Can we avoid duplicating the entire "webapp" folder? Note that
>> the delegator can only be specified in web.xml, far as I know.
>>
>> Here are the steps, in case Torsten wants them:
>>
>> 1. Edit framework/entity/config/entityengine.xml to add a new delegator
>>     "default2" that points to a new datasource, say "localmysql2" connecting to
>>     a new database.
>>
>> 2. Copy applications/manufacturing/webapp/manufacturing to manufacturing2.
>>
>> 3. Edit param "entityDelegatorName" in manufacturing2/WEB-INF/web.xml to point
>>     to default2.
>>
>> 4. Edit applications/manufacturing/ofbiz-component.xml. Copy the original
>>     <webapp> entity, but set the copy's "location" attribute to
>>     "webapp/manufacturing2" and embed a <virtual-host> entity into it. (Do we
>>     have to name the 2nd <webapp> "manufacturing2"? I don't think so.)
>>
>> And, I think that about covers it. That runs one instance of Manufacturing module for 2 virtual
>> hosts with 2 separate databases. The "location" attribute is the key here, really.
>>
>> So, I hope the above will let you know where I am now so you can help me better. Sorry to have you
>> laboring the point. Can you confirm that my understanding is "as good as it gets" for the current
>> OFBiz framework? I had hoped for a cleaner approach, like a central place to configure it all
>> rather than go into every module (applications/*).
>>
>> Am I doing things right? Or is there a better way?
>>
>> Thanks, Andrew.
>>
>> Jonathon
>>
>> Andrew Sykes wrote:
>>> Jonathon,
>>>
>>> Sorry to labour the point, but I guess you are aware that you can simply
>>> make copies of all the relevant components and run them in a single
>>> OfBiz?
>>>
>>> This is a pretty simple task, all you need is a copy of the config files
>>> for each component you are interested in.
>>>
>>> So for example you would create a webtools1 component in hot-deploy with
>>> the relevant config and the mount point changed and you will have a new
>>> copy of webtools.
>>>
>>> It certainly saves a lot of resources doing it this way compared to
>>> running two copies of everything.
>>>
>>> - Andrew
>>>
>>> On Tue, 2007-01-09 at 21:15 +0800, Jonathon -- Improov wrote:
>>>> Hi Torsten,
>>>>
>>>> If you want to help steer OFBiz to support virtual hosts (with respect to delegators), you may
>>>> want to join discussion at http://lists.ofbiz.org/pipermail/jira/2006-May/003933.html . (JIRA for
>>>> OFBiz seems down now, though).
>>>>
>>>> Andrew is right. You can set up a single instance of OFBiz to point to multiple databases using
>>>> virtual hosts. But my requirement is different: I need different versions of OFBiz running on a
>>>> single webserver (Tomcat or otherwise).
>>>>
>>>> You might also need what I'm looking for now. David is right about something. The
>>>> one-size-fits-all ERP system of the past is no longer valid. If you're to serve multiple customers
>>>> on a single webserver (to maximize usage of resources), you should be prepared to make minor
>>>> customizations so that you can capture a wider audience. Have you done any research as to what
>>>> size/color of OFBiz serves the widest audience?
>>>>
>>>> Jonathon
>>>>
>>>> Torsten Schlabach wrote:
>>>>>  > This doesn't answer your question, but are you aware that OfBiz has
>>>>>  > virtual host support?
>>>>>
>>>>> Tell us more about this, please?
>>>>>
>>>>> Regards,
>>>>> Torsten
>>>>>
>>>>> Andrew Sykes schrieb:
>>>>>> Jonathon,
>>>>>>
>>>>>> This doesn't answer your question, but are you aware that OfBiz has
>>>>>> virtual host support?
>>>>>>
>>>>>> On Tue, 2007-01-09 at 10:24 +0800, Jonathon -- Improov wrote:
>>>>>>
>>>>>>> Anybody knows how to run OFBiz in Tomcat, without embedded container?
>>>>>>>
>>>>>>> I want to run multiple instances of OFBiz using the same ports via
>>>>>>> virtual hosts.
>>>>>>>
>>>>>>> Jonathon

Reply | Threaded
Open this post in threaded view
|

Re: Running OFBiz in Tomcat, without embedded container

Andrew Sykes
In reply to this post by Andrew Sykes
Jonathon (and Torsten),

Yes, I think you're right, its best to think of OfBiz as a set of apps
within a framework, once you start thinking like that it isn't so
difficult to imagine deploying multiples.

I really have no idea if you can deploy two OfBizs within one tomcat,
I've never really had cause to think of it that way ;-)

- Andrew

On Wed, 2007-01-10 at 02:58 +0800, Jonathon -- Improov wrote:

> Andrew,
>
> Got on fine. You're right, I just needed the web.xml and controller.xml . I was testing with
> /manufacturing/control (without /main), and I thought it didn't work.
>
> Now I can set up 2-3 virtual instances of OFBiz with no more cost than one physical instance!
> That's all I require for my testing needs. Well, of course, there's harddisk space required for
> MySQL databases (100-300MB for each virtual instance).
>
> I suspect RAM costs is the same as for one physical instance. After all, this isn't EJB.
>
> Thanks, Andrew! I hope Torsten is reading these. He's been asking about this topic for some time
> now, I think. A little later, I'll try to put up some documentation.
>
> There's still no clean way to deploy 2 different versions of OFBiz on a single catalina engine,
> though. But I suppose I can try to view OFBiz as a collection of softwares (modules), rather than
> a single simple entity.
>
> Jonathon
>
> Andrew Sykes wrote:
> > Jonathon,
> >
> > That sounds pretty much like you're going down the right track, you
> > don't need to copy the whole webapp directory though.
> >
> > There are only a few files required, I hope I can remember them all...
> > myapp/ofbiz-component.xml
> > myapp/build.xml
> > myapp/webapp/myapp/WEB-INF/web.xml
> > myapp/webapp/myapp/WEB-INF/controller.xml
> >
> > Er, I think that's all ;-)
> >
> > Just copy the controller.xml from the app you are duplicating, you don't
> > need to change anything, because the component:// urls within the file
> > will point to the original app from which you are "inheriting" all your
> > functionality. If you need to make a change to the generic app, just put
> > it in your new app and adjust the controller.xml entry accordingly.
> >
> > As you said before, the delegator is setup in web.xml
> >
> > That's about it.
> >
> > Let me know how you get on...
> > Andrew
> >
> >
> > On Tue, 2007-01-09 at 23:34 +0800, Jonathon -- Improov wrote:
> >> Hi Andrew,
> >>
> >> Yes, that's what I did, almost. I couldn't manage to copy JUST the config files.
> >>
> >> So, say I want to run 2 different versions of OFBiz at the same time. I'd have in my applications
> >> folder 2 copies of every component. For eg, I'd have applications/manufacturing and
> >> applications/manufacturing2, both different from each other. Is this what you mean?
> >>
> >> What Torsten wants, if I remember right, is to run a single version of OFBiz, but have multiple
> >> virtual hosts, each accessing a different database.
> >>
> >> For Torsten's case, the best I can manage is to duplicate the "webapp" folder and add an extra
> >> <webapp> entity in ofbiz-component.xml for every virtual host. So, Torsten may have in
> >> applications/manufacturing/webapp/ folder 2 folders: manufacturing and manufacturing2 (exact
> >> replicas except for the delegator specified in web.xml). (Torsten, please take what I say with
> >> pinch of salt; I just started researching all these a few hours back since your message reminded
> >> me you were on to "delegator switching" or similar).
> >>
> >> The big question I have here is: Can we avoid duplicating the entire "webapp" folder? Note that
> >> the delegator can only be specified in web.xml, far as I know.
> >>
> >> Here are the steps, in case Torsten wants them:
> >>
> >> 1. Edit framework/entity/config/entityengine.xml to add a new delegator
> >>     "default2" that points to a new datasource, say "localmysql2" connecting to
> >>     a new database.
> >>
> >> 2. Copy applications/manufacturing/webapp/manufacturing to manufacturing2.
> >>
> >> 3. Edit param "entityDelegatorName" in manufacturing2/WEB-INF/web.xml to point
> >>     to default2.
> >>
> >> 4. Edit applications/manufacturing/ofbiz-component.xml. Copy the original
> >>     <webapp> entity, but set the copy's "location" attribute to
> >>     "webapp/manufacturing2" and embed a <virtual-host> entity into it. (Do we
> >>     have to name the 2nd <webapp> "manufacturing2"? I don't think so.)
> >>
> >> And, I think that about covers it. That runs one instance of Manufacturing module for 2 virtual
> >> hosts with 2 separate databases. The "location" attribute is the key here, really.
> >>
> >> So, I hope the above will let you know where I am now so you can help me better. Sorry to have you
> >> laboring the point. Can you confirm that my understanding is "as good as it gets" for the current
> >> OFBiz framework? I had hoped for a cleaner approach, like a central place to configure it all
> >> rather than go into every module (applications/*).
> >>
> >> Am I doing things right? Or is there a better way?
> >>
> >> Thanks, Andrew.
> >>
> >> Jonathon
> >>
> >> Andrew Sykes wrote:
> >>> Jonathon,
> >>>
> >>> Sorry to labour the point, but I guess you are aware that you can simply
> >>> make copies of all the relevant components and run them in a single
> >>> OfBiz?
> >>>
> >>> This is a pretty simple task, all you need is a copy of the config files
> >>> for each component you are interested in.
> >>>
> >>> So for example you would create a webtools1 component in hot-deploy with
> >>> the relevant config and the mount point changed and you will have a new
> >>> copy of webtools.
> >>>
> >>> It certainly saves a lot of resources doing it this way compared to
> >>> running two copies of everything.
> >>>
> >>> - Andrew
> >>>
> >>> On Tue, 2007-01-09 at 21:15 +0800, Jonathon -- Improov wrote:
> >>>> Hi Torsten,
> >>>>
> >>>> If you want to help steer OFBiz to support virtual hosts (with respect to delegators), you may
> >>>> want to join discussion at http://lists.ofbiz.org/pipermail/jira/2006-May/003933.html . (JIRA for
> >>>> OFBiz seems down now, though).
> >>>>
> >>>> Andrew is right. You can set up a single instance of OFBiz to point to multiple databases using
> >>>> virtual hosts. But my requirement is different: I need different versions of OFBiz running on a
> >>>> single webserver (Tomcat or otherwise).
> >>>>
> >>>> You might also need what I'm looking for now. David is right about something. The
> >>>> one-size-fits-all ERP system of the past is no longer valid. If you're to serve multiple customers
> >>>> on a single webserver (to maximize usage of resources), you should be prepared to make minor
> >>>> customizations so that you can capture a wider audience. Have you done any research as to what
> >>>> size/color of OFBiz serves the widest audience?
> >>>>
> >>>> Jonathon
> >>>>
> >>>> Torsten Schlabach wrote:
> >>>>>  > This doesn't answer your question, but are you aware that OfBiz has
> >>>>>  > virtual host support?
> >>>>>
> >>>>> Tell us more about this, please?
> >>>>>
> >>>>> Regards,
> >>>>> Torsten
> >>>>>
> >>>>> Andrew Sykes schrieb:
> >>>>>> Jonathon,
> >>>>>>
> >>>>>> This doesn't answer your question, but are you aware that OfBiz has
> >>>>>> virtual host support?
> >>>>>>
> >>>>>> On Tue, 2007-01-09 at 10:24 +0800, Jonathon -- Improov wrote:
> >>>>>>
> >>>>>>> Anybody knows how to run OFBiz in Tomcat, without embedded container?
> >>>>>>>
> >>>>>>> I want to run multiple instances of OFBiz using the same ports via
> >>>>>>> virtual hosts.
> >>>>>>>
> >>>>>>> Jonathon
>
--
Kind Regards
Andrew Sykes <[hidden email]>
Sykes Development Ltd
http://www.sykesdevelopment.com

Reply | Threaded
Open this post in threaded view
|

Re: Running OFBiz in Tomcat, without embedded container

David E Jones-2

What is the goal here anyway? Is it just to run multiple independent  
instances of OFBiz on a single server, with a single IP address and  
with a different domain name or other for each?

If so, there are WAY easier ways of doing this... and various groups  
have been doing it for years. It's not trivial, but there are lots of  
tools out there for it.

The easiest way to do this that I've seen (and other such as Matt  
Porter or others at Contegix, or even my partner Tim Ruppert, have  
more experience than I do with this), is to deploy each OFBiz  
instance with a unique set of ports, and then use Apache httpd with  
mod_jk or something on the front end mounted on the common ports (80,  
443, etc) and have it handle the virtual domain mapping to the  
different AJP ports for the different instances of OFBiz.

With multiple IP addresses it is easier, you can have each app mount  
on the same ports on different interfaces, and I think that's the way  
Contegix usually does their multiple instances per server.

Either way, it's a VERY good idea to keep different companies in  
different JVM instances, and running against different databases.  
This is important for security reasons, and so you can more easily  
give clients remote access to their data if needed and such.

-David


On Jan 9, 2007, at 1:34 PM, Andrew Sykes wrote:

> Jonathon (and Torsten),
>
> Yes, I think you're right, its best to think of OfBiz as a set of apps
> within a framework, once you start thinking like that it isn't so
> difficult to imagine deploying multiples.
>
> I really have no idea if you can deploy two OfBizs within one tomcat,
> I've never really had cause to think of it that way ;-)
>
> - Andrew
>
> On Wed, 2007-01-10 at 02:58 +0800, Jonathon -- Improov wrote:
>> Andrew,
>>
>> Got on fine. You're right, I just needed the web.xml and  
>> controller.xml . I was testing with
>> /manufacturing/control (without /main), and I thought it didn't work.
>>
>> Now I can set up 2-3 virtual instances of OFBiz with no more cost  
>> than one physical instance!
>> That's all I require for my testing needs. Well, of course,  
>> there's harddisk space required for
>> MySQL databases (100-300MB for each virtual instance).
>>
>> I suspect RAM costs is the same as for one physical instance.  
>> After all, this isn't EJB.
>>
>> Thanks, Andrew! I hope Torsten is reading these. He's been asking  
>> about this topic for some time
>> now, I think. A little later, I'll try to put up some documentation.
>>
>> There's still no clean way to deploy 2 different versions of OFBiz  
>> on a single catalina engine,
>> though. But I suppose I can try to view OFBiz as a collection of  
>> softwares (modules), rather than
>> a single simple entity.
>>
>> Jonathon
>>
>> Andrew Sykes wrote:
>>> Jonathon,
>>>
>>> That sounds pretty much like you're going down the right track, you
>>> don't need to copy the whole webapp directory though.
>>>
>>> There are only a few files required, I hope I can remember them  
>>> all...
>>> myapp/ofbiz-component.xml
>>> myapp/build.xml
>>> myapp/webapp/myapp/WEB-INF/web.xml
>>> myapp/webapp/myapp/WEB-INF/controller.xml
>>>
>>> Er, I think that's all ;-)
>>>
>>> Just copy the controller.xml from the app you are duplicating,  
>>> you don't
>>> need to change anything, because the component:// urls within the  
>>> file
>>> will point to the original app from which you are "inheriting"  
>>> all your
>>> functionality. If you need to make a change to the generic app,  
>>> just put
>>> it in your new app and adjust the controller.xml entry accordingly.
>>>
>>> As you said before, the delegator is setup in web.xml
>>>
>>> That's about it.
>>>
>>> Let me know how you get on...
>>> Andrew
>>>
>>>
>>> On Tue, 2007-01-09 at 23:34 +0800, Jonathon -- Improov wrote:
>>>> Hi Andrew,
>>>>
>>>> Yes, that's what I did, almost. I couldn't manage to copy JUST  
>>>> the config files.
>>>>
>>>> So, say I want to run 2 different versions of OFBiz at the same  
>>>> time. I'd have in my applications
>>>> folder 2 copies of every component. For eg, I'd have  
>>>> applications/manufacturing and
>>>> applications/manufacturing2, both different from each other. Is  
>>>> this what you mean?
>>>>
>>>> What Torsten wants, if I remember right, is to run a single  
>>>> version of OFBiz, but have multiple
>>>> virtual hosts, each accessing a different database.
>>>>
>>>> For Torsten's case, the best I can manage is to duplicate the  
>>>> "webapp" folder and add an extra
>>>> <webapp> entity in ofbiz-component.xml for every virtual host.  
>>>> So, Torsten may have in
>>>> applications/manufacturing/webapp/ folder 2 folders:  
>>>> manufacturing and manufacturing2 (exact
>>>> replicas except for the delegator specified in web.xml).  
>>>> (Torsten, please take what I say with
>>>> pinch of salt; I just started researching all these a few hours  
>>>> back since your message reminded
>>>> me you were on to "delegator switching" or similar).
>>>>
>>>> The big question I have here is: Can we avoid duplicating the  
>>>> entire "webapp" folder? Note that
>>>> the delegator can only be specified in web.xml, far as I know.
>>>>
>>>> Here are the steps, in case Torsten wants them:
>>>>
>>>> 1. Edit framework/entity/config/entityengine.xml to add a new  
>>>> delegator
>>>>     "default2" that points to a new datasource, say  
>>>> "localmysql2" connecting to
>>>>     a new database.
>>>>
>>>> 2. Copy applications/manufacturing/webapp/manufacturing to  
>>>> manufacturing2.
>>>>
>>>> 3. Edit param "entityDelegatorName" in manufacturing2/WEB-INF/
>>>> web.xml to point
>>>>     to default2.
>>>>
>>>> 4. Edit applications/manufacturing/ofbiz-component.xml. Copy the  
>>>> original
>>>>     <webapp> entity, but set the copy's "location" attribute to
>>>>     "webapp/manufacturing2" and embed a <virtual-host> entity  
>>>> into it. (Do we
>>>>     have to name the 2nd <webapp> "manufacturing2"? I don't  
>>>> think so.)
>>>>
>>>> And, I think that about covers it. That runs one instance of  
>>>> Manufacturing module for 2 virtual
>>>> hosts with 2 separate databases. The "location" attribute is the  
>>>> key here, really.
>>>>
>>>> So, I hope the above will let you know where I am now so you can  
>>>> help me better. Sorry to have you
>>>> laboring the point. Can you confirm that my understanding is "as  
>>>> good as it gets" for the current
>>>> OFBiz framework? I had hoped for a cleaner approach, like a  
>>>> central place to configure it all
>>>> rather than go into every module (applications/*).
>>>>
>>>> Am I doing things right? Or is there a better way?
>>>>
>>>> Thanks, Andrew.
>>>>
>>>> Jonathon
>>>>
>>>> Andrew Sykes wrote:
>>>>> Jonathon,
>>>>>
>>>>> Sorry to labour the point, but I guess you are aware that you  
>>>>> can simply
>>>>> make copies of all the relevant components and run them in a  
>>>>> single
>>>>> OfBiz?
>>>>>
>>>>> This is a pretty simple task, all you need is a copy of the  
>>>>> config files
>>>>> for each component you are interested in.
>>>>>
>>>>> So for example you would create a webtools1 component in hot-
>>>>> deploy with
>>>>> the relevant config and the mount point changed and you will  
>>>>> have a new
>>>>> copy of webtools.
>>>>>
>>>>> It certainly saves a lot of resources doing it this way  
>>>>> compared to
>>>>> running two copies of everything.
>>>>>
>>>>> - Andrew
>>>>>
>>>>> On Tue, 2007-01-09 at 21:15 +0800, Jonathon -- Improov wrote:
>>>>>> Hi Torsten,
>>>>>>
>>>>>> If you want to help steer OFBiz to support virtual hosts (with  
>>>>>> respect to delegators), you may
>>>>>> want to join discussion at http://lists.ofbiz.org/pipermail/ 
>>>>>> jira/2006-May/003933.html . (JIRA for
>>>>>> OFBiz seems down now, though).
>>>>>>
>>>>>> Andrew is right. You can set up a single instance of OFBiz to  
>>>>>> point to multiple databases using
>>>>>> virtual hosts. But my requirement is different: I need  
>>>>>> different versions of OFBiz running on a
>>>>>> single webserver (Tomcat or otherwise).
>>>>>>
>>>>>> You might also need what I'm looking for now. David is right  
>>>>>> about something. The
>>>>>> one-size-fits-all ERP system of the past is no longer valid.  
>>>>>> If you're to serve multiple customers
>>>>>> on a single webserver (to maximize usage of resources), you  
>>>>>> should be prepared to make minor
>>>>>> customizations so that you can capture a wider audience. Have  
>>>>>> you done any research as to what
>>>>>> size/color of OFBiz serves the widest audience?
>>>>>>
>>>>>> Jonathon
>>>>>>
>>>>>> Torsten Schlabach wrote:
>>>>>>>> This doesn't answer your question, but are you aware that  
>>>>>>>> OfBiz has
>>>>>>>> virtual host support?
>>>>>>>
>>>>>>> Tell us more about this, please?
>>>>>>>
>>>>>>> Regards,
>>>>>>> Torsten
>>>>>>>
>>>>>>> Andrew Sykes schrieb:
>>>>>>>> Jonathon,
>>>>>>>>
>>>>>>>> This doesn't answer your question, but are you aware that  
>>>>>>>> OfBiz has
>>>>>>>> virtual host support?
>>>>>>>>
>>>>>>>> On Tue, 2007-01-09 at 10:24 +0800, Jonathon -- Improov wrote:
>>>>>>>>
>>>>>>>>> Anybody knows how to run OFBiz in Tomcat, without embedded  
>>>>>>>>> container?
>>>>>>>>>
>>>>>>>>> I want to run multiple instances of OFBiz using the same  
>>>>>>>>> ports via
>>>>>>>>> virtual hosts.
>>>>>>>>>
>>>>>>>>> Jonathon
>>
> --
> Kind Regards
> Andrew Sykes <[hidden email]>
> Sykes Development Ltd
> http://www.sykesdevelopment.com
>


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Running OFBiz in Tomcat, without embedded container

jonwimp
David,

 > What is the goal here anyway? Is it just to run multiple independent
 > instances of OFBiz on a single server, with a single IP address and with a
 > different domain name or other for each?

Goal is to run different versions of OFBiz in a single machine on a single set of ports (RMI, AJP)
with a single IP (via virtual host), on a single Catalina engine. Each instance of OFBiz uses a
different database, of course.

Testing purposes only.

 > The easiest way to do this that I've seen (and other such as Matt Porter
 > or others at Contegix, or even my partner Tim Ruppert, have more
 > experience than I do with this), is to deploy each OFBiz instance with a
 > unique set of ports, and then use Apache httpd with mod_jk or something
 > on the front end mounted on the common ports (80, 443, etc) and have it
 > handle the virtual domain mapping to the different AJP ports for the
 > different instances of OFBiz.

Yup, and that's the way I did it first, with unique set of ports. That's the cleanest way to
deploy disparate (in terms of version, customizations, etc) instances of OFBiz.

 > With multiple IP addresses it is easier, you can have each app mount on
 > the same ports on different interfaces, and I think that's the way
 > Contegix usually does their multiple instances per server.

This is how one would do it if serving multiple OFBiz customers with the same Catalina engine. Few
customers would settle for sharing an IP anyway. Torsten might want this. Very clean. You can
simply have a folder /mycustomers containing physical OFBiz copies like CustomerA, CustomerB, etc.
Separate JVMs this way.

 > Either way, it's a VERY good idea to keep different companies in
 > different JVM instances, and running against different databases. This
 > is important for security reasons, and so you can more easily give
 > clients remote access to their data if needed and such.

You're right. It's not only clean in terms of deployment, it gives customers their deserved peace
of mind by giving them proper segregation/privacy/security.

Jonathon


David E Jones wrote:

>
> What is the goal here anyway? Is it just to run multiple independent
> instances of OFBiz on a single server, with a single IP address and with
> a different domain name or other for each?
>
> If so, there are WAY easier ways of doing this... and various groups
> have been doing it for years. It's not trivial, but there are lots of
> tools out there for it.
>
> The easiest way to do this that I've seen (and other such as Matt Porter
> or others at Contegix, or even my partner Tim Ruppert, have more
> experience than I do with this), is to deploy each OFBiz instance with a
> unique set of ports, and then use Apache httpd with mod_jk or something
> on the front end mounted on the common ports (80, 443, etc) and have it
> handle the virtual domain mapping to the different AJP ports for the
> different instances of OFBiz.
>
> With multiple IP addresses it is easier, you can have each app mount on
> the same ports on different interfaces, and I think that's the way
> Contegix usually does their multiple instances per server.
>
> Either way, it's a VERY good idea to keep different companies in
> different JVM instances, and running against different databases. This
> is important for security reasons, and so you can more easily give
> clients remote access to their data if needed and such.
>
> -David
Reply | Threaded
Open this post in threaded view
|

Re: Running OFBiz in Tomcat, without embedded container

jonwimp
In reply to this post by jonwimp
Hi Andrew,

Copying just the web.xml and controller.xml worked for every application except Manufacturing. So
it wasn't my imagination after all.

Is there any way to specify a non-webapp resource for HtmlFormWrapper? If not, what is the
alternative. Jacopo (who takes care of the Manufacturing module?) might want to look into this too.

Jonathon

Jonathon -- Improov wrote:

> Andrew,
>
> Got on fine. You're right, I just needed the web.xml and controller.xml
> . I was testing with /manufacturing/control (without /main), and I
> thought it didn't work.
>
> Now I can set up 2-3 virtual instances of OFBiz with no more cost than
> one physical instance! That's all I require for my testing needs. Well,
> of course, there's harddisk space required for MySQL databases
> (100-300MB for each virtual instance).
>
> I suspect RAM costs is the same as for one physical instance. After all,
> this isn't EJB.
>
> Thanks, Andrew! I hope Torsten is reading these. He's been asking about
> this topic for some time now, I think. A little later, I'll try to put
> up some documentation.
>
> There's still no clean way to deploy 2 different versions of OFBiz on a
> single catalina engine, though. But I suppose I can try to view OFBiz as
> a collection of softwares (modules), rather than a single simple entity.
Reply | Threaded
Open this post in threaded view
|

Re: Running OFBiz in Tomcat, without embedded container

jonwimp
Hi Andrew,

More observations. Seems like it's a bad idea to have widget/*.xml refer to
webapp/manufacturing/WEB-INF/actions/*.bsh that in turn use HtmlFormWrapper. It appears the
HtmlFormWrapper can only read files under the webapp folder.

I tried changing the 2 WEB-INF/web.xml files to have different dispatchers for each webapp
(manufacturing and manufacturing2). I checked the logs to see that there are 2 messges: "Created
dispatcher for: manufacturing" and "Created dispatcher for: manufacturing2". No go. Tried making
them the same. No go.

All that's left is to copy the 2 affected .xml files over. The 2 files are read by *.bsh files in
webapp/manufacturing/WEB-INF/actions/: jobshopmgt/EditProductionRun.bsh and
routing/ListCalendarWeek.bsh . They read 2 .xml files in webapp/manufacturing/:
jobshopmgt/ProductionRunForms.xml and and routing/CalendarForms.xml .

To Torsten,

Here's what you'll need to get Manufacturing working with Andrew's "single OFBiz multiple
databases/domains" method:

In applications/manufacturing/

- Patch webapp/manufacturing/WEB-INF/controller.xml with
   manufacturing_controllerxml.patch .

- Move webapp/manufacturing/jobshopmt/ShowProductionRun.bsh to
   scripts/org/ofbiz/manufacturing/jobshopmgt .

- Copy from webapp/manufacturing/ to webapp/manufacturing2/ files
   jobshopmgt/ProductionRunForms.xml and routing/CalendarForms.xml

For the other applications, just go to their webapp/<webappname>/WEB-INF/actions/ folder, and do a
grep for "htmlformwrapper". Also, do a grep for "<event type=\"bsf". You'll want to copy over
those .bsh files that are invoked with a non-null "path" value. (In the above Manufacturing
example, I moved the file into script folder. I don't recommend moving files around like that.)

Hmm. Come to think of it, you'd be better off just duplicating all of the webapps. That'll cost
you just 7MB per "virtual instance". Moreover, you never know when the OFBiz developers will add
in new instances of the above pattern to break your "virtual instances". There's at least 1 tricky
connection if you intend to have the trimmest deployment: CRMSFA links to Order module.

For those who are doing "virtual instance" deployments like this, watch out for broken
functionalities. There are at least a score of them.

Jonathon

Jonathon -- Improov wrote:

> Hi Andrew,
>
> Copying just the web.xml and controller.xml worked for every application
> except Manufacturing. So it wasn't my imagination after all.
>
> Is there any way to specify a non-webapp resource for HtmlFormWrapper?
> If not, what is the alternative. Jacopo (who takes care of the
> Manufacturing module?) might want to look into this too.
>
> Jonathon
>
> Jonathon -- Improov wrote:
>> Andrew,
>>
>> Got on fine. You're right, I just needed the web.xml and
>> controller.xml . I was testing with /manufacturing/control (without
>> /main), and I thought it didn't work.
>>
>> Now I can set up 2-3 virtual instances of OFBiz with no more cost than
>> one physical instance! That's all I require for my testing needs.
>> Well, of course, there's harddisk space required for MySQL databases
>> (100-300MB for each virtual instance).
>>
>> I suspect RAM costs is the same as for one physical instance. After
>> all, this isn't EJB.
>>
>> Thanks, Andrew! I hope Torsten is reading these. He's been asking
>> about this topic for some time now, I think. A little later, I'll try
>> to put up some documentation.
>>
>> There's still no clean way to deploy 2 different versions of OFBiz on
>> a single catalina engine, though. But I suppose I can try to view
>> OFBiz as a collection of softwares (modules), rather than a single
>> simple entity.
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Running OFBiz in Tomcat, without embedded container

cjhowe
Jonathon,

I'm conflicted.  I can't speak for others, but this is
my take.  

Generally, I'm more than happy to point people new to
OFBiz in the direction to find a solution.  Oftentimes
I even mistakenly coddle too much and provide a
solution that lets them get in over their head without
the understanding of why some things work the way they
do.  I must say, I don't feel inclined to provide you
with very much help and I can't quite put my finger on
the exact why of it.  I suspect it's your claim that
you've read everything and exhausted your search for
the answer before diving into the code and then your
disdain for the way some solutions are structured.
But I can't be sure if that's the entirety of my
disinclination.  However, this is the perfect example
of such scenario.  Running multiple instances of Ofbiz
has been addressed a number of times.  BJ Freeman
wrote up a how to on his experience (although with the
change from jetty to tomcat, some of it is old, but
should be similar) it's located in the old wiki that
is referenced on the ofbiz.org website.  

This particular issue about the HtmlFormWrapper used
in beanshell scripts has already been outline in
http://issues.apache.org/jira/browse/OFBIZ-278

which was brought over from the old JIRA.

While I'd be one of the first to agree that
documentation is still largely dispersed, it is
getting much better.  There really hasn't been one
issue that you've brought up that hasn't been
addressed in either the
Apache OFBiz mailing lists
Apache Ofbiz Jira
https://issues.apache.org/jira/browse/OFBIZ
docs.ofbiz.org
the old wiki http://ofbizwiki.go-integral.com/
or the old mailing lists:
http://lists.ofbiz.org/

with additional tips being provided by a handful of
other sources.  All of these are on the ofbiz.org
site.  I think I'd be happy to point out exactly where
things are documented for a particular problem if
you'd ask for help in a manner that didn't seem as if
you have already read them and the information
provided was insufficient.

I think my rant is done now.

--- Jonathon -- Improov <[hidden email]> wrote:

> Hi Andrew,
>
> More observations. Seems like it's a bad idea to
> have widget/*.xml refer to
> webapp/manufacturing/WEB-INF/actions/*.bsh that in
> turn use HtmlFormWrapper. It appears the
> HtmlFormWrapper can only read files under the webapp
> folder.
>
> I tried changing the 2 WEB-INF/web.xml files to have
> different dispatchers for each webapp
> (manufacturing and manufacturing2). I checked the
> logs to see that there are 2 messges: "Created
> dispatcher for: manufacturing" and "Created
> dispatcher for: manufacturing2". No go. Tried making
>
> them the same. No go.
>
> All that's left is to copy the 2 affected .xml files
> over. The 2 files are read by *.bsh files in
> webapp/manufacturing/WEB-INF/actions/:
> jobshopmgt/EditProductionRun.bsh and
> routing/ListCalendarWeek.bsh . They read 2 .xml
> files in webapp/manufacturing/:
> jobshopmgt/ProductionRunForms.xml and and
> routing/CalendarForms.xml .
>
> To Torsten,
>
> Here's what you'll need to get Manufacturing working
> with Andrew's "single OFBiz multiple
> databases/domains" method:
>
> In applications/manufacturing/
>
> - Patch webapp/manufacturing/WEB-INF/controller.xml
> with
>    manufacturing_controllerxml.patch .
>
> - Move
> webapp/manufacturing/jobshopmt/ShowProductionRun.bsh
> to
>    scripts/org/ofbiz/manufacturing/jobshopmgt .
>
> - Copy from webapp/manufacturing/ to
> webapp/manufacturing2/ files
>    jobshopmgt/ProductionRunForms.xml and
> routing/CalendarForms.xml
>
> For the other applications, just go to their
> webapp/<webappname>/WEB-INF/actions/ folder, and do
> a
> grep for "htmlformwrapper". Also, do a grep for
> "<event type=\"bsf". You'll want to copy over
> those .bsh files that are invoked with a non-null
> "path" value. (In the above Manufacturing
> example, I moved the file into script folder. I
> don't recommend moving files around like that.)
>
> Hmm. Come to think of it, you'd be better off just
> duplicating all of the webapps. That'll cost
> you just 7MB per "virtual instance". Moreover, you
> never know when the OFBiz developers will add
> in new instances of the above pattern to break your
> "virtual instances". There's at least 1 tricky
> connection if you intend to have the trimmest
> deployment: CRMSFA links to Order module.
>
> For those who are doing "virtual instance"
> deployments like this, watch out for broken
> functionalities. There are at least a score of them.
>
> Jonathon
>
> Jonathon -- Improov wrote:
> > Hi Andrew,
> >
> > Copying just the web.xml and controller.xml worked
> for every application
> > except Manufacturing. So it wasn't my imagination
> after all.
> >
> > Is there any way to specify a non-webapp resource
> for HtmlFormWrapper?
> > If not, what is the alternative. Jacopo (who takes
> care of the
> > Manufacturing module?) might want to look into
> this too.
> >
> > Jonathon
> >
> > Jonathon -- Improov wrote:
> >> Andrew,
> >>
> >> Got on fine. You're right, I just needed the
> web.xml and
> >> controller.xml . I was testing with
> /manufacturing/control (without
> >> /main), and I thought it didn't work.
> >>
> >> Now I can set up 2-3 virtual instances of OFBiz
> with no more cost than
> >> one physical instance! That's all I require for
> my testing needs.
> >> Well, of course, there's harddisk space required
> for MySQL databases
> >> (100-300MB for each virtual instance).
> >>
> >> I suspect RAM costs is the same as for one
> physical instance. After
> >> all, this isn't EJB.
> >>
> >> Thanks, Andrew! I hope Torsten is reading these.
> He's been asking
> >> about this topic for some time now, I think. A
> little later, I'll try
> >> to put up some documentation.
> >>
> >> There's still no clean way to deploy 2 different
> versions of OFBiz on
> >> a single catalina engine, though. But I suppose I
> can try to view
> >> OFBiz as a collection of softwares (modules),
> rather than a single
> >> simple entity.
> >
> >
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Running OFBiz in Tomcat, without embedded container

jonwimp
Chris,

Ok, that was a long way of saying that the HtmlFormWrapper has an open issue. I'll try not to be
confused. Not sure whether you're saying my experimentation results were correct, or off base.

Perhaps everyone, including myself, is just too pressed for time. So I'll state publicly (and
officially?) that I don't expect obligatory responses from the mailing list. (Apparently things
don't quite work both ways here; charity doesn't quite elicit charity).

Anyway, here's the new How-To for deploying "virtual instances" of OFBiz operating on separate
databases. Duplicate all the webapp /<webappname> folders, and change the delegator in web.xml, at
least until Chris Howe's Issue With HtmlFormWrapper is fixed. There, done.

I sure hope the above 1-liner how-to hasn't been posted somewhere, or I might get another rant
from you. :) I'll try harder to read up for the answers before posting questions. Though it does
seem I tend to get answers from some veterans here THE VERY MOMENT I chance upon the answers
myself. Hmm. Is there some kind of feud going on between veteran and novice (underdog?) members
I'm not aware of here?

So, what is it really? Do you want me to post my findings here, or not? Just tell me not to, and
I'll gladly refrain from contributing further. Not that I'm contributing much that is useful
during this early stage anyway. I mean what do I know, right?

Thanks for pointing me to JIRA, anyway. I thought JIRA for OFBiz was down because I kept hitting
http://jira.ofbiz.org/browse/OFBIZ-890 . (See
http://lists.ofbiz.org/pipermail/jira/2006-May/003933.html).

As for the lacking documentation, I personally prefer to learn from the community than have folks
spend inordinate amounts of time writing leather bound pages fit for even marketing material.
That's my stance regarding documentation, in case you don't know or misunderstand.

Ah, that was too long already. Maybe David E. Jones was right that many folks just benefit from
the community and then disappear. Though I now wonder what the exact cause may have been.

Jonathon

PS: To Torsten, I believe you have your answers from my posts thus far. I can't help you further
because it seems it's wrong to do so! Just kidding. Mailing list has no problems, really. I hope
you enjoy OFBiz as much as I do. It really is quite a piece of work. The lack in documentation
speaks 2 things, I believe: the scope of OFBiz, and the rate of development (time spent more on
coding than docs).

Chris Howe wrote:

> Jonathon,
>
> I'm conflicted.  I can't speak for others, but this is
> my take.  
>
> Generally, I'm more than happy to point people new to
> OFBiz in the direction to find a solution.  Oftentimes
> I even mistakenly coddle too much and provide a
> solution that lets them get in over their head without
> the understanding of why some things work the way they
> do.  I must say, I don't feel inclined to provide you
> with very much help and I can't quite put my finger on
> the exact why of it.  I suspect it's your claim that
> you've read everything and exhausted your search for
> the answer before diving into the code and then your
> disdain for the way some solutions are structured.
> But I can't be sure if that's the entirety of my
> disinclination.  However, this is the perfect example
> of such scenario.  Running multiple instances of Ofbiz
> has been addressed a number of times.  BJ Freeman
> wrote up a how to on his experience (although with the
> change from jetty to tomcat, some of it is old, but
> should be similar) it's located in the old wiki that
> is referenced on the ofbiz.org website.  
>
> This particular issue about the HtmlFormWrapper used
> in beanshell scripts has already been outline in
> http://issues.apache.org/jira/browse/OFBIZ-278
>
> which was brought over from the old JIRA.
>
> While I'd be one of the first to agree that
> documentation is still largely dispersed, it is
> getting much better.  There really hasn't been one
> issue that you've brought up that hasn't been
> addressed in either the
> Apache OFBiz mailing lists
> Apache Ofbiz Jira
> https://issues.apache.org/jira/browse/OFBIZ
> docs.ofbiz.org
> the old wiki http://ofbizwiki.go-integral.com/
> or the old mailing lists:
> http://lists.ofbiz.org/
>
> with additional tips being provided by a handful of
> other sources.  All of these are on the ofbiz.org
> site.  I think I'd be happy to point out exactly where
> things are documented for a particular problem if
> you'd ask for help in a manner that didn't seem as if
> you have already read them and the information
> provided was insufficient.
>
> I think my rant is done now.
>
> --- Jonathon -- Improov <[hidden email]> wrote:
>
>> Hi Andrew,
>>
>> More observations. Seems like it's a bad idea to
>> have widget/*.xml refer to
>> webapp/manufacturing/WEB-INF/actions/*.bsh that in
>> turn use HtmlFormWrapper. It appears the
>> HtmlFormWrapper can only read files under the webapp
>> folder.
>>
>> I tried changing the 2 WEB-INF/web.xml files to have
>> different dispatchers for each webapp
>> (manufacturing and manufacturing2). I checked the
>> logs to see that there are 2 messges: "Created
>> dispatcher for: manufacturing" and "Created
>> dispatcher for: manufacturing2". No go. Tried making
>>
>> them the same. No go.
>>
>> All that's left is to copy the 2 affected .xml files
>> over. The 2 files are read by *.bsh files in
>> webapp/manufacturing/WEB-INF/actions/:
>> jobshopmgt/EditProductionRun.bsh and
>> routing/ListCalendarWeek.bsh . They read 2 .xml
>> files in webapp/manufacturing/:
>> jobshopmgt/ProductionRunForms.xml and and
>> routing/CalendarForms.xml .
>>
>> To Torsten,
>>
>> Here's what you'll need to get Manufacturing working
>> with Andrew's "single OFBiz multiple
>> databases/domains" method:
>>
>> In applications/manufacturing/
>>
>> - Patch webapp/manufacturing/WEB-INF/controller.xml
>> with
>>    manufacturing_controllerxml.patch .
>>
>> - Move
>> webapp/manufacturing/jobshopmt/ShowProductionRun.bsh
>> to
>>    scripts/org/ofbiz/manufacturing/jobshopmgt .
>>
>> - Copy from webapp/manufacturing/ to
>> webapp/manufacturing2/ files
>>    jobshopmgt/ProductionRunForms.xml and
>> routing/CalendarForms.xml
>>
>> For the other applications, just go to their
>> webapp/<webappname>/WEB-INF/actions/ folder, and do
>> a
>> grep for "htmlformwrapper". Also, do a grep for
>> "<event type=\"bsf". You'll want to copy over
>> those .bsh files that are invoked with a non-null
>> "path" value. (In the above Manufacturing
>> example, I moved the file into script folder. I
>> don't recommend moving files around like that.)
>>
>> Hmm. Come to think of it, you'd be better off just
>> duplicating all of the webapps. That'll cost
>> you just 7MB per "virtual instance". Moreover, you
>> never know when the OFBiz developers will add
>> in new instances of the above pattern to break your
>> "virtual instances". There's at least 1 tricky
>> connection if you intend to have the trimmest
>> deployment: CRMSFA links to Order module.
>>
>> For those who are doing "virtual instance"
>> deployments like this, watch out for broken
>> functionalities. There are at least a score of them.
>>
>> Jonathon
>>
>> Jonathon -- Improov wrote:
>>> Hi Andrew,
>>>
>>> Copying just the web.xml and controller.xml worked
>> for every application
>>> except Manufacturing. So it wasn't my imagination
>> after all.
>>> Is there any way to specify a non-webapp resource
>> for HtmlFormWrapper?
>>> If not, what is the alternative. Jacopo (who takes
>> care of the
>>> Manufacturing module?) might want to look into
>> this too.
>>> Jonathon
>>>
>>> Jonathon -- Improov wrote:
>>>> Andrew,
>>>>
>>>> Got on fine. You're right, I just needed the
>> web.xml and
>>>> controller.xml . I was testing with
>> /manufacturing/control (without
>>>> /main), and I thought it didn't work.
>>>>
>>>> Now I can set up 2-3 virtual instances of OFBiz
>> with no more cost than
>>>> one physical instance! That's all I require for
>> my testing needs.
>>>> Well, of course, there's harddisk space required
>> for MySQL databases
>>>> (100-300MB for each virtual instance).
>>>>
>>>> I suspect RAM costs is the same as for one
>> physical instance. After
>>>> all, this isn't EJB.
>>>>
>>>> Thanks, Andrew! I hope Torsten is reading these.
>> He's been asking
>>>> about this topic for some time now, I think. A
>> little later, I'll try
>>>> to put up some documentation.
>>>>
>>>> There's still no clean way to deploy 2 different
>> versions of OFBiz on
>>>> a single catalina engine, though. But I suppose I
>> can try to view
>>>> OFBiz as a collection of softwares (modules),
>> rather than a single
>>>> simple entity.
>>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Running OFBiz in Tomcat, without embedded container

David E Jones-2

Jonathon,

Please don't consider the remarks from Chris Howe as a representation  
of anything official or sanctioned by the project, and I'm sure we'd  
all appreciate it if you were "generous" enough in your thinking to  
not consider this to have anything to do with Apache OFBiz itself.  
These are un-moderated mailing lists and anyone can post anything  
they want.

In general I extremely highly recommend following "official" project  
resources, starting with the ofbiz.apache.org home page where  
everything it linked from.

-David


On Jan 10, 2007, at 12:42 PM, Jonathon -- Improov wrote:

> Chris,
>
> Ok, that was a long way of saying that the HtmlFormWrapper has an  
> open issue. I'll try not to be confused. Not sure whether you're  
> saying my experimentation results were correct, or off base.
>
> Perhaps everyone, including myself, is just too pressed for time.  
> So I'll state publicly (and officially?) that I don't expect  
> obligatory responses from the mailing list. (Apparently things  
> don't quite work both ways here; charity doesn't quite elicit  
> charity).
>
> Anyway, here's the new How-To for deploying "virtual instances" of  
> OFBiz operating on separate databases. Duplicate all the webapp /
> <webappname> folders, and change the delegator in web.xml, at least  
> until Chris Howe's Issue With HtmlFormWrapper is fixed. There, done.
>
> I sure hope the above 1-liner how-to hasn't been posted somewhere,  
> or I might get another rant from you. :) I'll try harder to read up  
> for the answers before posting questions. Though it does seem I  
> tend to get answers from some veterans here THE VERY MOMENT I  
> chance upon the answers myself. Hmm. Is there some kind of feud  
> going on between veteran and novice (underdog?) members I'm not  
> aware of here?
>
> So, what is it really? Do you want me to post my findings here, or  
> not? Just tell me not to, and I'll gladly refrain from contributing  
> further. Not that I'm contributing much that is useful during this  
> early stage anyway. I mean what do I know, right?
>
> Thanks for pointing me to JIRA, anyway. I thought JIRA for OFBiz  
> was down because I kept hitting http://jira.ofbiz.org/browse/ 
> OFBIZ-890 . (See http://lists.ofbiz.org/pipermail/jira/2006-May/ 
> 003933.html).
>
> As for the lacking documentation, I personally prefer to learn from  
> the community than have folks spend inordinate amounts of time  
> writing leather bound pages fit for even marketing material. That's  
> my stance regarding documentation, in case you don't know or  
> misunderstand.
>
> Ah, that was too long already. Maybe David E. Jones was right that  
> many folks just benefit from the community and then disappear.  
> Though I now wonder what the exact cause may have been.
>
> Jonathon
>
> PS: To Torsten, I believe you have your answers from my posts thus  
> far. I can't help you further because it seems it's wrong to do so!  
> Just kidding. Mailing list has no problems, really. I hope you  
> enjoy OFBiz as much as I do. It really is quite a piece of work.  
> The lack in documentation speaks 2 things, I believe: the scope of  
> OFBiz, and the rate of development (time spent more on coding than  
> docs).
>
> Chris Howe wrote:
>> Jonathon,
>> I'm conflicted.  I can't speak for others, but this is
>> my take.  Generally, I'm more than happy to point people new to
>> OFBiz in the direction to find a solution.  Oftentimes
>> I even mistakenly coddle too much and provide a
>> solution that lets them get in over their head without
>> the understanding of why some things work the way they
>> do.  I must say, I don't feel inclined to provide you
>> with very much help and I can't quite put my finger on
>> the exact why of it.  I suspect it's your claim that
>> you've read everything and exhausted your search for
>> the answer before diving into the code and then your
>> disdain for the way some solutions are structured. But I can't be  
>> sure if that's the entirety of my
>> disinclination.  However, this is the perfect example
>> of such scenario.  Running multiple instances of Ofbiz
>> has been addressed a number of times.  BJ Freeman
>> wrote up a how to on his experience (although with the
>> change from jetty to tomcat, some of it is old, but
>> should be similar) it's located in the old wiki that
>> is referenced on the ofbiz.org website.  This particular issue  
>> about the HtmlFormWrapper used
>> in beanshell scripts has already been outline in
>> http://issues.apache.org/jira/browse/OFBIZ-278
>> which was brought over from the old JIRA. While I'd be one of the  
>> first to agree that
>> documentation is still largely dispersed, it is
>> getting much better.  There really hasn't been one
>> issue that you've brought up that hasn't been
>> addressed in either the Apache OFBiz mailing lists
>> Apache Ofbiz Jira
>> https://issues.apache.org/jira/browse/OFBIZ
>> docs.ofbiz.org the old wiki http://ofbizwiki.go-integral.com/
>> or the old mailing lists: http://lists.ofbiz.org/
>> with additional tips being provided by a handful of
>> other sources.  All of these are on the ofbiz.org
>> site.  I think I'd be happy to point out exactly where
>> things are documented for a particular problem if
>> you'd ask for help in a manner that didn't seem as if
>> you have already read them and the information
>> provided was insufficient.
>> I think my rant is done now.
>> --- Jonathon -- Improov <[hidden email]> wrote:
>>> Hi Andrew,
>>>
>>> More observations. Seems like it's a bad idea to
>>> have widget/*.xml refer to webapp/manufacturing/WEB-INF/actions/
>>> *.bsh that in
>>> turn use HtmlFormWrapper. It appears the HtmlFormWrapper can only  
>>> read files under the webapp
>>> folder.
>>>
>>> I tried changing the 2 WEB-INF/web.xml files to have
>>> different dispatchers for each webapp (manufacturing and  
>>> manufacturing2). I checked the
>>> logs to see that there are 2 messges: "Created dispatcher for:  
>>> manufacturing" and "Created
>>> dispatcher for: manufacturing2". No go. Tried making
>>>
>>> them the same. No go.
>>>
>>> All that's left is to copy the 2 affected .xml files
>>> over. The 2 files are read by *.bsh files in webapp/manufacturing/
>>> WEB-INF/actions/:
>>> jobshopmgt/EditProductionRun.bsh and routing/
>>> ListCalendarWeek.bsh . They read 2 .xml
>>> files in webapp/manufacturing/: jobshopmgt/ProductionRunForms.xml  
>>> and and
>>> routing/CalendarForms.xml .
>>>
>>> To Torsten,
>>>
>>> Here's what you'll need to get Manufacturing working
>>> with Andrew's "single OFBiz multiple databases/domains" method:
>>>
>>> In applications/manufacturing/
>>>
>>> - Patch webapp/manufacturing/WEB-INF/controller.xml
>>> with
>>>    manufacturing_controllerxml.patch .
>>>
>>> - Move
>>> webapp/manufacturing/jobshopmt/ShowProductionRun.bsh
>>> to
>>>    scripts/org/ofbiz/manufacturing/jobshopmgt .
>>>
>>> - Copy from webapp/manufacturing/ to
>>> webapp/manufacturing2/ files
>>>    jobshopmgt/ProductionRunForms.xml and
>>> routing/CalendarForms.xml
>>>
>>> For the other applications, just go to their
>>> webapp/<webappname>/WEB-INF/actions/ folder, and do
>>> a grep for "htmlformwrapper". Also, do a grep for
>>> "<event type=\"bsf". You'll want to copy over those .bsh files  
>>> that are invoked with a non-null
>>> "path" value. (In the above Manufacturing example, I moved the  
>>> file into script folder. I
>>> don't recommend moving files around like that.)
>>>
>>> Hmm. Come to think of it, you'd be better off just
>>> duplicating all of the webapps. That'll cost you just 7MB per  
>>> "virtual instance". Moreover, you
>>> never know when the OFBiz developers will add in new instances of  
>>> the above pattern to break your
>>> "virtual instances". There's at least 1 tricky connection if you  
>>> intend to have the trimmest
>>> deployment: CRMSFA links to Order module.
>>>
>>> For those who are doing "virtual instance"
>>> deployments like this, watch out for broken functionalities.  
>>> There are at least a score of them.
>>>
>>> Jonathon
>>>
>>> Jonathon -- Improov wrote:
>>>> Hi Andrew,
>>>>
>>>> Copying just the web.xml and controller.xml worked
>>> for every application
>>>> except Manufacturing. So it wasn't my imagination
>>> after all.
>>>> Is there any way to specify a non-webapp resource
>>> for HtmlFormWrapper?
>>>> If not, what is the alternative. Jacopo (who takes
>>> care of the
>>>> Manufacturing module?) might want to look into
>>> this too.
>>>> Jonathon
>>>>
>>>> Jonathon -- Improov wrote:
>>>>> Andrew,
>>>>>
>>>>> Got on fine. You're right, I just needed the
>>> web.xml and
>>>>> controller.xml . I was testing with
>>> /manufacturing/control (without
>>>>> /main), and I thought it didn't work.
>>>>>
>>>>> Now I can set up 2-3 virtual instances of OFBiz
>>> with no more cost than
>>>>> one physical instance! That's all I require for
>>> my testing needs.
>>>>> Well, of course, there's harddisk space required
>>> for MySQL databases
>>>>> (100-300MB for each virtual instance).
>>>>>
>>>>> I suspect RAM costs is the same as for one
>>> physical instance. After
>>>>> all, this isn't EJB.
>>>>>
>>>>> Thanks, Andrew! I hope Torsten is reading these.
>>> He's been asking
>>>>> about this topic for some time now, I think. A
>>> little later, I'll try
>>>>> to put up some documentation.
>>>>>
>>>>> There's still no clean way to deploy 2 different
>>> versions of OFBiz on
>>>>> a single catalina engine, though. But I suppose I
>>> can try to view
>>>>> OFBiz as a collection of softwares (modules),
>>> rather than a single
>>>>> simple entity.
>>>>
>>>
>


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Running OFBiz in Tomcat, without embedded container

Andrew Sykes
In reply to this post by jonwimp
Jonathon, Chris,

I'm not aware of anything unsettling in the way Jonathon is using the
ML.

It's true that he's asking questions that have been covered before or
are documented, but I think that using documentation and ML archives etc
are just another part of the initial learning curve with OfBiz. Bear in
mind that newbies either ask basic questions, or make no contact at all,
I'd rather know that newbies existed, it's our chance to extend a
welcome.

Also, I've noticed that regardless of whether I ask a question after two
minutes of research or two weeks, I invariably find the answer for
myself around the same time as someone says RTFM! - It's just one of the
foibles of existence ;-)

- Andrew


On Wed, 2007-01-10 at 10:45 -0800, Chris Howe wrote:

> Jonathon,
>
> I'm conflicted.  I can't speak for others, but this is
> my take.  
>
> Generally, I'm more than happy to point people new to
> OFBiz in the direction to find a solution.  Oftentimes
> I even mistakenly coddle too much and provide a
> solution that lets them get in over their head without
> the understanding of why some things work the way they
> do.  I must say, I don't feel inclined to provide you
> with very much help and I can't quite put my finger on
> the exact why of it.  I suspect it's your claim that
> you've read everything and exhausted your search for
> the answer before diving into the code and then your
> disdain for the way some solutions are structured.
> But I can't be sure if that's the entirety of my
> disinclination.  However, this is the perfect example
> of such scenario.  Running multiple instances of Ofbiz
> has been addressed a number of times.  BJ Freeman
> wrote up a how to on his experience (although with the
> change from jetty to tomcat, some of it is old, but
> should be similar) it's located in the old wiki that
> is referenced on the ofbiz.org website.  
>
> This particular issue about the HtmlFormWrapper used
> in beanshell scripts has already been outline in
> http://issues.apache.org/jira/browse/OFBIZ-278
>
> which was brought over from the old JIRA.
>
> While I'd be one of the first to agree that
> documentation is still largely dispersed, it is
> getting much better.  There really hasn't been one
> issue that you've brought up that hasn't been
> addressed in either the
> Apache OFBiz mailing lists
> Apache Ofbiz Jira
> https://issues.apache.org/jira/browse/OFBIZ
> docs.ofbiz.org
> the old wiki http://ofbizwiki.go-integral.com/
> or the old mailing lists:
> http://lists.ofbiz.org/
>
> with additional tips being provided by a handful of
> other sources.  All of these are on the ofbiz.org
> site.  I think I'd be happy to point out exactly where
> things are documented for a particular problem if
> you'd ask for help in a manner that didn't seem as if
> you have already read them and the information
> provided was insufficient.
>
> I think my rant is done now.
>
> --- Jonathon -- Improov <[hidden email]> wrote:
>
> > Hi Andrew,
> >
> > More observations. Seems like it's a bad idea to
> > have widget/*.xml refer to
> > webapp/manufacturing/WEB-INF/actions/*.bsh that in
> > turn use HtmlFormWrapper. It appears the
> > HtmlFormWrapper can only read files under the webapp
> > folder.
> >
> > I tried changing the 2 WEB-INF/web.xml files to have
> > different dispatchers for each webapp
> > (manufacturing and manufacturing2). I checked the
> > logs to see that there are 2 messges: "Created
> > dispatcher for: manufacturing" and "Created
> > dispatcher for: manufacturing2". No go. Tried making
> >
> > them the same. No go.
> >
> > All that's left is to copy the 2 affected .xml files
> > over. The 2 files are read by *.bsh files in
> > webapp/manufacturing/WEB-INF/actions/:
> > jobshopmgt/EditProductionRun.bsh and
> > routing/ListCalendarWeek.bsh . They read 2 .xml
> > files in webapp/manufacturing/:
> > jobshopmgt/ProductionRunForms.xml and and
> > routing/CalendarForms.xml .
> >
> > To Torsten,
> >
> > Here's what you'll need to get Manufacturing working
> > with Andrew's "single OFBiz multiple
> > databases/domains" method:
> >
> > In applications/manufacturing/
> >
> > - Patch webapp/manufacturing/WEB-INF/controller.xml
> > with
> >    manufacturing_controllerxml.patch .
> >
> > - Move
> > webapp/manufacturing/jobshopmt/ShowProductionRun.bsh
> > to
> >    scripts/org/ofbiz/manufacturing/jobshopmgt .
> >
> > - Copy from webapp/manufacturing/ to
> > webapp/manufacturing2/ files
> >    jobshopmgt/ProductionRunForms.xml and
> > routing/CalendarForms.xml
> >
> > For the other applications, just go to their
> > webapp/<webappname>/WEB-INF/actions/ folder, and do
> > a
> > grep for "htmlformwrapper". Also, do a grep for
> > "<event type=\"bsf". You'll want to copy over
> > those .bsh files that are invoked with a non-null
> > "path" value. (In the above Manufacturing
> > example, I moved the file into script folder. I
> > don't recommend moving files around like that.)
> >
> > Hmm. Come to think of it, you'd be better off just
> > duplicating all of the webapps. That'll cost
> > you just 7MB per "virtual instance". Moreover, you
> > never know when the OFBiz developers will add
> > in new instances of the above pattern to break your
> > "virtual instances". There's at least 1 tricky
> > connection if you intend to have the trimmest
> > deployment: CRMSFA links to Order module.
> >
> > For those who are doing "virtual instance"
> > deployments like this, watch out for broken
> > functionalities. There are at least a score of them.
> >
> > Jonathon
> >
> > Jonathon -- Improov wrote:
> > > Hi Andrew,
> > >
> > > Copying just the web.xml and controller.xml worked
> > for every application
> > > except Manufacturing. So it wasn't my imagination
> > after all.
> > >
> > > Is there any way to specify a non-webapp resource
> > for HtmlFormWrapper?
> > > If not, what is the alternative. Jacopo (who takes
> > care of the
> > > Manufacturing module?) might want to look into
> > this too.
> > >
> > > Jonathon
> > >
> > > Jonathon -- Improov wrote:
> > >> Andrew,
> > >>
> > >> Got on fine. You're right, I just needed the
> > web.xml and
> > >> controller.xml . I was testing with
> > /manufacturing/control (without
> > >> /main), and I thought it didn't work.
> > >>
> > >> Now I can set up 2-3 virtual instances of OFBiz
> > with no more cost than
> > >> one physical instance! That's all I require for
> > my testing needs.
> > >> Well, of course, there's harddisk space required
> > for MySQL databases
> > >> (100-300MB for each virtual instance).
> > >>
> > >> I suspect RAM costs is the same as for one
> > physical instance. After
> > >> all, this isn't EJB.
> > >>
> > >> Thanks, Andrew! I hope Torsten is reading these.
> > He's been asking
> > >> about this topic for some time now, I think. A
> > little later, I'll try
> > >> to put up some documentation.
> > >>
> > >> There's still no clean way to deploy 2 different
> > versions of OFBiz on
> > >> a single catalina engine, though. But I suppose I
> > can try to view
> > >> OFBiz as a collection of softwares (modules),
> > rather than a single
> > >> simple entity.
> > >
> > >
> >
> >
>
--
Kind Regards
Andrew Sykes <[hidden email]>
Sykes Development Ltd
http://www.sykesdevelopment.com

12