Sending mails to contact lists

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

RE: Service Synchronization

SkipDever
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:[hidden email]]
Sent: Friday, March 14, 2008 1:27 AM
To: [hidden email]
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 <[hidden email]> 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:[hidden email]]
> Sent: Monday, March 10, 2008 7:55 PM
> To: [hidden email]
> 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:[hidden email]]
> > Sent: Monday, March 10, 2008 6:38 PM
> > To: [hidden email]
> > 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

Reply | Threaded
Open this post in threaded view
|

runAsync

SkipDever
In reply to this post by Vikas Mayur-2
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

Reply | Threaded
Open this post in threaded view
|

ftl refresh

SkipDever
In reply to this post by Vikas Mayur-2
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

Reply | Threaded
Open this post in threaded view
|

Re: ftl refresh

Jacques Le Roux
Administrator
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" <[hidden email]>

>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
>

Reply | Threaded
Open this post in threaded view
|

Re: runAsync

Bilgin Ibryam
In reply to this post by SkipDever
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

Reply | Threaded
Open this post in threaded view
|

RE: ftl refresh

SkipDever
In reply to this post by Jacques Le Roux
Thankyou Jacques

Don't know how I missed that.

Skip

-----Original Message-----
From: Jacques Le Roux [mailto:[hidden email]]
Sent: Sunday, March 16, 2008 3:11 PM
To: [hidden email]
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" <[hidden email]>

>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

Reply | Threaded
Open this post in threaded view
|

RE: runAsync

SkipDever
In reply to this post by Bilgin Ibryam
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:[hidden email]]
Sent: Monday, March 17, 2008 2:28 AM
To: [hidden email]
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

Reply | Threaded
Open this post in threaded view
|

RE: runAsync

SkipDever
In reply to this post by Bilgin Ibryam
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:[hidden email]]
Sent: Monday, March 17, 2008 2:28 AM
To: [hidden email]
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

12