You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Hansen Wang <ha...@gemmall.com> on 2008/03/17 17:42:31 UTC
order shipped email
Hi,
I have been going through the admin webapps looking for places where a
shipping notification email is sent. But I was not able to find that. Is
such function supported out of box from the admin webapps?
Thanks,
Hansen
Re: findListIteratorByCondition Error
Posted by Jacques Le Roux <ja...@les7arts.com>.
Rodrigo,
I think that by
>>In fact most of transaction isolation theory is concerned
>> with how reads will be affected by writes
David meaned that it avoids collisions, or if you prefer it assures security in atomic data level calls. What could happen if
someone would write the same entities at the same time. They are setting for these kind of things at the data level (DB specific if
IIRW) but this is a pain OFBiz is trying to avoid. I may be wrong but in such cases I'm sure David will correct/complete me...
Jacques
From: "Rodrigo Lima" <ac...@gmail.com>
> Transactions for search?
>
> 2008/3/19, David E Jones <jo...@hotwaxmedia.com>:
>>
>>
>> Skip,
>>
>> Transactions are just as important for reading as they are for
>> writing. In fact most of transaction isolation theory is concerned
>> with how reads will be affected by writes.
>>
>> In OFBiz all major operations are wrapped in a transaction by default,
>> even rendering of screens for outgoing information (typically in a
>> separate transaction than the events processing incoming data). Most
>> entity engine operations get wrapped in a transaction if there is not
>> one in place, but it can't do that with the EntityListIterator calls
>> because the transaction needs to stay open until the ELI and the
>> ResultSet associated with it is closed.
>>
>> In a busy server environment you'll probably run into database errors
>> related to this, but it depends on your traffic and the database you
>> use.
>>
>> But yes, this IS important and was added because production errors
>> became common before this was added.
>>
>> -David
>>
>>
>> On Mar 18, 2008, at 8:48 PM, skip@thedevers wrote:
>>
>> > Jacopo
>> >
>> > I guess my question should be rephrased.
>> >
>> > "Why does the author think that all findListIteratorByCondition()
>> > calls
>> > should be surrounded with a transaction, particularly in this case
>> > where it
>> > is read-only."
>> >
>> > I just want to make sure I am not missing something. I am quite
>> > happy to
>> > comment out the exception. In this particular case, 150gigs of log
>> > file
>> > were created in one service call to compute stock needs with real
>> > live data
>> > from a big company. I am trying to debug this code and need the
>> > regular
>> > debug output to be sure things are going as I expect.
>> >
>> > If I really need the begin/end, I am happy to do that, I just wanted
>> > to know
>> > why.
>> >
>> > Skip
>> >
>> > -----Original Message-----
>> > From: Jacopo Cappellato [mailto:tiz@sastau.it]
>> > Sent: Tuesday, March 18, 2008 7:13 PM
>> > To: user@ofbiz.apache.org
>> > Subject: Re: findListIteratorByCondition Error
>> >
>> >
>> > skip@thedevers wrote:
>> >> More on this error. Here is the code in GenericDelegator which
>> >> writes the
>> >> error to the log.
>> >>
>> >> //throwing an exception is a little harsh for now, just
>> > display
>> >> a really big error message since we want to get all of these fixed...
>> >> Exception newE = new Exception("Stack Trace");
>> >> Debug.logError(newE, "ERROR: Cannot do a find that
>> >> returns an
>> >> EntityListIterator with no transaction in place. Wrap this call in a
>> >> transaction.", module);
>> >>
>> >>
>> >> As the author desired, it is a REALLY big error. I was writing
>> >> stdout to
>> > a
>> >> file which almost filled up my hard disk with these errors.
>> >>
>> >> Could the author comment on why it is important to do this:
>> >>
>> >> TransactionUtil.begin();
>> >> Map inventory =
>> >> dispatcher.runSync("getInventoryAvailableByFacility",
>> >> UtilMisc.toMap("productId", productId, "facilityId", facilityId));
>> >> TransactionUtil.commit();
>> >>
>> >> I.E. put the begin/commit around the runSync call other than just
>> >> to avoid
>> >> filling up your hard disk?
>> >>
>> >
>> > I'd suggest to avoid redirecting stdout to a file.
>> >
>> > Jacopo
>> >
>> >> Skip
>> >>
>> >>
>> >>
>> >>
>> >> No virus found in this outgoing message.
>> >> Checked by AVG.
>> >> Version: 7.5.519 / Virus Database: 269.21.7/1331 - Release Date:
>> >> 3/16/2008
>> >> 10:34 AM
>> >
>> >
>> > No virus found in this incoming message.
>> > Checked by AVG.
>> > Version: 7.5.519 / Virus Database: 269.21.7/1331 - Release Date:
>> > 3/16/2008
>> > 10:34 AM
>> >
>> > No virus found in this outgoing message.
>> > Checked by AVG.
>> > Version: 7.5.519 / Virus Database: 269.21.7/1331 - Release Date:
>> > 3/16/2008
>> > 10:34 AM
>> >
>>
>>
>
Re: findListIteratorByCondition Error
Posted by Rodrigo Lima <ac...@gmail.com>.
Transactions for search?
2008/3/19, David E Jones <jo...@hotwaxmedia.com>:
>
>
> Skip,
>
> Transactions are just as important for reading as they are for
> writing. In fact most of transaction isolation theory is concerned
> with how reads will be affected by writes.
>
> In OFBiz all major operations are wrapped in a transaction by default,
> even rendering of screens for outgoing information (typically in a
> separate transaction than the events processing incoming data). Most
> entity engine operations get wrapped in a transaction if there is not
> one in place, but it can't do that with the EntityListIterator calls
> because the transaction needs to stay open until the ELI and the
> ResultSet associated with it is closed.
>
> In a busy server environment you'll probably run into database errors
> related to this, but it depends on your traffic and the database you
> use.
>
> But yes, this IS important and was added because production errors
> became common before this was added.
>
> -David
>
>
> On Mar 18, 2008, at 8:48 PM, skip@thedevers wrote:
>
> > Jacopo
> >
> > I guess my question should be rephrased.
> >
> > "Why does the author think that all findListIteratorByCondition()
> > calls
> > should be surrounded with a transaction, particularly in this case
> > where it
> > is read-only."
> >
> > I just want to make sure I am not missing something. I am quite
> > happy to
> > comment out the exception. In this particular case, 150gigs of log
> > file
> > were created in one service call to compute stock needs with real
> > live data
> > from a big company. I am trying to debug this code and need the
> > regular
> > debug output to be sure things are going as I expect.
> >
> > If I really need the begin/end, I am happy to do that, I just wanted
> > to know
> > why.
> >
> > Skip
> >
> > -----Original Message-----
> > From: Jacopo Cappellato [mailto:tiz@sastau.it]
> > Sent: Tuesday, March 18, 2008 7:13 PM
> > To: user@ofbiz.apache.org
> > Subject: Re: findListIteratorByCondition Error
> >
> >
> > skip@thedevers wrote:
> >> More on this error. Here is the code in GenericDelegator which
> >> writes the
> >> error to the log.
> >>
> >> //throwing an exception is a little harsh for now, just
> > display
> >> a really big error message since we want to get all of these fixed...
> >> Exception newE = new Exception("Stack Trace");
> >> Debug.logError(newE, "ERROR: Cannot do a find that
> >> returns an
> >> EntityListIterator with no transaction in place. Wrap this call in a
> >> transaction.", module);
> >>
> >>
> >> As the author desired, it is a REALLY big error. I was writing
> >> stdout to
> > a
> >> file which almost filled up my hard disk with these errors.
> >>
> >> Could the author comment on why it is important to do this:
> >>
> >> TransactionUtil.begin();
> >> Map inventory =
> >> dispatcher.runSync("getInventoryAvailableByFacility",
> >> UtilMisc.toMap("productId", productId, "facilityId", facilityId));
> >> TransactionUtil.commit();
> >>
> >> I.E. put the begin/commit around the runSync call other than just
> >> to avoid
> >> filling up your hard disk?
> >>
> >
> > I'd suggest to avoid redirecting stdout to a file.
> >
> > Jacopo
> >
> >> Skip
> >>
> >>
> >>
> >>
> >> No virus found in this outgoing message.
> >> Checked by AVG.
> >> Version: 7.5.519 / Virus Database: 269.21.7/1331 - Release Date:
> >> 3/16/2008
> >> 10:34 AM
> >
> >
> > No virus found in this incoming message.
> > Checked by AVG.
> > Version: 7.5.519 / Virus Database: 269.21.7/1331 - Release Date:
> > 3/16/2008
> > 10:34 AM
> >
> > No virus found in this outgoing message.
> > Checked by AVG.
> > Version: 7.5.519 / Virus Database: 269.21.7/1331 - Release Date:
> > 3/16/2008
> > 10:34 AM
> >
>
>
FTL / EntityListIterator Question
Posted by "skip@thedevers" <sk...@thedevers.org>.
I have this ftl script that displays a list from an EntityListIterator.
This ftl script has a link on the primary key in the list to display a
second ftl screen showing the details of the fields in the selected
GenericValue from the EntityListIterator.
I have a request to be able to click a button from this detail screen and
show the next or previous record from the EntityListIterator, and thereby
move through the list a record at a time from the detail screen. I am
passing the id field as a parameter to the detail screen and do a
findByPrimaryKey() to get the detail. I can't see any
GenericDelegator.findNext() or anything like it which would be exactly what
I need. The entity can sometimes contain a million records so I would
prefer not to get all the keys and then search through them, especially
considering that I have an active EntityListIterator.
Anyone have any ideas about how to do this? I could load all the keys into
an array and then do a binary search for the passed in key and then get the
next or previous, but that seems like a lot of overhead unless I could keep
this list and position from one request to the next.
Doing this with a fat-client app would be trivial. I cannot see an
elegant way of doing it with a web-app.
Skip
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.7/1333 - Release Date: 3/18/2008
8:10 AM
RE: findListIteratorByCondition Error
Posted by "skip@thedevers" <sk...@thedevers.org>.
Comprende
Thanks
-----Original Message-----
From: David E Jones [mailto:jonesde@hotwaxmedia.com]
Sent: Thursday, March 20, 2008 2:35 PM
To: user@ofbiz.apache.org
Subject: Re: findListIteratorByCondition Error
Here's a hint from my last email:
"Most entity engine operations get wrapped in a transaction if there
is not
one in place, but it can't do that with the EntityListIterator calls
because the transaction needs to stay open until the ELI and the
ResultSet associated with it is closed"
Let me know if you need more.
-David
On Mar 20, 2008, at 2:42 PM, skip@thedevers wrote:
> David
>
> Thanks a load for the explanation. My education continues!
>
> I have one further question then though. In this particular case, a
> service
> is running which reads a processes an EntityListIterator. Should I
> have a
> begin/commit around just the creation of the ELI or should I have
> one around
> both the creation and the getNext() as well? In this case, there is a
> getNext(), some getRelated(), some computations, and then repeat.
> This will
> be a very busy server.
>
> Skip
>
> -----Original Message-----
> From: David E Jones [mailto:jonesde@hotwaxmedia.com]
> Sent: Tuesday, March 18, 2008 8:35 PM
> To: user@ofbiz.apache.org
> Subject: Re: findListIteratorByCondition Error
>
>
>
> Skip,
>
> Transactions are just as important for reading as they are for
> writing. In fact most of transaction isolation theory is concerned
> with how reads will be affected by writes.
>
> In OFBiz all major operations are wrapped in a transaction by default,
> even rendering of screens for outgoing information (typically in a
> separate transaction than the events processing incoming data). Most
> entity engine operations get wrapped in a transaction if there is not
> one in place, but it can't do that with the EntityListIterator calls
> because the transaction needs to stay open until the ELI and the
> ResultSet associated with it is closed.
>
> In a busy server environment you'll probably run into database errors
> related to this, but it depends on your traffic and the database you
> use.
>
> But yes, this IS important and was added because production errors
> became common before this was added.
>
> -David
>
>
> On Mar 18, 2008, at 8:48 PM, skip@thedevers wrote:
>
>> Jacopo
>>
>> I guess my question should be rephrased.
>>
>> "Why does the author think that all findListIteratorByCondition()
>> calls
>> should be surrounded with a transaction, particularly in this case
>> where it
>> is read-only."
>>
>> I just want to make sure I am not missing something. I am quite
>> happy to
>> comment out the exception. In this particular case, 150gigs of log
>> file
>> were created in one service call to compute stock needs with real
>> live data
>> from a big company. I am trying to debug this code and need the
>> regular
>> debug output to be sure things are going as I expect.
>>
>> If I really need the begin/end, I am happy to do that, I just wanted
>> to know
>> why.
>>
>> Skip
>>
>> -----Original Message-----
>> From: Jacopo Cappellato [mailto:tiz@sastau.it]
>> Sent: Tuesday, March 18, 2008 7:13 PM
>> To: user@ofbiz.apache.org
>> Subject: Re: findListIteratorByCondition Error
>>
>>
>> skip@thedevers wrote:
>>> More on this error. Here is the code in GenericDelegator which
>>> writes the
>>> error to the log.
>>>
>>> //throwing an exception is a little harsh for now, just
>> display
>>> a really big error message since we want to get all of these
>>> fixed...
>>> Exception newE = new Exception("Stack Trace");
>>> Debug.logError(newE, "ERROR: Cannot do a find that
>>> returns an
>>> EntityListIterator with no transaction in place. Wrap this call in a
>>> transaction.", module);
>>>
>>>
>>> As the author desired, it is a REALLY big error. I was writing
>>> stdout to
>> a
>>> file which almost filled up my hard disk with these errors.
>>>
>>> Could the author comment on why it is important to do this:
>>>
>>> TransactionUtil.begin();
>>> Map inventory =
>>> dispatcher.runSync("getInventoryAvailableByFacility",
>>> UtilMisc.toMap("productId", productId, "facilityId", facilityId));
>>> TransactionUtil.commit();
>>>
>>> I.E. put the begin/commit around the runSync call other than just
>>> to avoid
>>> filling up your hard disk?
>>>
>>
>> I'd suggest to avoid redirecting stdout to a file.
>>
>> Jacopo
>>
>>> Skip
>>>
>>>
>>>
>>>
>>> No virus found in this outgoing message.
>>> Checked by AVG.
>>> Version: 7.5.519 / Virus Database: 269.21.7/1331 - Release Date:
>>> 3/16/2008
>>> 10:34 AM
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG.
>> Version: 7.5.519 / Virus Database: 269.21.7/1331 - Release Date:
>> 3/16/2008
>> 10:34 AM
>>
>> No virus found in this outgoing message.
>> Checked by AVG.
>> Version: 7.5.519 / Virus Database: 269.21.7/1331 - Release Date:
>> 3/16/2008
>> 10:34 AM
>>
>
>
> No virus found in this incoming message.
> Checked by AVG.
> Version: 7.5.519 / Virus Database: 269.21.7/1333 - Release Date:
> 3/18/2008
> 8:10 AM
>
> No virus found in this outgoing message.
> Checked by AVG.
> Version: 7.5.519 / Virus Database: 269.21.7/1333 - Release Date:
> 3/18/2008
> 8:10 AM
>
No virus found in this incoming message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.7/1333 - Release Date: 3/18/2008
8:10 AM
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.7/1333 - Release Date: 3/18/2008
8:10 AM
Re: findListIteratorByCondition Error
Posted by David E Jones <jo...@hotwaxmedia.com>.
Here's a hint from my last email:
"Most entity engine operations get wrapped in a transaction if there
is not
one in place, but it can't do that with the EntityListIterator calls
because the transaction needs to stay open until the ELI and the
ResultSet associated with it is closed"
Let me know if you need more.
-David
On Mar 20, 2008, at 2:42 PM, skip@thedevers wrote:
> David
>
> Thanks a load for the explanation. My education continues!
>
> I have one further question then though. In this particular case, a
> service
> is running which reads a processes an EntityListIterator. Should I
> have a
> begin/commit around just the creation of the ELI or should I have
> one around
> both the creation and the getNext() as well? In this case, there is a
> getNext(), some getRelated(), some computations, and then repeat.
> This will
> be a very busy server.
>
> Skip
>
> -----Original Message-----
> From: David E Jones [mailto:jonesde@hotwaxmedia.com]
> Sent: Tuesday, March 18, 2008 8:35 PM
> To: user@ofbiz.apache.org
> Subject: Re: findListIteratorByCondition Error
>
>
>
> Skip,
>
> Transactions are just as important for reading as they are for
> writing. In fact most of transaction isolation theory is concerned
> with how reads will be affected by writes.
>
> In OFBiz all major operations are wrapped in a transaction by default,
> even rendering of screens for outgoing information (typically in a
> separate transaction than the events processing incoming data). Most
> entity engine operations get wrapped in a transaction if there is not
> one in place, but it can't do that with the EntityListIterator calls
> because the transaction needs to stay open until the ELI and the
> ResultSet associated with it is closed.
>
> In a busy server environment you'll probably run into database errors
> related to this, but it depends on your traffic and the database you
> use.
>
> But yes, this IS important and was added because production errors
> became common before this was added.
>
> -David
>
>
> On Mar 18, 2008, at 8:48 PM, skip@thedevers wrote:
>
>> Jacopo
>>
>> I guess my question should be rephrased.
>>
>> "Why does the author think that all findListIteratorByCondition()
>> calls
>> should be surrounded with a transaction, particularly in this case
>> where it
>> is read-only."
>>
>> I just want to make sure I am not missing something. I am quite
>> happy to
>> comment out the exception. In this particular case, 150gigs of log
>> file
>> were created in one service call to compute stock needs with real
>> live data
>> from a big company. I am trying to debug this code and need the
>> regular
>> debug output to be sure things are going as I expect.
>>
>> If I really need the begin/end, I am happy to do that, I just wanted
>> to know
>> why.
>>
>> Skip
>>
>> -----Original Message-----
>> From: Jacopo Cappellato [mailto:tiz@sastau.it]
>> Sent: Tuesday, March 18, 2008 7:13 PM
>> To: user@ofbiz.apache.org
>> Subject: Re: findListIteratorByCondition Error
>>
>>
>> skip@thedevers wrote:
>>> More on this error. Here is the code in GenericDelegator which
>>> writes the
>>> error to the log.
>>>
>>> //throwing an exception is a little harsh for now, just
>> display
>>> a really big error message since we want to get all of these
>>> fixed...
>>> Exception newE = new Exception("Stack Trace");
>>> Debug.logError(newE, "ERROR: Cannot do a find that
>>> returns an
>>> EntityListIterator with no transaction in place. Wrap this call in a
>>> transaction.", module);
>>>
>>>
>>> As the author desired, it is a REALLY big error. I was writing
>>> stdout to
>> a
>>> file which almost filled up my hard disk with these errors.
>>>
>>> Could the author comment on why it is important to do this:
>>>
>>> TransactionUtil.begin();
>>> Map inventory =
>>> dispatcher.runSync("getInventoryAvailableByFacility",
>>> UtilMisc.toMap("productId", productId, "facilityId", facilityId));
>>> TransactionUtil.commit();
>>>
>>> I.E. put the begin/commit around the runSync call other than just
>>> to avoid
>>> filling up your hard disk?
>>>
>>
>> I'd suggest to avoid redirecting stdout to a file.
>>
>> Jacopo
>>
>>> Skip
>>>
>>>
>>>
>>>
>>> No virus found in this outgoing message.
>>> Checked by AVG.
>>> Version: 7.5.519 / Virus Database: 269.21.7/1331 - Release Date:
>>> 3/16/2008
>>> 10:34 AM
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG.
>> Version: 7.5.519 / Virus Database: 269.21.7/1331 - Release Date:
>> 3/16/2008
>> 10:34 AM
>>
>> No virus found in this outgoing message.
>> Checked by AVG.
>> Version: 7.5.519 / Virus Database: 269.21.7/1331 - Release Date:
>> 3/16/2008
>> 10:34 AM
>>
>
>
> No virus found in this incoming message.
> Checked by AVG.
> Version: 7.5.519 / Virus Database: 269.21.7/1333 - Release Date:
> 3/18/2008
> 8:10 AM
>
> No virus found in this outgoing message.
> Checked by AVG.
> Version: 7.5.519 / Virus Database: 269.21.7/1333 - Release Date:
> 3/18/2008
> 8:10 AM
>
RE: findListIteratorByCondition Error
Posted by "skip@thedevers" <sk...@thedevers.org>.
David
Thanks a load for the explanation. My education continues!
I have one further question then though. In this particular case, a service
is running which reads a processes an EntityListIterator. Should I have a
begin/commit around just the creation of the ELI or should I have one around
both the creation and the getNext() as well? In this case, there is a
getNext(), some getRelated(), some computations, and then repeat. This will
be a very busy server.
Skip
-----Original Message-----
From: David E Jones [mailto:jonesde@hotwaxmedia.com]
Sent: Tuesday, March 18, 2008 8:35 PM
To: user@ofbiz.apache.org
Subject: Re: findListIteratorByCondition Error
Skip,
Transactions are just as important for reading as they are for
writing. In fact most of transaction isolation theory is concerned
with how reads will be affected by writes.
In OFBiz all major operations are wrapped in a transaction by default,
even rendering of screens for outgoing information (typically in a
separate transaction than the events processing incoming data). Most
entity engine operations get wrapped in a transaction if there is not
one in place, but it can't do that with the EntityListIterator calls
because the transaction needs to stay open until the ELI and the
ResultSet associated with it is closed.
In a busy server environment you'll probably run into database errors
related to this, but it depends on your traffic and the database you
use.
But yes, this IS important and was added because production errors
became common before this was added.
-David
On Mar 18, 2008, at 8:48 PM, skip@thedevers wrote:
> Jacopo
>
> I guess my question should be rephrased.
>
> "Why does the author think that all findListIteratorByCondition()
> calls
> should be surrounded with a transaction, particularly in this case
> where it
> is read-only."
>
> I just want to make sure I am not missing something. I am quite
> happy to
> comment out the exception. In this particular case, 150gigs of log
> file
> were created in one service call to compute stock needs with real
> live data
> from a big company. I am trying to debug this code and need the
> regular
> debug output to be sure things are going as I expect.
>
> If I really need the begin/end, I am happy to do that, I just wanted
> to know
> why.
>
> Skip
>
> -----Original Message-----
> From: Jacopo Cappellato [mailto:tiz@sastau.it]
> Sent: Tuesday, March 18, 2008 7:13 PM
> To: user@ofbiz.apache.org
> Subject: Re: findListIteratorByCondition Error
>
>
> skip@thedevers wrote:
>> More on this error. Here is the code in GenericDelegator which
>> writes the
>> error to the log.
>>
>> //throwing an exception is a little harsh for now, just
> display
>> a really big error message since we want to get all of these fixed...
>> Exception newE = new Exception("Stack Trace");
>> Debug.logError(newE, "ERROR: Cannot do a find that
>> returns an
>> EntityListIterator with no transaction in place. Wrap this call in a
>> transaction.", module);
>>
>>
>> As the author desired, it is a REALLY big error. I was writing
>> stdout to
> a
>> file which almost filled up my hard disk with these errors.
>>
>> Could the author comment on why it is important to do this:
>>
>> TransactionUtil.begin();
>> Map inventory =
>> dispatcher.runSync("getInventoryAvailableByFacility",
>> UtilMisc.toMap("productId", productId, "facilityId", facilityId));
>> TransactionUtil.commit();
>>
>> I.E. put the begin/commit around the runSync call other than just
>> to avoid
>> filling up your hard disk?
>>
>
> I'd suggest to avoid redirecting stdout to a file.
>
> Jacopo
>
>> Skip
>>
>>
>>
>>
>> No virus found in this outgoing message.
>> Checked by AVG.
>> Version: 7.5.519 / Virus Database: 269.21.7/1331 - Release Date:
>> 3/16/2008
>> 10:34 AM
>
>
> No virus found in this incoming message.
> Checked by AVG.
> Version: 7.5.519 / Virus Database: 269.21.7/1331 - Release Date:
> 3/16/2008
> 10:34 AM
>
> No virus found in this outgoing message.
> Checked by AVG.
> Version: 7.5.519 / Virus Database: 269.21.7/1331 - Release Date:
> 3/16/2008
> 10:34 AM
>
No virus found in this incoming message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.7/1333 - Release Date: 3/18/2008
8:10 AM
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.7/1333 - Release Date: 3/18/2008
8:10 AM
Re: findListIteratorByCondition Error
Posted by David E Jones <jo...@hotwaxmedia.com>.
Skip,
Transactions are just as important for reading as they are for
writing. In fact most of transaction isolation theory is concerned
with how reads will be affected by writes.
In OFBiz all major operations are wrapped in a transaction by default,
even rendering of screens for outgoing information (typically in a
separate transaction than the events processing incoming data). Most
entity engine operations get wrapped in a transaction if there is not
one in place, but it can't do that with the EntityListIterator calls
because the transaction needs to stay open until the ELI and the
ResultSet associated with it is closed.
In a busy server environment you'll probably run into database errors
related to this, but it depends on your traffic and the database you
use.
But yes, this IS important and was added because production errors
became common before this was added.
-David
On Mar 18, 2008, at 8:48 PM, skip@thedevers wrote:
> Jacopo
>
> I guess my question should be rephrased.
>
> "Why does the author think that all findListIteratorByCondition()
> calls
> should be surrounded with a transaction, particularly in this case
> where it
> is read-only."
>
> I just want to make sure I am not missing something. I am quite
> happy to
> comment out the exception. In this particular case, 150gigs of log
> file
> were created in one service call to compute stock needs with real
> live data
> from a big company. I am trying to debug this code and need the
> regular
> debug output to be sure things are going as I expect.
>
> If I really need the begin/end, I am happy to do that, I just wanted
> to know
> why.
>
> Skip
>
> -----Original Message-----
> From: Jacopo Cappellato [mailto:tiz@sastau.it]
> Sent: Tuesday, March 18, 2008 7:13 PM
> To: user@ofbiz.apache.org
> Subject: Re: findListIteratorByCondition Error
>
>
> skip@thedevers wrote:
>> More on this error. Here is the code in GenericDelegator which
>> writes the
>> error to the log.
>>
>> //throwing an exception is a little harsh for now, just
> display
>> a really big error message since we want to get all of these fixed...
>> Exception newE = new Exception("Stack Trace");
>> Debug.logError(newE, "ERROR: Cannot do a find that
>> returns an
>> EntityListIterator with no transaction in place. Wrap this call in a
>> transaction.", module);
>>
>>
>> As the author desired, it is a REALLY big error. I was writing
>> stdout to
> a
>> file which almost filled up my hard disk with these errors.
>>
>> Could the author comment on why it is important to do this:
>>
>> TransactionUtil.begin();
>> Map inventory =
>> dispatcher.runSync("getInventoryAvailableByFacility",
>> UtilMisc.toMap("productId", productId, "facilityId", facilityId));
>> TransactionUtil.commit();
>>
>> I.E. put the begin/commit around the runSync call other than just
>> to avoid
>> filling up your hard disk?
>>
>
> I'd suggest to avoid redirecting stdout to a file.
>
> Jacopo
>
>> Skip
>>
>>
>>
>>
>> No virus found in this outgoing message.
>> Checked by AVG.
>> Version: 7.5.519 / Virus Database: 269.21.7/1331 - Release Date:
>> 3/16/2008
>> 10:34 AM
>
>
> No virus found in this incoming message.
> Checked by AVG.
> Version: 7.5.519 / Virus Database: 269.21.7/1331 - Release Date:
> 3/16/2008
> 10:34 AM
>
> No virus found in this outgoing message.
> Checked by AVG.
> Version: 7.5.519 / Virus Database: 269.21.7/1331 - Release Date:
> 3/16/2008
> 10:34 AM
>
RE: findListIteratorByCondition Error
Posted by "skip@thedevers" <sk...@thedevers.org>.
Jacopo
I guess my question should be rephrased.
"Why does the author think that all findListIteratorByCondition() calls
should be surrounded with a transaction, particularly in this case where it
is read-only."
I just want to make sure I am not missing something. I am quite happy to
comment out the exception. In this particular case, 150gigs of log file
were created in one service call to compute stock needs with real live data
from a big company. I am trying to debug this code and need the regular
debug output to be sure things are going as I expect.
If I really need the begin/end, I am happy to do that, I just wanted to know
why.
Skip
-----Original Message-----
From: Jacopo Cappellato [mailto:tiz@sastau.it]
Sent: Tuesday, March 18, 2008 7:13 PM
To: user@ofbiz.apache.org
Subject: Re: findListIteratorByCondition Error
skip@thedevers wrote:
> More on this error. Here is the code in GenericDelegator which writes the
> error to the log.
>
> //throwing an exception is a little harsh for now, just
display
> a really big error message since we want to get all of these fixed...
> Exception newE = new Exception("Stack Trace");
> Debug.logError(newE, "ERROR: Cannot do a find that returns an
> EntityListIterator with no transaction in place. Wrap this call in a
> transaction.", module);
>
>
> As the author desired, it is a REALLY big error. I was writing stdout to
a
> file which almost filled up my hard disk with these errors.
>
> Could the author comment on why it is important to do this:
>
> TransactionUtil.begin();
> Map inventory =
> dispatcher.runSync("getInventoryAvailableByFacility",
> UtilMisc.toMap("productId", productId, "facilityId", facilityId));
> TransactionUtil.commit();
>
> I.E. put the begin/commit around the runSync call other than just to avoid
> filling up your hard disk?
>
I'd suggest to avoid redirecting stdout to a file.
Jacopo
> Skip
>
>
>
>
> No virus found in this outgoing message.
> Checked by AVG.
> Version: 7.5.519 / Virus Database: 269.21.7/1331 - Release Date: 3/16/2008
> 10:34 AM
No virus found in this incoming message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.7/1331 - Release Date: 3/16/2008
10:34 AM
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.7/1331 - Release Date: 3/16/2008
10:34 AM
Re: findListIteratorByCondition Error
Posted by Jacopo Cappellato <ti...@sastau.it>.
skip@thedevers wrote:
> More on this error. Here is the code in GenericDelegator which writes the
> error to the log.
>
> //throwing an exception is a little harsh for now, just display
> a really big error message since we want to get all of these fixed...
> Exception newE = new Exception("Stack Trace");
> Debug.logError(newE, "ERROR: Cannot do a find that returns an
> EntityListIterator with no transaction in place. Wrap this call in a
> transaction.", module);
>
>
> As the author desired, it is a REALLY big error. I was writing stdout to a
> file which almost filled up my hard disk with these errors.
>
> Could the author comment on why it is important to do this:
>
> TransactionUtil.begin();
> Map inventory =
> dispatcher.runSync("getInventoryAvailableByFacility",
> UtilMisc.toMap("productId", productId, "facilityId", facilityId));
> TransactionUtil.commit();
>
> I.E. put the begin/commit around the runSync call other than just to avoid
> filling up your hard disk?
>
I'd suggest to avoid redirecting stdout to a file.
Jacopo
> Skip
>
>
>
>
> No virus found in this outgoing message.
> Checked by AVG.
> Version: 7.5.519 / Virus Database: 269.21.7/1331 - Release Date: 3/16/2008
> 10:34 AM
findListIteratorByCondition Error
Posted by "skip@thedevers" <sk...@thedevers.org>.
More on this error. Here is the code in GenericDelegator which writes the
error to the log.
//throwing an exception is a little harsh for now, just display
a really big error message since we want to get all of these fixed...
Exception newE = new Exception("Stack Trace");
Debug.logError(newE, "ERROR: Cannot do a find that returns an
EntityListIterator with no transaction in place. Wrap this call in a
transaction.", module);
As the author desired, it is a REALLY big error. I was writing stdout to a
file which almost filled up my hard disk with these errors.
Could the author comment on why it is important to do this:
TransactionUtil.begin();
Map inventory =
dispatcher.runSync("getInventoryAvailableByFacility",
UtilMisc.toMap("productId", productId, "facilityId", facilityId));
TransactionUtil.commit();
I.E. put the begin/commit around the runSync call other than just to avoid
filling up your hard disk?
Skip
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.7/1331 - Release Date: 3/16/2008
10:34 AM
findListIteratorByCondition error
Posted by "skip@thedevers" <sk...@thedevers.org>.
I am getting this error:
ERROR: Cannot do a find that returns an EntityListIterator with no
transaction in place. Wrap this call in a transaction.
on a call to findListIteratorByCondition()
I don't understand why I need a transaction for this when I am just reading
data.
I don't want to put a begin/commit around it because there is nothing to
commit and that seems messy to me.
I don't want to use findByCondition because there are something over a
million records to iterate over.
Does anyone have a suggestion on what to do?
Skip
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.7/1331 - Release Date: 3/16/2008
10:34 AM
Re: order shipped email
Posted by Hansen Wang <ha...@gemmall.com>.
Thanks!
Please note that this is new feature after 4.0 since I did not see the
corresponding email type and screens in my box running ofbiz4.0.
On 3/17/08, Jacques Le Roux <ja...@les7arts.com> wrote:
>
> IIRW it's "OFBiz Demo - Shipment Complete Notification #${orderId}"
>
> Look at
> component://ecommerce/widget/EmailOrderScreens.xml#ShipmentCompleteNotice
>
> Jacques
>
> From: "Hansen Wang" <ha...@gemmall.com>
> >I have been to these places. But could not find an "order shipped" email
> > type. I have searched the java and xml files but could not locate any
> > information about this.
> >
> > Does ofbiz send out an "order shipped" email once a package is shipped?
> >
> > Regards,
> > Hansen
> >
> >
> > On 3/17/08, Jacques Le Roux <ja...@les7arts.com> wrote:
> >>
> >> It's set there
> >>
> https://demo.hotwaxmedia.com/catalog/control/EditProductStoreEmails?productStoreId=9000
> >>
> >> Jacques
> >>
> >> From: "Hansen Wang" <ha...@gemmall.com>
> >> > Hi,
> >> >
> >> > I have been going through the admin webapps looking for places where
> a
> >> > shipping notification email is sent. But I was not able to find that.
> Is
> >> > such function supported out of box from the admin webapps?
> >> >
> >> > Thanks,
> >> > Hansen
> >> >
> >>
> >
>
Re: order shipped email
Posted by Jacques Le Roux <ja...@les7arts.com>.
IIRW it's "OFBiz Demo - Shipment Complete Notification #${orderId}"
Look at component://ecommerce/widget/EmailOrderScreens.xml#ShipmentCompleteNotice
Jacques
From: "Hansen Wang" <ha...@gemmall.com>
>I have been to these places. But could not find an "order shipped" email
> type. I have searched the java and xml files but could not locate any
> information about this.
>
> Does ofbiz send out an "order shipped" email once a package is shipped?
>
> Regards,
> Hansen
>
>
> On 3/17/08, Jacques Le Roux <ja...@les7arts.com> wrote:
>>
>> It's set there
>> https://demo.hotwaxmedia.com/catalog/control/EditProductStoreEmails?productStoreId=9000
>>
>> Jacques
>>
>> From: "Hansen Wang" <ha...@gemmall.com>
>> > Hi,
>> >
>> > I have been going through the admin webapps looking for places where a
>> > shipping notification email is sent. But I was not able to find that. Is
>> > such function supported out of box from the admin webapps?
>> >
>> > Thanks,
>> > Hansen
>> >
>>
>
Re: order shipped email
Posted by Hansen Wang <ha...@gemmall.com>.
I have been to these places. But could not find an "order shipped" email
type. I have searched the java and xml files but could not locate any
information about this.
Does ofbiz send out an "order shipped" email once a package is shipped?
Regards,
Hansen
On 3/17/08, Jacques Le Roux <ja...@les7arts.com> wrote:
>
> It's set there
> https://demo.hotwaxmedia.com/catalog/control/EditProductStoreEmails?productStoreId=9000
>
> Jacques
>
> From: "Hansen Wang" <ha...@gemmall.com>
> > Hi,
> >
> > I have been going through the admin webapps looking for places where a
> > shipping notification email is sent. But I was not able to find that. Is
> > such function supported out of box from the admin webapps?
> >
> > Thanks,
> > Hansen
> >
>
Re: order shipped email
Posted by Jacques Le Roux <ja...@les7arts.com>.
It's set there https://demo.hotwaxmedia.com/catalog/control/EditProductStoreEmails?productStoreId=9000
Jacques
From: "Hansen Wang" <ha...@gemmall.com>
> Hi,
>
> I have been going through the admin webapps looking for places where a
> shipping notification email is sent. But I was not able to find that. Is
> such function supported out of box from the admin webapps?
>
> Thanks,
> Hansen
>