You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by "skip@thedevers" <sk...@thedevers.org> on 2008/03/11 01:37:01 UTC

Service Synchronization

I have a few services that take from 4 to 8 hours to complete with the large data sets I am dealing with.  I want to synchronize those services so it is impossible to start them if they are already running.  My plan is to create a new entity to hold the service name, start time, stop time, etc and have the service read the entity record to see if it is already running.

However, I know that entity records are frequently cached.  Is there a setting in the entity definition to never cache or some easy method to force the cache for the entity to clear?

Skip

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.21.4/1313 - Release Date: 3/5/2008 9:50 AM
 


RE: ftl refresh

Posted by "skip@thedevers" <sk...@thedevers.org>.
Thankyou Jacques

Don't know how I missed that.

Skip

-----Original Message-----
From: Jacques Le Roux [mailto:jacques.le.roux@les7arts.com]
Sent: Sunday, March 16, 2008 3:11 PM
To: user@ofbiz.apache.org
Subject: Re: ftl refresh


http://docs.ofbiz.org/display/OFBTECH/Apache+OFBiz+Technical+Production+Setu
p+Guide#ApacheOFBizTechnicalProductionSetupGuide-CacheSettings

Look at template at end end of cache.properties ;o)

Jacques

From: "skip@thedevers" <sk...@thedevers.org>
>I am in debug mode on a complex ftl file and I am currently having to stop
> and restart ofbiz for every change I make.  Is there some setting or
> something to not cache the ftl?
>
> Skip
> No virus found in this outgoing message.
> Checked by AVG.
> Version: 7.5.519 / Virus Database: 269.21.7/1329 - Release Date: 3/14/2008
> 12:33 PM
>


No virus found in this incoming message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.7/1329 - Release Date: 3/14/2008
12:33 PM

No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.7/1329 - Release Date: 3/14/2008
12:33 PM


Re: ftl refresh

Posted by Jacques Le Roux <ja...@les7arts.com>.
http://docs.ofbiz.org/display/OFBTECH/Apache+OFBiz+Technical+Production+Setup+Guide#ApacheOFBizTechnicalProductionSetupGuide-CacheSettings

Look at template at end end of cache.properties ;o)

Jacques

From: "skip@thedevers" <sk...@thedevers.org>
>I am in debug mode on a complex ftl file and I am currently having to stop
> and restart ofbiz for every change I make.  Is there some setting or
> something to not cache the ftl?
>
> Skip
> No virus found in this outgoing message.
> Checked by AVG.
> Version: 7.5.519 / Virus Database: 269.21.7/1329 - Release Date: 3/14/2008
> 12:33 PM
> 


ftl refresh

Posted by "skip@thedevers" <sk...@thedevers.org>.
I am in debug mode on a complex ftl file and I am currently having to stop
and restart ofbiz for every change I make.  Is there some setting or
something to not cache the ftl?

Skip
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.7/1329 - Release Date: 3/14/2008
12:33 PM


RE: Service Synchronization

Posted by "skip@thedevers" <sk...@thedevers.org>.
Hmmm

Well, this semaphone attribute tag does not exist in the version I am
working with.  It must have been added since I did my last svn get last
year.  The problem I face is that I am in beta now for a month with the
current client and I don't think they are going to want to re-validate the
entire suite.

So, I'll do something quick and dirty as an interim.

Perhaps I'll download the latest code and see if I can retrofit it.

Skip

-----Original Message-----
From: Vikas Mayur [mailto:vikasmayur@gmail.com]
Sent: Friday, March 14, 2008 1:27 AM
To: user@ofbiz.apache.org
Subject: Re: Service Synchronization


Doing a search for semaphore in *.* (global search), it shows many results.
Few of them are :

In framework/service/dtd/services.xsd

        <xs:attribute name="semaphore" default="none">
            <xs:simpleType>
                <xs:restriction base="xs:token">
                    <xs:enumeration value="none"/>
                    <xs:enumeration value="fail"/>
                    <xs:enumeration value="wait"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>


In framework/service/servicedef/services.xml

    <!-- Service Engine Services -->
    <service name="purgeOldJobs" engine="java"
            location="org.ofbiz.service.ServiceUtil" invoke="purgeOldJobs"
auth="true" use-transaction="false" semaphore="wait">


It has to some thing wrong with your search.

Vikas



On Fri, Mar 14, 2008 at 8:52 AM, skip@thedevers <sk...@thedevers.org> wrote:

