Hi Friends,
Can anyone please explain me how the database connection pooling is managed in OFBIZ ? Thanks in Advance! Regards Narayan Patil. |
Administrator
|
I have not the time to explain "how", but you might be intereste to know that OFBiz trunk uses Apache DBCP
http://commons.apache.org/dbcp/ In release 4.0 Minerva was used but it has been replaced for 2 reasons: anymore supported, caused some issues. Jacques From: "Narayan Patil" <[hidden email]> > Hi Friends, > > Can anyone please explain me how the database connection pooling is managed > in OFBIZ ? > > Thanks in Advance! > > Regards > Narayan Patil. > |
Hi
If I add an item to the shopping cart and then refresh the browser this causes the same item to be added to the cart again. I presume this is not correct. Is this a known issue? Cheers Rees |
Administrator
|
Should this be really considered an issue ?
Jacques From: "Rees Watkins" <[hidden email]> Hi If I add an item to the shopping cart and then refresh the browser this causes the same item to be added to the cart again. I presume this is not correct. Is this a known issue? Cheers Rees |
I too faced this thing.However i think it should be considered as an
issue.As if due to some browser specific problem, if a customer tries to refresh the browser, unnecessary one extra item will be added to the cart.Let me know if i am thinking wrong. Regards: -- Ashish Nagar Jacques Le Roux wrote: > Should this be really considered an issue ? > > Jacques > > From: "Rees Watkins" <[hidden email]> > Hi > > If I add an item to the shopping cart and then refresh the browser > this causes the same item to be added to the cart again. I presume > this is not correct. Is this a known issue? > > Cheers > Rees > > > > |
Hi
I have customised ofbiz for the travel industry. I do not hold any product. All product sold is reserved and booked on a 3rd party site. Generally cancellation has heavy penalties. In the even a customer buys an additional item by mistake one of the parties will lose 50 - 100% on a refund. I would like to customise my ofbiz to prevent items been added on refresh. Does anyone have any suggestion or comments on how best to do this? Thanks Rees |
Just do a redirect after add to cart.
-David On Jan 19, 2009, at 12:13, Rees Watkins <[hidden email]> wrote: > Hi > > I have customised ofbiz for the travel industry. I do not hold any > product. All product sold is reserved and booked on a 3rd party site. > Generally cancellation has heavy penalties. In the even a customer > buys > an additional item by mistake one of the parties will lose 50 - 100% > on > a refund. I would like to customise my ofbiz to prevent items been > added on refresh. Does anyone have any suggestion or comments on how > best to do this? > > Thanks > Rees > > > |
In reply to this post by Rees Watkins
Most browsers have a warning popup window that tells the user that a screen refresh will result in reposting data. Maybe you could supplement that with a similar warning on the web page itself.
-Adrian --- On Mon, 1/19/09, Rees Watkins <[hidden email]> wrote: > From: Rees Watkins <[hidden email]> > Subject: Re: F5 ( refresh of browser ) causes another item to be added to the cart > To: [hidden email] > Date: Monday, January 19, 2009, 11:13 AM > Hi > > I have customised ofbiz for the travel industry. I do not > hold any > product. All product sold is reserved and booked on a 3rd > party site. > Generally cancellation has heavy penalties. In the even a > customer buys > an additional item by mistake one of the parties will lose > 50 - 100% on > a refund. I would like to customise my ofbiz to prevent > items been > added on refresh. Does anyone have any suggestion or > comments on how > best to do this? > > Thanks > Rees |
In HTTP protocol GET method is considered idempotent that is multiple
calls to the same resource should result in the same result. In Contrast POST method is no idempotent and therefore if a URL with POST method is refreshed browsers will through a warning message. Therefore, we should use GET method for the safe operations such as fetching a list of records based on input parameters and POST for transaction which can change the state of application for example inserting a record in database. Thanks, Raj Adrian Crum wrote: > Most browsers have a warning popup window that tells the user that a screen refresh will result in reposting data. Maybe you could supplement that with a similar warning on the web page itself. > > -Adrian > > > --- On Mon, 1/19/09, Rees Watkins <[hidden email]> wrote: > > >> From: Rees Watkins <[hidden email]> >> Subject: Re: F5 ( refresh of browser ) causes another item to be added to the cart >> To: [hidden email] >> Date: Monday, January 19, 2009, 11:13 AM >> Hi >> >> I have customised ofbiz for the travel industry. I do not >> hold any >> product. All product sold is reserved and booked on a 3rd >> party site. >> Generally cancellation has heavy penalties. In the even a >> customer buys >> an additional item by mistake one of the parties will lose >> 50 - 100% on >> a refund. I would like to customise my ofbiz to prevent >> items been >> added on refresh. Does anyone have any suggestion or >> comments on how >> best to do this? >> >> Thanks >> Rees >> > > > > > |
On the other hand, there are limitations to GET that will not work with most HTML forms - that's why POST is used instead.
-Adrian --- On Mon, 1/19/09, Raj Saini <[hidden email]> wrote: > From: Raj Saini <[hidden email]> > Subject: Re: F5 ( refresh of browser ) causes another item to be added to the cart > To: [hidden email] > Date: Monday, January 19, 2009, 7:25 PM > In HTTP protocol GET method is considered idempotent that is > multiple > calls to the same resource should result in the same > result. In Contrast > POST method is no idempotent and therefore if a URL with > POST method is > refreshed browsers will through a warning message. > > Therefore, we should use GET method for the safe operations > such as > fetching a list of records based on input parameters and > POST for > transaction which can change the state of application for > example > inserting a record in database. > > Thanks, > > Raj > > Adrian Crum wrote: > > Most browsers have a warning popup window that tells > the user that a screen refresh will result in reposting > data. Maybe you could supplement that with a similar warning > on the web page itself. > > > > -Adrian > > > > > > --- On Mon, 1/19/09, Rees Watkins > <[hidden email]> wrote: > > > > > >> From: Rees Watkins <[hidden email]> > >> Subject: Re: F5 ( refresh of browser ) causes > another item to be added to the cart > >> To: [hidden email] > >> Date: Monday, January 19, 2009, 11:13 AM > >> Hi > >> > >> I have customised ofbiz for the travel industry. I > do not > >> hold any > >> product. All product sold is reserved and booked > on a 3rd > >> party site. > >> Generally cancellation has heavy penalties. In the > even a > >> customer buys > >> an additional item by mistake one of the parties > will lose > >> 50 - 100% on > >> a refund. I would like to customise my ofbiz to > prevent > >> items been > >> added on refresh. Does anyone have any suggestion > or > >> comments on how > >> best to do this? > >> > >> Thanks > >> Rees > >> > > > > > > > > > > |
In reply to this post by rajsaini
That interpretation of GET in the RFC may not be correct, and is certainly not used in practice. If it was then hitting a URL with GET would always result in the same response. That not true of any site with personalization, data shown from a session, date/time text on the page, even a hit counter. There just aren't very many HTTP resources in the world that would qualify for that interpretation. And if it means only server-side state and not what is returned then it is still rarely the case, even logging the request would violate that rule. -David On Jan 19, 2009, at 8:25 PM, Raj Saini wrote: > In HTTP protocol GET method is considered idempotent that is > multiple calls to the same resource should result in the same > result. In Contrast POST method is no idempotent and therefore if a > URL with POST method is refreshed browsers will through a warning > message. > > Therefore, we should use GET method for the safe operations such as > fetching a list of records based on input parameters and POST for > transaction which can change the state of application for example > inserting a record in database. > > Thanks, > > Raj > > Adrian Crum wrote: >> Most browsers have a warning popup window that tells the user that >> a screen refresh will result in reposting data. Maybe you could >> supplement that with a similar warning on the web page itself. >> >> -Adrian >> >> >> --- On Mon, 1/19/09, Rees Watkins <[hidden email]> wrote: >> >> >>> From: Rees Watkins <[hidden email]> >>> Subject: Re: F5 ( refresh of browser ) causes another item to be >>> added to the cart >>> To: [hidden email] >>> Date: Monday, January 19, 2009, 11:13 AM >>> Hi >>> >>> I have customised ofbiz for the travel industry. I do not >>> hold any >>> product. All product sold is reserved and booked on a 3rd >>> party site. >>> Generally cancellation has heavy penalties. In the even a >>> customer buys >>> an additional item by mistake one of the parties will lose >>> 50 - 100% on >>> a refund. I would like to customise my ofbiz to prevent >>> items been >>> added on refresh. Does anyone have any suggestion or >>> comments on how >>> best to do this? >>> >>> Thanks >>> Rees >>> >> >> >> >> > |
In reply to this post by Adrian Crum-2
Here is a discussion for using Synchronizer token pattern to solve it:
http://ofbiz.markmail.org/search/?q=prevent+double+submit#query:prevent %20double%20submit+page:1+mid:6ydr3b2jhauda7pq+state:results Bilgin On Jan 20, 2009, at 9:03 AM, Adrian Crum wrote: > On the other hand, there are limitations to GET that will not work > with most HTML forms - that's why POST is used instead. > > -Adrian > > > --- On Mon, 1/19/09, Raj Saini <[hidden email]> wrote: > >> From: Raj Saini <[hidden email]> >> Subject: Re: F5 ( refresh of browser ) causes another item to be >> added to the cart >> To: [hidden email] >> Date: Monday, January 19, 2009, 7:25 PM >> In HTTP protocol GET method is considered idempotent that is >> multiple >> calls to the same resource should result in the same >> result. In Contrast >> POST method is no idempotent and therefore if a URL with >> POST method is >> refreshed browsers will through a warning message. >> >> Therefore, we should use GET method for the safe operations >> such as >> fetching a list of records based on input parameters and >> POST for >> transaction which can change the state of application for >> example >> inserting a record in database. >> >> Thanks, >> >> Raj >> >> Adrian Crum wrote: >>> Most browsers have a warning popup window that tells >> the user that a screen refresh will result in reposting >> data. Maybe you could supplement that with a similar warning >> on the web page itself. >>> >>> -Adrian >>> >>> >>> --- On Mon, 1/19/09, Rees Watkins >> <[hidden email]> wrote: >>> >>> >>>> From: Rees Watkins <[hidden email]> >>>> Subject: Re: F5 ( refresh of browser ) causes >> another item to be added to the cart >>>> To: [hidden email] >>>> Date: Monday, January 19, 2009, 11:13 AM >>>> Hi >>>> >>>> I have customised ofbiz for the travel industry. I >> do not >>>> hold any >>>> product. All product sold is reserved and booked >> on a 3rd >>>> party site. >>>> Generally cancellation has heavy penalties. In the >> even a >>>> customer buys >>>> an additional item by mistake one of the parties >> will lose >>>> 50 - 100% on >>>> a refund. I would like to customise my ofbiz to >> prevent >>>> items been >>>> added on refresh. Does anyone have any suggestion >> or >>>> comments on how >>>> best to do this? >>>> >>>> Thanks >>>> Rees >>>> >>> >>> >>> >>> >>> > > > |
It's actually even easier than that... just do a client-side redirect after the request-event in order to render the view instead of returning the view immediately. This can be done with a handy response type supported by the ControlServlet (in the controller.xml file). There can be side-effects to this, so be sure to test... You can use things to ID each rendered form and protect the submissions based on that, but it can be quite error-prone depending on how implemented, and for anything other than sensitive forms it is usually not necessary. However, we could certainly implement something like that, and using the form widget and the service event handler to help we could make it pretty generic (ie implement once and apply everywhere)... for FTL files and other event handlers it would require changes for each form to support it. -David On Jan 20, 2009, at 1:25 AM, Bilgin Ibryam wrote: > Here is a discussion for using Synchronizer token pattern to solve it: > http://ofbiz.markmail.org/search/?q=prevent+double > +submit#query:prevent%20double%20submit+page:1+mid:6ydr3b2jhauda7pq+state:results > > Bilgin > On Jan 20, 2009, at 9:03 AM, Adrian Crum wrote: > >> On the other hand, there are limitations to GET that will not work >> with most HTML forms - that's why POST is used instead. >> >> -Adrian >> >> >> --- On Mon, 1/19/09, Raj Saini <[hidden email]> wrote: >> >>> From: Raj Saini <[hidden email]> >>> Subject: Re: F5 ( refresh of browser ) causes another item to be >>> added to the cart >>> To: [hidden email] >>> Date: Monday, January 19, 2009, 7:25 PM >>> In HTTP protocol GET method is considered idempotent that is >>> multiple >>> calls to the same resource should result in the same >>> result. In Contrast >>> POST method is no idempotent and therefore if a URL with >>> POST method is >>> refreshed browsers will through a warning message. >>> >>> Therefore, we should use GET method for the safe operations >>> such as >>> fetching a list of records based on input parameters and >>> POST for >>> transaction which can change the state of application for >>> example >>> inserting a record in database. >>> >>> Thanks, >>> >>> Raj >>> >>> Adrian Crum wrote: >>>> Most browsers have a warning popup window that tells >>> the user that a screen refresh will result in reposting >>> data. Maybe you could supplement that with a similar warning >>> on the web page itself. >>>> >>>> -Adrian >>>> >>>> >>>> --- On Mon, 1/19/09, Rees Watkins >>> <[hidden email]> wrote: >>>> >>>> >>>>> From: Rees Watkins <[hidden email]> >>>>> Subject: Re: F5 ( refresh of browser ) causes >>> another item to be added to the cart >>>>> To: [hidden email] >>>>> Date: Monday, January 19, 2009, 11:13 AM >>>>> Hi >>>>> >>>>> I have customised ofbiz for the travel industry. I >>> do not >>>>> hold any >>>>> product. All product sold is reserved and booked >>> on a 3rd >>>>> party site. >>>>> Generally cancellation has heavy penalties. In the >>> even a >>>>> customer buys >>>>> an additional item by mistake one of the parties >>> will lose >>>>> 50 - 100% on >>>>> a refund. I would like to customise my ofbiz to >>> prevent >>>>> items been >>>>> added on refresh. Does anyone have any suggestion >>> or >>>>> comments on how >>>>> best to do this? >>>>> >>>>> Thanks >>>>> Rees >>>>> >>>> >>>> >>>> >>>> >>>> >> >> >> > |
Free forum by Nabble | Edit this page |