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 <[EMAIL PROTECTED]> 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.