> David
>
> I cannot find the use for semaphore in any document I can lay my hands on.
> I looked in ALL the files using a global search for "semaphore" as well as
> looking manually in framework\service\dtd\*.* and can find nothing.
>
> I also re-read http://ofbiz.apache.org/docs/services.html
>
> Can you point me to another document I am missing?  I would also think
> that
> searching the java files for semaphore would have turned up something.
>
> Is this something newer than 1Jan2008 as that is the last time I got a
> build.
>
> Skip
>
> -----Original Message-----
> From: David E Jones [mailto:jonesde@hotwaxmedia.com]
> Sent: Monday, March 10, 2008 7:55 PM
> To: user@ofbiz.apache.org
> Subject: Re: Service Synchronization
>
>
>
> Check out the "semaphore" attribute on the service element/tag in the
> service def XML file. In other words, you just specify how it should
> behave on the service definition.
>
> -David
>
>
> On Mar 10, 2008, at 8:54 PM, skip@thedevers wrote:
>
> > Can you point me to the entity name or how to call the service start?
> > Doesn't make much sense writing something new that already exists.
> >
> > Skip
> >
> > -----Original Message-----
> > From: David E Jones [mailto:jonesde@hotwaxmedia.com]
> > Sent: Monday, March 10, 2008 6:38 PM
> > To: user@ofbiz.apache.org
> > Subject: Re: Service Synchronization
> >
> >
> >
> > This feature already exists in the Service Engine, BTW.
> >
> > -David
> >
> >
> > On Mar 10, 2008, at 6:37 PM, skip@thedevers wrote:
> >
> >> I have a few services that take from 4 to 8 hours to complete with
> >> the large data sets I am dealing with.  I want to synchronize those
> >> services so it is impossible to start them if they are already
> >> running.  My plan is to create a new entity to hold the service
> >> name, start time, stop time, etc and have the service read the
> >> entity record to see if it is already running.
> >>
> >> However, I know that entity records are frequently cached.  Is there
> >> a setting in the entity definition to never cache or some easy
> >> method to force the cache for the entity to clear?
> >>
> >> Skip
> >>
> >> No virus found in this outgoing message.
> >> Checked by AVG Free Edition.
> >> Version: 7.5.516 / Virus Database: 269.21.4/1313 - Release Date:
> >> 3/5/2008 9:50 AM
> >>
> >>
> >
> >
> > No virus found in this incoming message.
> > Checked by AVG Free Edition.
> > Version: 7.5.516 / Virus Database: 269.21.4/1313 - Release Date:
> > 3/5/2008
> > 9:50 AM
> >
> > No virus found in this outgoing message.
> > Checked by AVG Free Edition.
> > Version: 7.5.516 / Virus Database: 269.21.4/1313 - Release Date:
> > 3/5/2008
> > 9:50 AM
> >
>
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.516 / Virus Database: 269.21.4/1313 - Release Date: 3/5/2008
> 9:50 AM
>
> No virus found in this outgoing message.
> Checked by AVG.
> Version: 7.5.518 / Virus Database: 269.21.7/1324 - Release Date: 3/10/2008
> 7:27 PM
>
>

No virus found in this incoming message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.7/1327 - Release Date: 3/12/2008
1:27 PM

No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.7/1327 - Release Date: 3/12/2008
1:27 PM


RE: runAsync

Posted by "skip@thedevers" <sk...@thedevers.org>.
Once again, thanks Belgin.  This worked a charm.  Now all we need is a way
to set a lower priority on the thread.

Skip

-----Original Message-----
From: Bilgin Ibryam [mailto:bibryam@iguanait.com]
Sent: Monday, March 17, 2008 2:28 AM
To: user@ofbiz.apache.org
Subject: Re: runAsync


On Sat, 2008-03-15 at 14:19 -0700, skip@thedevers wrote:
> I am calling dispatcher.runAsync("computeEOQRequirements", context); from

> Is there any way to control this startup time?

You can call the service async w/o persisting it, like this:

dispatcher.runAsync("computeEOQRequirements", context, false);

Bilgin


No virus found in this incoming message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.7/1329 - Release Date: 3/14/2008
12:33 PM

No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.7/1329 - Release Date: 3/14/2008
12:33 PM


RE: runAsync

Posted by "skip@thedevers" <sk...@thedevers.org>.
Thanks Bilgin.

