I see where you're going with this now, and I don't like it.
Have you tested an update with this? Do you know what will happen? No.
So, either trust me or look back at the comments where I introduced
this to find out. I'll tell you what happens: each time the seed data
is reloaded a new job will be created and the old job (if it has been
run at least once) will still be there, meaning that each time the job
data is reloaded it will lead to more and more of the job running.
This was found through painful experience where a client had around 30
of certain jobs running redundantly.
This is the very sort of reason why I wrote this as Rule #2 for a
committer (http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Committers+Roles+and+Responsibilities
):
"Rule #2 for a committer is the same as for a scientist: read before
you write. When you're getting started a good time ratio for read to
write is around 20 to 1. Once you're a total OFBiz pro who knows as
much as any living person about the project, you can probably reduce
that to about 3 to 1. This relates to respecting precedent. It doesn't
mean that existing things can't or shouldn't be changed, but it does
mean that things that already exist must be understood before they are
changed. This also relates to recognizing that whatever you are doing
chances are there are best practices or patterns already established.
So, this means you should look for those and try to understand them
and if necessary ask about them explaining what you are trying to do
before you seek to establish your own pattern."
I'm being very forward about this because it's a pattern of behavior
that is common to all of us unless we learn better and always watch
out for it, and it is one that does uncountable harm. It is also
something that gets in the way of people working together in a
community (ie people not respecting and trying to understand what
others are doing or have done).
When initially setting up a system all seed and seed-initial data
should be loaded, as described in the various comments about them. So,
I don't see the problem that you described.
I'm going to change this back now so no one else is harmed by it
unless they decide to change it.
-David
On Jan 11, 2009, at 10:18 PM, Hans Bakker wrote:
David,
I did this because i suspected that the data has been changed. and
anyhow when the data will be updated in the future it will simply
overwrite what is there? so what is the harm having it in seed data?
It is an essential part of the system....other wise mail will not go
out...if it is not used it will do no harm and hardly takes any system
resources. So i think there is a good reason for doing this.
i also saw that the scheduled job for fixed assets also is in seed
data...
regards,
Hans
On Sun, 2009-01-11 at 21:18 -0800, David E Jones wrote:
Hans,
Could explain why you made this change?
Generally we want things like scheduled jobs to be loaded once and
not
every time a software update is done, meaning it should be in seed-
initial and not in seed.
For more information on the different data readers, check out the
build.xml file in the ofbiz.home directory, specifically the comments
for the run-install-seed, run-install-extseed, and run-install-
exttest
targets. To help clarify this I have also added more comments to the
entityengine.xml file where these are declared.
Unless there is a good reason for this change that I'm missing, and
you understand all of this, please revert it (or I can certainly do
it
too).
-David
On Jan 11, 2009, at 9:01 PM, [email protected] wrote:
Author: hansbak
Date: Sun Jan 11 21:01:01 2009
New Revision: 733624
URL: http://svn.apache.org/viewvc?rev=733624&view=rev
Log:
change sheduled jobs to seed data
Modified:
ofbiz/trunk/applications/party/ofbiz-component.xml
Modified: ofbiz/trunk/applications/party/ofbiz-component.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/ofbiz-component.xml?rev=733624&r1=733623&r2=733624&view=diff
=
=
=
=
=
=
=
=
=
=
====================================================================
--- ofbiz/trunk/applications/party/ofbiz-component.xml (original)
+++ ofbiz/trunk/applications/party/ofbiz-component.xml Sun Jan 11
21:01:01 2009
@@ -29,7 +29,7 @@
<entity-resource type="model" reader-name="main" loader="main"
location="entitydef/entitymodel.xml"/>
<entity-resource type="data" reader-name="seed" loader="main"
location="data/PartyTypeData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main"
location="data/PartySecurityData.xml"/>
- <entity-resource type="data" reader-name="seed-initial"
loader="main" location="data/ScheduledJobs.xml"/>
+ <entity-resource type="data" reader-name="seed" loader="main"
location="data/ScheduledJobs.xml"/>
<service-resource type="model" loader="main"
location="servicedef/services.xml"/>
<service-resource type="model" loader="main"
location="servicedef/services_view.xml"/>
<service-resource type="eca" loader="main" location="servicedef/
secas.xml"/>
--
Antwebsystems.com: Quality OFBiz services for competitive prices