I saw that method, but didn't think that was what I was after.  I'll give it
a try.

Skip

-----Original Message-----
From: Bilgin Ibryam [mailto:bibryam@iguanait.com]
Sent: Monday, March 17, 2008 2:28 AM
To: user@ofbiz.apache.org
Subject: Re: runAsync


On Sat, 2008-03-15 at 14:19 -0700, skip@thedevers wrote:
> I am calling dispatcher.runAsync("computeEOQRequirements", context); from

> Is there any way to control this startup time?

You can call the service async w/o persisting it, like this:

dispatcher.runAsync("computeEOQRequirements", context, false);

Bilgin


No virus found in this incoming message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.7/1329 - Release Date: 3/14/2008
12:33 PM

No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.7/1329 - Release Date: 3/14/2008
12:33 PM


Re: runAsync

Posted by Bilgin Ibryam <bi...@iguanait.com>.
On Sat, 2008-03-15 at 14:19 -0700, skip@thedevers wrote:
> I am calling dispatcher.runAsync("computeEOQRequirements", context); from

> Is there any way to control this startup time?

You can call the service async w/o persisting it, like this:

dispatcher.runAsync("computeEOQRequirements", context, false);

Bilgin


runAsync

Posted by "skip@thedevers" <sk...@thedevers.org>.
I am calling dispatcher.runAsync("computeEOQRequirements", context); from
another service to start the job up asynchronously.  I have code in
computeEOQRequirements that writes to stdout whenever it first starts.  It
seems that it takes like 4 seconds on a fairly skookum machine for it to
begin.  The same service runs like instantly when called from the Run
Service button of the Web Tools interface.

The intent is to start the job now, but have it run in it's own thread so
the UI can be interactive for what might be an hour long computation.

Is there any way to control this startup time?

Is there any way to control the thread priority of the job?

Skip
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.7/1327 - Release Date: 3/12/2008
1:27 PM


Re: Service Synchronization

Posted by Vikas Mayur <vi...@gmail.com>.
Doing a search for semaphore in *.* (global search), it shows many results.
Few of them are :

In framework/service/dtd/services.xsd

        <xs:attribute name="semaphore" default="none">
            <xs:simpleType>
                <xs:restriction base="xs:token">
                    <xs:enumeration value="none"/>
                    <xs:enumeration value="fail"/>
                    <xs:enumeration value="wait"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>


In framework/service/servicedef/services.xml

    <!-- Service Engine Services -->
    <service name="purgeOldJobs" engine="java"
            location="org.ofbiz.service.ServiceUtil" invoke="purgeOldJobs"
auth="true" use-transaction="false" semaphore="wait">


It has to some thing wrong with your search.

Vikas



On Fri, Mar 14, 2008 at 8:52 AM, skip@thedevers <sk...@thedevers.org> wrote:

> David
>
> I cannot find the use for semaphore in any document I can lay my hands on.
> I looked in ALL the files using a global search for "semaphore" as well as
> looking manually in framework\service\dtd\*.* and can find nothing.
>
> I also re-read http://ofbiz.apache.org/docs/services.html
>
> Can you point me to another document I am missing?  I would also think
> that
> searching the java files for semaphore would have turned up something.
>
> Is this something newer than 1Jan2008 as that is the last time I got a
> build.
>
> Skip
>
> -----Original Message-----
> From: David E Jones [mailto:jonesde@hotwaxmedia.com]
> Sent: Monday, March 10, 2008 7:55 PM
> To: user@ofbiz.apache.org
> Subject: Re: Service Synchronization
>
>
>
> Check out the "semaphore" attribute on the service element/tag in the
> service def XML file. In other words, you just specify how it should
> behave on the service definition.
>
> -David
>
>
> On Mar 10, 2008, at 8:54 PM, skip@thedevers wrote:
>
> > Can you point me to the entity name or how to call the service start?
> > Doesn't make much sense writing something new that already exists.
> >
> > Skip
> >
> > -----Original Message-----
> > From: David E Jones [mailto:jonesde@hotwaxmedia.com]
> > Sent: Monday, March 10, 2008 6:38 PM
> > To: user@ofbiz.apache.org
> > Subject: Re: Service Synchronization
> >
> >
> >
> > This feature already exists in the Service Engine, BTW.
> >
> > -David
> >
> >
> > On Mar 10, 2008, at 6:37 PM, skip@thedevers wrote:
> >
> >> I have a few services that take from 4 to 8 hours to complete with
> >> the large data sets I am dealing with.  I want to synchronize those
> >> services so it is impossible to start them if they are already
> >> running.  My plan is to create a new entity to hold the service
> >> name, start time, stop time, etc and have the service read the
> >> entity record to see if it is already running.
> >>
> >> However, I know that entity records are frequently cached.  Is there
> >> a setting in the entity definition to never cache or some easy
> >> method to force the cache for the entity to clear?
> >>
> >> Skip
> >>
> >> No virus found in this outgoing message.
> >> Checked by AVG Free Edition.
> >> Version: 7.5.516 / Virus Database: 269.21.4/1313 - Release Date:
> >> 3/5/2008 9:50 AM
> >>
> >>
> >
> >
> > No virus found in this incoming message.
> > Checked by AVG Free Edition.
> > Version: 7.5.516 / Virus Database: 269.21.4/1313 - Release Date:
> > 3/5/2008
> > 9:50 AM
> >
> > No virus found in this outgoing message.
> > Checked by AVG Free Edition.
> > Version: 7.5.516 / Virus Database: 269.21.4/1313 - Release Date:
> > 3/5/2008
> > 9:50 AM
> >
>
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.516 / Virus Database: 269.21.4/1313 - Release Date: 3/5/2008
> 9:50 AM
>
> No virus found in this outgoing message.
> Checked by AVG.
> Version: 7.5.518 / Virus Database: 269.21.7/1324 - Release Date: 3/10/2008
> 7:27 PM
>
>

Product cost entity

Posted by "skip@thedevers" <sk...@thedevers.org>.
When we sell a product, there are lots of ways to set the price we sell it
at.

Are there any similiar entities to store costs, eg. supplier price breaks at
quantity levels, special promotions, etc.

My current industry does this and I am about to create a new entity to
associate with SupplierProduct similiar to ProductPrice to allow the
purchasing person the opportunity to take advantage of quantity price
breaks.  If an entity or service already exists to support this, I would
prefer to use it.

I have looked, but do not find anything.  Does anyone know of something?

Skip
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.21.4/1313 - Release Date: 3/5/2008
9:50 AM


RE: Service Synchronization

Posted by "skip@thedevers" <sk...@thedevers.org>.
David

I cannot find the use for semaphore in any document I can lay my hands on.
I looked in ALL the files using a global search for "semaphore" as well as
looking manually in framework\service\dtd\*.* and can find nothing.

I also re-read http://ofbiz.apache.org/docs/services.html

Can you point me to another document I am missing?  I would also think that
searching the java files for semaphore would have turned up something.

Is this something newer than 1Jan2008 as that is the last time I got a
build.

Skip

-----Original Message-----
From: David E Jones [mailto:jonesde@hotwaxmedia.com]
Sent: Monday, March 10, 2008 7:55 PM
To: user@ofbiz.apache.org
Subject: Re: Service Synchronization



Check out the "semaphore" attribute on the service element/tag in the
service def XML file. In other words, you just specify how it should
behave on the service definition.

-David


On Mar 10, 2008, at 8:54 PM, skip@thedevers wrote:

> Can you point me to the entity name or how to call the service start?
> Doesn't make much sense writing something new that already exists.
>
> Skip
>
> -----Original Message-----
> From: David E Jones [mailto:jonesde@hotwaxmedia.com]
> Sent: Monday, March 10, 2008 6:38 PM
> To: user@ofbiz.apache.org
> Subject: Re: Service Synchronization
>
>
>
> This feature already exists in the Service Engine, BTW.
>
> -David
>
>
> On Mar 10, 2008, at 6:37 PM, skip@thedevers wrote:
>
>> I have a few services that take from 4 to 8 hours to complete with
>> the large data sets I am dealing with.  I want to synchronize those
>> services so it is impossible to start them if they are already
>> running.  My plan is to create a new entity to hold the service
>> name, start time, stop time, etc and have the service read the
>> entity record to see if it is already running.
>>
>> However, I know that entity records are frequently cached.  Is there
>> a setting in the entity definition to never cache or some easy
>> method to force the cache for the entity to clear?
>>
>> Skip
>>
>> No virus found in this outgoing message.
>> Checked by AVG Free Edition.
>> Version: 7.5.516 / Virus Database: 269.21.4/1313 - Release Date:
>> 3/5/2008 9:50 AM
>>
>>
>
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.516 / Virus Database: 269.21.4/1313 - Release Date:
> 3/5/2008
> 9:50 AM
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.516 / Virus Database: 269.21.4/1313 - Release Date:
> 3/5/2008
> 9:50 AM
>


No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.21.4/1313 - Release Date: 3/5/2008
9:50 AM

No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.518 / Virus Database: 269.21.7/1324 - Release Date: 3/10/2008
7:27 PM


Re: Service Synchronization

Posted by David E Jones <jo...@hotwaxmedia.com>.
Check out the "semaphore" attribute on the service element/tag in the  
service def XML file. In other words, you just specify how it should  
behave on the service definition.

-David


On Mar 10, 2008, at 8:54 PM, skip@thedevers wrote:

> Can you point me to the entity name or how to call the service start?
> Doesn't make much sense writing something new that already exists.
>
> Skip
>
> -----Original Message-----
> From: David E Jones [mailto:jonesde@hotwaxmedia.com]
> Sent: Monday, March 10, 2008 6:38 PM
> To: user@ofbiz.apache.org
> Subject: Re: Service Synchronization
>
>
>
> This feature already exists in the Service Engine, BTW.
>
> -David
>
>
> On Mar 10, 2008, at 6:37 PM, skip@thedevers wrote:
>
>> I have a few services that take from 4 to 8 hours to complete with
>> the large data sets I am dealing with.  I want to synchronize those
>> services so it is impossible to start them if they are already
>> running.  My plan is to create a new entity to hold the service
>> name, start time, stop time, etc and have the service read the
>> entity record to see if it is already running.
>>
>> However, I know that entity records are frequently cached.  Is there
>> a setting in the entity definition to never cache or some easy
>> method to force the cache for the entity to clear?
>>
>> Skip
>>
>> No virus found in this outgoing message.
>> Checked by AVG Free Edition.
>> Version: 7.5.516 / Virus Database: 269.21.4/1313 - Release Date:
>> 3/5/2008 9:50 AM
>>
>>
>
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.516 / Virus Database: 269.21.4/1313 - Release Date:  
> 3/5/2008
> 9:50 AM
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.516 / Virus Database: 269.21.4/1313 - Release Date:  
> 3/5/2008
> 9:50 AM
>


RE: Service Synchronization

Posted by "skip@thedevers" <sk...@thedevers.org>.
Can you point me to the entity name or how to call the service start?
Doesn't make much sense writing something new that already exists.

Skip

-----Original Message-----
From: David E Jones [mailto:jonesde@hotwaxmedia.com]
Sent: Monday, March 10, 2008 6:38 PM
To: user@ofbiz.apache.org
Subject: Re: Service Synchronization



This feature already exists in the Service Engine, BTW.

-David


On Mar 10, 2008, at 6:37 PM, skip@thedevers wrote:

> I have a few services that take from 4 to 8 hours to complete with
> the large data sets I am dealing with.  I want to synchronize those
> services so it is impossible to start them if they are already
> running.  My plan is to create a new entity to hold the service
> name, start time, stop time, etc and have the service read the
> entity record to see if it is already running.
>
> However, I know that entity records are frequently cached.  Is there
> a setting in the entity definition to never cache or some easy
> method to force the cache for the entity to clear?
>
> Skip
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.516 / Virus Database: 269.21.4/1313 - Release Date:
> 3/5/2008 9:50 AM
>
>


No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.21.4/1313 - Release Date: 3/5/2008
9:50 AM

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.21.4/1313 - Release Date: 3/5/2008
9:50 AM


Re: Service Synchronization

Posted by David E Jones <jo...@hotwaxmedia.com>.
This feature already exists in the Service Engine, BTW.

-David


On Mar 10, 2008, at 6:37 PM, skip@thedevers wrote:

> I have a few services that take from 4 to 8 hours to complete with  
> the large data sets I am dealing with.  I want to synchronize those  
> services so it is impossible to start them if they are already  
> running.  My plan is to create a new entity to hold the service  
> name, start time, stop time, etc and have the service read the  
> entity record to see if it is already running.
>
> However, I know that entity records are frequently cached.  Is there  
> a setting in the entity definition to never cache or some easy  
> method to force the cache for the entity to clear?
>
> Skip
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.516 / Virus Database: 269.21.4/1313 - Release Date:  
> 3/5/2008 9:50 AM
>
>