Re: Old demo restarted

2018-08-24 Thread Jacques Le Roux

Agreed, I have used VisualVMin the past, it's a simple and efficient tool

I have planned to make a VOTE about options if needed. Let's see if it will be 
necessary (consensus being preferred)

Jacques


Le 24/08/2018 à 16:06, Girish Vasmatkar a écrit :

Speaking of monitoring tools and if we don't want to go for third party
tools, we can also use VisualVM that comes bundled with Oracle JDK. It can
connect to the remote VM (OFBiz process) and start displaying various
information.

Very minimal configuration is needed in the form of VM argument to allow
for remote monitoring. Also, to enable further analysis of what went wrong,
why JVM crashed etc, we should also dump heap as the JVM shuts down.

Too many ways and too many options. Probably need to reach a unanimous
decision, IMO.

Thanks and Best regards,
Girish Vasmatkar

On Fri, Aug 24, 2018 at 4:56 PM Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:


Thanks Michael,

Best idea so far!

Jacques


Le 24/08/2018 à 11:08, Michael Brohl a écrit :

We are monitoring our OFBiz instances with JMX and self hosted Zabbix

[1].

Zabbix gives you a nice overview about the system health and metrics

like memory  consumption etc. It also sends out warnings (Email, SMS or
else)

if metrics are exceeded (like CPU load or memory consumption) as well as

the system is not accessible.

Looks like this: [2]

There is no programming needed, just some configuration for JMX and

Zabbix.

[1] https://www.zabbix.com/
[2]

https://www.ecomify.de/wp-content/uploads/2018/08/Zabbix_Monitoring.png

If we want to see why the demos crash, it might be useful. If we only

want to monitor if the system is up, a simple cron job which sends a mail

might be enough...

Regards,

Michael Brohl
ecomify GmbH
www.ecomify.de


Am 24.08.18 um 10:07 schrieb Taher Alkhateeb:

Okay all neat ideas, I'm not sure if the energy you will put into

something

like this is equal to the value produced but if you want to make this
happen I would be happy to assist.

How much time will it take to make something like this happen? I ask
because it seems Jacques ia getting annoyed with these crashes and we'd
like to help him out.

On Fri, Aug 24, 2018, 10:59 AM Girish Vasmatkar <
girish.vasmat...@hotwaxsystems.com> wrote:


Hi Taher

Please see my reply below in-line.

On Fri, Aug 24, 2018 at 12:22 PM Taher Alkhateeb <
slidingfilame...@gmail.com>
wrote:


Hi Girish, inline...

On Thu, Aug 23, 2018, 7:25 PM Girish Vasmatkar <
girish.vasmat...@hotwaxsystems.com> wrote:


I had earlier replied to this thread but looks like the email did not

go

through. I had leaned towards using the tool (only just) instead of

may

be

having a CRON job or an alternative.

What I feel now is that may be we can use JMX here and try to use

various

in build MBeans that provide CPU usage for the system and also for

the

JVM

process we are concerned about that is OFBiz instance. We should also

be

able to get the memory usage of the JVM and if reaches a particular
threshold we can be notified.


Do you have a PoC for all of this?


 GV : I can have one ready; and there is going to be much doing

involved.

In addition, I think we already add a shutdown hook to the JVM

process... I

am not sure and have not used it much but may be we can use it to

send

some

notifications? Of course, it is applicable for graceful exits of JVM

only

and if you just happen to kill the process it won't be of much help.


The shutdown hook is used for shutting down. I'm not sure what is the
purpose of mentioning it here?


  GV : The reason I mentioned shutdown hook was it can be used to

send

notification (may be email) or anything per our needs indicating that

the

demo process was shut down. Per my understanding, shutdown   hook

gets

called whenever JVM shuts down gracefully. Graceful word is very

important

here because we won't be able to do much if someone just kills the

process.

The only thing a shutdown hook will add to this is that we will be

notified

then and there.


Hope it makes sense and correct me if I am wrong.

Well I'm struggling a bit. I didn't understand exactly what needs to

be

done? I see mixed topics about JMX, Mbeans, Memory monitors and

shutdown

hooks. First this seems to be more like coding than a tool, and

second I

have no idea how you want to implement this?


  GV: Yes, it would mostly be coding rather than being a substitute

for

the tool. My idea was that to have a timer service run within the JVM

and

it access various MBeans for the CPU usage and Memory usages just for

our

monitoring purpose and raise an alert if it reaches a threshold. It was
just to have a glance over how JVM is performing. The disadvantage? The
service will run in OFBiz JVM and there will be considerable amount of
coding involved.


My idea for example is simple: create a cronjob that checks the system
periodically and if the demo process stopped, restart it (or maybe

rebuild

and restart). To go 

Re: Old demo restarted

2018-08-24 Thread Girish Vasmatkar
Speaking of monitoring tools and if we don't want to go for third party
tools, we can also use VisualVM that comes bundled with Oracle JDK. It can
connect to the remote VM (OFBiz process) and start displaying various
information.

Very minimal configuration is needed in the form of VM argument to allow
for remote monitoring. Also, to enable further analysis of what went wrong,
why JVM crashed etc, we should also dump heap as the JVM shuts down.

Too many ways and too many options. Probably need to reach a unanimous
decision, IMO.

Thanks and Best regards,
Girish Vasmatkar

On Fri, Aug 24, 2018 at 4:56 PM Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:

> Thanks Michael,
>
> Best idea so far!
>
> Jacques
>
>
> Le 24/08/2018 à 11:08, Michael Brohl a écrit :
> > We are monitoring our OFBiz instances with JMX and self hosted Zabbix
> [1].
> >
> > Zabbix gives you a nice overview about the system health and metrics
> like memory  consumption etc. It also sends out warnings (Email, SMS or
> else)
> > if metrics are exceeded (like CPU load or memory consumption) as well as
> the system is not accessible.
> >
> > Looks like this: [2]
> >
> > There is no programming needed, just some configuration for JMX and
> Zabbix.
> >
> > [1] https://www.zabbix.com/
> > [2]
> https://www.ecomify.de/wp-content/uploads/2018/08/Zabbix_Monitoring.png
> >
> > If we want to see why the demos crash, it might be useful. If we only
> want to monitor if the system is up, a simple cron job which sends a mail
> > might be enough...
> >
> > Regards,
> >
> > Michael Brohl
> > ecomify GmbH
> > www.ecomify.de
> >
> >
> > Am 24.08.18 um 10:07 schrieb Taher Alkhateeb:
> >> Okay all neat ideas, I'm not sure if the energy you will put into
> something
> >> like this is equal to the value produced but if you want to make this
> >> happen I would be happy to assist.
> >>
> >> How much time will it take to make something like this happen? I ask
> >> because it seems Jacques ia getting annoyed with these crashes and we'd
> >> like to help him out.
> >>
> >> On Fri, Aug 24, 2018, 10:59 AM Girish Vasmatkar <
> >> girish.vasmat...@hotwaxsystems.com> wrote:
> >>
> >>> Hi Taher
> >>>
> >>> Please see my reply below in-line.
> >>>
> >>> On Fri, Aug 24, 2018 at 12:22 PM Taher Alkhateeb <
> >>> slidingfilame...@gmail.com>
> >>> wrote:
> >>>
>  Hi Girish, inline...
> 
>  On Thu, Aug 23, 2018, 7:25 PM Girish Vasmatkar <
>  girish.vasmat...@hotwaxsystems.com> wrote:
> 
> > I had earlier replied to this thread but looks like the email did not
> >>> go
> > through. I had leaned towards using the tool (only just) instead of
> may
>  be
> > having a CRON job or an alternative.
> >
> > What I feel now is that may be we can use JMX here and try to use
> >>> various
> > in build MBeans that provide CPU usage for the system and also for
> the
>  JVM
> > process we are concerned about that is OFBiz instance. We should also
> >>> be
> > able to get the memory usage of the JVM and if reaches a particular
> > threshold we can be notified.
> >
>  Do you have a PoC for all of this?
> 
> >>> GV : I can have one ready; and there is going to be much doing
> involved.
> >>>
> > In addition, I think we already add a shutdown hook to the JVM
>  process... I
> > am not sure and have not used it much but may be we can use it to
> send
>  some
> > notifications? Of course, it is applicable for graceful exits of JVM
> >>> only
> > and if you just happen to kill the process it won't be of much help.
> >
>  The shutdown hook is used for shutting down. I'm not sure what is the
>  purpose of mentioning it here?
> 
> >>>  GV : The reason I mentioned shutdown hook was it can be used to
> send
> >>> notification (may be email) or anything per our needs indicating that
> the
> >>> demo process was shut down. Per my understanding, shutdown   hook
> gets
> >>> called whenever JVM shuts down gracefully. Graceful word is very
> important
> >>> here because we won't be able to do much if someone just kills the
> process.
> >>> The only thing a shutdown hook will add to this is that we will be
> notified
> >>> then and there.
> >>>
> > Hope it makes sense and correct me if I am wrong.
>  Well I'm struggling a bit. I didn't understand exactly what needs to
> be
>  done? I see mixed topics about JMX, Mbeans, Memory monitors and
> shutdown
>  hooks. First this seems to be more like coding than a tool, and
> second I
>  have no idea how you want to implement this?
> 
> >>>  GV: Yes, it would mostly be coding rather than being a substitute
> for
> >>> the tool. My idea was that to have a timer service run within the JVM
> and
> >>> it access various MBeans for the CPU usage and Memory usages just for
> our
> >>> monitoring purpose and raise an alert if it reaches a threshold. It was
> >>> just to have a glance over how JVM is performing. The 

Re: svn commit: r1838797 - in /ofbiz/ofbiz-plugins/trunk/ecommerce: template/includes/HeaderHead.ftl widget/Theme.xml

2018-08-24 Thread Aditya Sharma
Thanks Deepak for the suggestions.

Intializing variables once & using it on all page loads seems a better
proposition than concatenation on each page load.

I have added this comment on OFBIZ-10522
. I will wait for inputs
from Julien before I update.

Thanks and Regards,

*Aditya Sharma* | Enterprise Software Engineer
HotWax Commerce  by HotWax Systems

[image: https://www.linkedin.com/in/aditya-p-sharma/]



On Fri, Aug 24, 2018 at 3:57 PM Deepak Dixit  wrote:

> Hi Aditya,
>
> I think instead of adding a name in Theme file and concat the sizes while
> rendering, we can add a new property for each size icon.
> e.g VT_SHORTCUT_ICON_32,VT_SHORTCUT_ICON_64 etc.
>
> Thanks & Regards
> --
> Deepak Dixit
>
>
> On Fri, Aug 24, 2018 at 2:48 PM,  wrote:
>
> > Author: adityasharma
> > Date: Fri Aug 24 09:18:59 2018
> > New Revision: 1838797
> >
> > URL: http://svn.apache.org/viewvc?rev=1838797=rev
> > Log:
> > Improved: Change the uggly favicon with the new one ! | Using new OFBiz
> > logo
> > (OFBIZ-10522)
> > Updated the icon for the ecommerce.
> >
> > Modified:
> > ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/HeaderHead.ftl
> > ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml
> >
> > Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/
> > HeaderHead.ftl
> > URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/
> > ecommerce/template/includes/HeaderHead.ftl?rev=1838797=
> > 1838796=1838797=diff
> > 
> > ==
> > --- ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/HeaderHead.ftl
> > (original)
> > +++ ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/HeaderHead.ftl
> > Fri Aug 24 09:18:59 2018
> > @@ -34,7 +34,12 @@ under the License.
> >  <#assign shortcutIcon = layoutSettings.shortcutIcon/>
> >
> ><#if shortcutIcon?has_content>
> > -
> > +"
> > type="image/x-icon">
> > +" type="image/png">
> > +"
> > type="image/png">
> > +"
> > type="image/png">
> > +"
> > type="image/png">
> > +<#>
> >
> ><#if layoutSettings.styleSheets?has_content>
> ><#--layoutSettings.styleSheets is a list of style sheets. So, you can
> > have a user-specified "main" style sheet,
> >
> > Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml
> > URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/
> > ecommerce/widget/Theme.xml?rev=1838797=1838796=1838797=diff
> > 
> > ==
> > --- ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml (original)
> > +++ ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml Fri Aug 24
> > 09:18:59 2018
> > @@ -37,7 +37,7 @@ under the License.
> >  
> >  
> >   > />
> > -
> > +
> >  
> >  
> >  
> >
> >
> >
>


Re: Old demo restarted

2018-08-24 Thread Jacques Le Roux

Thanks Michael,

Best idea so far!

Jacques


Le 24/08/2018 à 11:08, Michael Brohl a écrit :

We are monitoring our OFBiz instances with JMX and self hosted Zabbix [1].

Zabbix gives you a nice overview about the system health and metrics like memory  consumption etc. It also sends out warnings (Email, SMS or else) 
if metrics are exceeded (like CPU load or memory consumption) as well as the system is not accessible.


Looks like this: [2]

There is no programming needed, just some configuration for JMX and Zabbix.

[1] https://www.zabbix.com/
[2] https://www.ecomify.de/wp-content/uploads/2018/08/Zabbix_Monitoring.png

If we want to see why the demos crash, it might be useful. If we only want to monitor if the system is up, a simple cron job which sends a mail 
might be enough...


Regards,

Michael Brohl
ecomify GmbH
www.ecomify.de


Am 24.08.18 um 10:07 schrieb Taher Alkhateeb:

Okay all neat ideas, I'm not sure if the energy you will put into something
like this is equal to the value produced but if you want to make this
happen I would be happy to assist.

How much time will it take to make something like this happen? I ask
because it seems Jacques ia getting annoyed with these crashes and we'd
like to help him out.

On Fri, Aug 24, 2018, 10:59 AM Girish Vasmatkar <
girish.vasmat...@hotwaxsystems.com> wrote:


Hi Taher

Please see my reply below in-line.

On Fri, Aug 24, 2018 at 12:22 PM Taher Alkhateeb <
slidingfilame...@gmail.com>
wrote:


Hi Girish, inline...

On Thu, Aug 23, 2018, 7:25 PM Girish Vasmatkar <
girish.vasmat...@hotwaxsystems.com> wrote:


I had earlier replied to this thread but looks like the email did not

go

through. I had leaned towards using the tool (only just) instead of may

be

having a CRON job or an alternative.

What I feel now is that may be we can use JMX here and try to use

various

in build MBeans that provide CPU usage for the system and also for the

JVM

process we are concerned about that is OFBiz instance. We should also

be

able to get the memory usage of the JVM and if reaches a particular
threshold we can be notified.


Do you have a PoC for all of this?


    GV : I can have one ready; and there is going to be much doing involved.


In addition, I think we already add a shutdown hook to the JVM

process... I

am not sure and have not used it much but may be we can use it to send

some

notifications? Of course, it is applicable for graceful exits of JVM

only

and if you just happen to kill the process it won't be of much help.


The shutdown hook is used for shutting down. I'm not sure what is the
purpose of mentioning it here?


 GV : The reason I mentioned shutdown hook was it can be used to send
notification (may be email) or anything per our needs indicating that the
demo process was shut down. Per my understanding, shutdown   hook gets
called whenever JVM shuts down gracefully. Graceful word is very important
here because we won't be able to do much if someone just kills the process.
The only thing a shutdown hook will add to this is that we will be notified
then and there.


Hope it makes sense and correct me if I am wrong.

Well I'm struggling a bit. I didn't understand exactly what needs to be
done? I see mixed topics about JMX, Mbeans, Memory monitors and shutdown
hooks. First this seems to be more like coding than a tool, and second I
have no idea how you want to implement this?


 GV: Yes, it would mostly be coding rather than being a substitute for
the tool. My idea was that to have a timer service run within the JVM and
it access various MBeans for the CPU usage and Memory usages just for our
monitoring purpose and raise an alert if it reaches a threshold. It was
just to have a glance over how JVM is performing. The disadvantage? The
service will run in OFBiz JVM and there will be considerable amount of
coding involved.


My idea for example is simple: create a cronjob that checks the system
periodically and if the demo process stopped, restart it (or maybe

rebuild

and restart). To go with your suggestion we need to perhaps first
understand it.


    GV: There is nothing wrong with creating a CRON job, per se. The only
reason why I introduced MBeans in the mix was to be able to sort of having
OFBiz monitor itself within it's realm, hence use of MBeans. I believe a
CRON will be able to do it as well. I probably did not get that we probably
want something that take some action after the JVM has crashed and not
having something that monitors the process and alerts concerned parties
that the process is occupying more than say 2 GB or it's CPU usage has
spiked above 80%.

All in all, I feel we should choose the solution based on what we want to
do and whether we want to take it further as well. I do not know what the
tool does now or whether it can build the system again and restart it
automatically. I also do not know what measures we take in such an event. I
agree CRON will be simplest of them all, but if the tool provides all of

Re: Old demo restarted

2018-08-24 Thread Jacques Le Roux

Le 24/08/2018 à 08:51, Taher Alkhateeb a écrit :

My idea for example is simple: create a cronjob that checks the system
periodically and if the demo process stopped, restart it (or maybe rebuild
and restart). To go with your suggestion we need to perhaps first
understand it.

Hi Taher,

I don't like much this idea because it excludes the idea of post mortem. Even 
if we don't always do it, it can be useful sometimes...

Jacques



Re: svn commit: r1838797 - in /ofbiz/ofbiz-plugins/trunk/ecommerce: template/includes/HeaderHead.ftl widget/Theme.xml

2018-08-24 Thread Deepak Dixit
Hi Aditya,

I think instead of adding a name in Theme file and concat the sizes while
rendering, we can add a new property for each size icon.
e.g VT_SHORTCUT_ICON_32,VT_SHORTCUT_ICON_64 etc.

Thanks & Regards
--
Deepak Dixit


On Fri, Aug 24, 2018 at 2:48 PM,  wrote:

> Author: adityasharma
> Date: Fri Aug 24 09:18:59 2018
> New Revision: 1838797
>
> URL: http://svn.apache.org/viewvc?rev=1838797=rev
> Log:
> Improved: Change the uggly favicon with the new one ! | Using new OFBiz
> logo
> (OFBIZ-10522)
> Updated the icon for the ecommerce.
>
> Modified:
> ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/HeaderHead.ftl
> ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml
>
> Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/
> HeaderHead.ftl
> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/
> ecommerce/template/includes/HeaderHead.ftl?rev=1838797=
> 1838796=1838797=diff
> 
> ==
> --- ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/HeaderHead.ftl
> (original)
> +++ ofbiz/ofbiz-plugins/trunk/ecommerce/template/includes/HeaderHead.ftl
> Fri Aug 24 09:18:59 2018
> @@ -34,7 +34,12 @@ under the License.
>  <#assign shortcutIcon = layoutSettings.shortcutIcon/>
>
><#if shortcutIcon?has_content>
> -
> +"
> type="image/x-icon">
> +" type="image/png">
> +"
> type="image/png">
> +"
> type="image/png">
> +"
> type="image/png">
> +<#>
>
><#if layoutSettings.styleSheets?has_content>
><#--layoutSettings.styleSheets is a list of style sheets. So, you can
> have a user-specified "main" style sheet,
>
> Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml
> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/
> ecommerce/widget/Theme.xml?rev=1838797=1838796=1838797=diff
> 
> ==
> --- ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml (original)
> +++ ofbiz/ofbiz-plugins/trunk/ecommerce/widget/Theme.xml Fri Aug 24
> 09:18:59 2018
> @@ -37,7 +37,7 @@ under the License.
>  
>  
>   />
> -
> +
>  
>  
>  
>
>
>


Re: Issue with opening a bookmarked page when the user is logged out

2018-08-24 Thread Ritesh Kumar
Using the POST method does not append form data to the URL, i.e, the
parameters will not be visible in the URL.
For example, take a Find Screen (say, FindWorkEffort) which send data
through a form with POST method. Apply some filters (say, status). No
applied filters appear in the URL.  Bookmark this page. Next time when I
open this bookmark, those applied filters will not be there as this page is
being rendered using data from the URL and since the applied filters were
not there in the bookmarked URL, this page is rendered without the applied
filters. That is why I used GET form method so that I am able to get the
page with applied filters when I open a bookmarked page.

The bug here is (supposing the GET method is used)
1. On opening the bookmark, the page is rendered with double encoding (if
the value had a space character initially, the space character was already
encoded into '+' in the URL and when this bookmark is opened, this '+' is
again encoded).
2. Suppose the bookmarked URL had multiple values from the same filter
(say, Cancelled and Declined status), it renders with just one of the
statutes applied. It is because the request handler prepares a Map of
parameters from the query string and as is the property of Map to replace
the old value if a new value is being added with the same key (in this
example, first Cancelled status is put in this Map and then Declined), only
Declined status is put in this Map.

Hope, this clears the confusion. I will be happy to provide more
information if needed.

On Fri, Aug 24, 2018 at 1:46 PM Taher Alkhateeb 
wrote:

> Not enough information. What happens exactly? What is the bug? What do you
> mean by it does not let us do that?
>
> On Fri, Aug 24, 2018, 11:09 AM Ritesh Kumar <
> ritesh.ku...@hotwaxsystems.com>
> wrote:
>
> > Hello Taher,
> >
> > Changing form method to GET is just to make the query parameters visible
> in
> > the URL so that a user is able to bookmark or share it. Using the POST
> > method does not let us do that.
> >
> > On Fri, Aug 24, 2018 at 11:54 AM Taher Alkhateeb <
> > slidingfilame...@gmail.com>
> > wrote:
> >
> > > Why did you change the method to GET?
> > >
> > > On Fri, Aug 24, 2018, 9:20 AM Ritesh Kumar <
> > ritesh.ku...@hotwaxsystems.com
> > > >
> > > wrote:
> > >
> > > > Just to put my point more clearly, let me add the steps to generate
> the
> > > > above-mentioned case. Please refer demo-trunk
> > > > .
> > > >
> > > > 1. Open this link, FindWorkEffort
> > > > <
> https://demo-trunk.ofbiz.apache.org/workeffort/control/FindWorkEffort
> > >.
> > > > Find Work Effort screen will be rendered.
> > > > 2. Inspect and change the form method to "GET".
> > > > 3. Apply any of the two statuses (say, Cancelled and Declined). Click
> > on
> > > > Find.
> > > > 4. Records will be fetched according to the applied filters.
> > > > 5. Check the URL. Cancelled and Declined statuses must be there in
> the
> > > URL.
> > > > 6. Bookmark this page and log out.
> > > > 7. Now, open the bookmark.
> > > > 8. The login page will be rendered. Check the URL here. It will be
> the
> > > same
> > > > as it was when the page was being bookmarked.
> > > > 9. Type in the credentials and log in.
> > > > 10. The result may be different. Check the URL. One of the statuses
> is
> > > > gone.
> > > >
> > > > Due to business requirement, I need to show query parameters in the
> URL
> > > so
> > > > that the user is able to bookmark the page. And, we normally pass Id
> in
> > > the
> > > > parameters, but, due to some reason, I may have to pass values with
> > space
> > > > characters.
> > > >
> > > > I hope, this demo puts forth my concern.
> > > >
> > > >
> > > >
> > > > On Thu, Aug 23, 2018 at 6:27 PM Ritesh Kumar <
> > > > ritesh.ku...@hotwaxsystems.com>
> > > > wrote:
> > > >
> > > > > Hello All,
> > > > >
> > > > > I faced an issue while trying to open a bookmarked page with OFBiz.
> > > > >
> > > > > Suppose, the URL of this bookmarked page contains a parameter with
> > > > > multiple values and the value may have space character. The query
> > > string
> > > > in
> > > > > the URL looks somewhat like this
> > > > >
> > > > >
> > > >
> > >
> >
> "?categoryHierarchy=3%2FCompany+Catalog%2FBrowse+Root%2FCloths%2FMen%2F"=approved=created".
> > > > > The "%2F" and "+" are encoded value of  "/", a separator and space
> > > > > character respectively. The status id parameter appears twice and
> the
> > > > > category hierarchy value has space character.
> > > > >
> > > > > The user is logged out at this instance and this bookmarked page is
> > > > > opened. Since the user is not logged in, the login page is
> rendered.
> > I
> > > > feed
> > > > > in the credentials and the intended URL is hit. Here, I do not get
> > the
> > > > > required result.
> > > > >
> > > > > When I check the URL, the parameter with multiple values just has
> the
> > > > last
> > > > > value of the list and "+" is encoded into 

Re: Old demo restarted

2018-08-24 Thread Michael Brohl
There is no need to implement anything in OFBiz to monitor it's metrics 
or the underlying OS.


For the metrics, we can simply use JMX and the OS metrics can be 
retrieved by onboard tools or additional tools on the server.


I would be in favor of not using any third party tools from outside 
which collect data like Jacques has already setup. We should use tools 
running on the server itself or running on other ASF servers.


Reagrds,

Michael Brohl
ecomify GmbH
www.ecomify.de


Am 24.08.18 um 11:20 schrieb Pierre Smits:

I may be mistaken, but it seems to me that a lot of functions of OS
monitoring tools (think Nagios, Munin, and more commercial products like
DataDog) cover several aspects mentioning in this thread and some of the
features therein are to be replicated into the OFBiz solution.

If that is the case I expect a lot work (and a lengthy implementation
track) to be required with minimal added value to adopters.


Best regards,

Pierre Smits


On Fri, Aug 24, 2018 at 10:07 AM, Taher Alkhateeb <
slidingfilame...@gmail.com> wrote:


Okay all neat ideas, I'm not sure if the energy you will put into something
like this is equal to the value produced but if you want to make this
happen I would be happy to assist.

How much time will it take to make something like this happen? I ask
because it seems Jacques ia getting annoyed with these crashes and we'd
like to help him out.







smime.p7s
Description: S/MIME Cryptographic Signature


Re: Old demo restarted

2018-08-24 Thread Pierre Smits
I may be mistaken, but it seems to me that a lot of functions of OS
monitoring tools (think Nagios, Munin, and more commercial products like
DataDog) cover several aspects mentioning in this thread and some of the
features therein are to be replicated into the OFBiz solution.

If that is the case I expect a lot work (and a lengthy implementation
track) to be required with minimal added value to adopters.


Best regards,

Pierre Smits

Apache Trafodion , Vice President
Apache Directory , PMC Member
Apache Incubator , committer
*Apache OFBiz , contributor (without privileges)
since 2008*
Apache Steve , committer

On Fri, Aug 24, 2018 at 10:07 AM, Taher Alkhateeb <
slidingfilame...@gmail.com> wrote:

> Okay all neat ideas, I'm not sure if the energy you will put into something
> like this is equal to the value produced but if you want to make this
> happen I would be happy to assist.
>
> How much time will it take to make something like this happen? I ask
> because it seems Jacques ia getting annoyed with these crashes and we'd
> like to help him out.
>
> On Fri, Aug 24, 2018, 10:59 AM Girish Vasmatkar <
> girish.vasmat...@hotwaxsystems.com> wrote:
>
> > Hi Taher
> >
> > Please see my reply below in-line.
> >
> > On Fri, Aug 24, 2018 at 12:22 PM Taher Alkhateeb <
> > slidingfilame...@gmail.com>
> > wrote:
> >
> > > Hi Girish, inline...
> > >
> > > On Thu, Aug 23, 2018, 7:25 PM Girish Vasmatkar <
> > > girish.vasmat...@hotwaxsystems.com> wrote:
> > >
> > > > I had earlier replied to this thread but looks like the email did not
> > go
> > > > through. I had leaned towards using the tool (only just) instead of
> may
> > > be
> > > > having a CRON job or an alternative.
> > > >
> > > > What I feel now is that may be we can use JMX here and try to use
> > various
> > > > in build MBeans that provide CPU usage for the system and also for
> the
> > > JVM
> > > > process we are concerned about that is OFBiz instance. We should also
> > be
> > > > able to get the memory usage of the JVM and if reaches a particular
> > > > threshold we can be notified.
> > > >
> > > Do you have a PoC for all of this?
> > >
> >GV : I can have one ready; and there is going to be much doing
> involved.
> >
> > >
> > > >
> > > > In addition, I think we already add a shutdown hook to the JVM
> > > process... I
> > > > am not sure and have not used it much but may be we can use it to
> send
> > > some
> > > > notifications? Of course, it is applicable for graceful exits of JVM
> > only
> > > > and if you just happen to kill the process it won't be of much help.
> > > >
> > > The shutdown hook is used for shutting down. I'm not sure what is the
> > > purpose of mentioning it here?
> > >
> > GV : The reason I mentioned shutdown hook was it can be used to send
> > notification (may be email) or anything per our needs indicating that the
> > demo process was shut down. Per my understanding, shutdown   hook
> gets
> > called whenever JVM shuts down gracefully. Graceful word is very
> important
> > here because we won't be able to do much if someone just kills the
> process.
> > The only thing a shutdown hook will add to this is that we will be
> notified
> > then and there.
> >
> > >
> > > >
> > > > Hope it makes sense and correct me if I am wrong.
> > >
> > > Well I'm struggling a bit. I didn't understand exactly what needs to be
> > > done? I see mixed topics about JMX, Mbeans, Memory monitors and
> shutdown
> > > hooks. First this seems to be more like coding than a tool, and second
> I
> > > have no idea how you want to implement this?
> > >
> > GV: Yes, it would mostly be coding rather than being a substitute for
> > the tool. My idea was that to have a timer service run within the JVM and
> > it access various MBeans for the CPU usage and Memory usages just for our
> > monitoring purpose and raise an alert if it reaches a threshold. It was
> > just to have a glance over how JVM is performing. The disadvantage? The
> > service will run in OFBiz JVM and there will be considerable amount of
> > coding involved.
> >
> > >
> > > My idea for example is simple: create a cronjob that checks the system
> > > periodically and if the demo process stopped, restart it (or maybe
> > rebuild
> > > and restart). To go with your suggestion we need to perhaps first
> > > understand it.
> > >
> >GV: There is nothing wrong with creating a CRON job, per se. The only
> > reason why I introduced MBeans in the mix was to be able to sort of
> having
> > OFBiz monitor itself within it's realm, hence use of MBeans. I believe a
> > CRON will be able to do it as well. I probably did not get that we
> probably
> > want something that take some action after the JVM has crashed and not
> > having something that monitors the process and alerts concerned parties
> > that the process is occupying more than say 2 GB 

Re: Old demo restarted

2018-08-24 Thread Michael Brohl

We are monitoring our OFBiz instances with JMX and self hosted Zabbix [1].

Zabbix gives you a nice overview about the system health and metrics 
like memory  consumption etc. It also sends out warnings (Email, SMS or 
else) if metrics are exceeded (like CPU load or memory consumption) as 
well as the system is not accessible.


Looks like this: [2]

There is no programming needed, just some configuration for JMX and Zabbix.

[1] https://www.zabbix.com/
[2] https://www.ecomify.de/wp-content/uploads/2018/08/Zabbix_Monitoring.png

If we want to see why the demos crash, it might be useful. If we only 
want to monitor if the system is up, a simple cron job which sends a 
mail might be enough...


Regards,

Michael Brohl
ecomify GmbH
www.ecomify.de


Am 24.08.18 um 10:07 schrieb Taher Alkhateeb:

Okay all neat ideas, I'm not sure if the energy you will put into something
like this is equal to the value produced but if you want to make this
happen I would be happy to assist.

How much time will it take to make something like this happen? I ask
because it seems Jacques ia getting annoyed with these crashes and we'd
like to help him out.

On Fri, Aug 24, 2018, 10:59 AM Girish Vasmatkar <
girish.vasmat...@hotwaxsystems.com> wrote:


Hi Taher

Please see my reply below in-line.

On Fri, Aug 24, 2018 at 12:22 PM Taher Alkhateeb <
slidingfilame...@gmail.com>
wrote:


Hi Girish, inline...

On Thu, Aug 23, 2018, 7:25 PM Girish Vasmatkar <
girish.vasmat...@hotwaxsystems.com> wrote:


I had earlier replied to this thread but looks like the email did not

go

through. I had leaned towards using the tool (only just) instead of may

be

having a CRON job or an alternative.

What I feel now is that may be we can use JMX here and try to use

various

in build MBeans that provide CPU usage for the system and also for the

JVM

process we are concerned about that is OFBiz instance. We should also

be

able to get the memory usage of the JVM and if reaches a particular
threshold we can be notified.


Do you have a PoC for all of this?


GV : I can have one ready; and there is going to be much doing involved.


In addition, I think we already add a shutdown hook to the JVM

process... I

am not sure and have not used it much but may be we can use it to send

some

notifications? Of course, it is applicable for graceful exits of JVM

only

and if you just happen to kill the process it won't be of much help.


The shutdown hook is used for shutting down. I'm not sure what is the
purpose of mentioning it here?


 GV : The reason I mentioned shutdown hook was it can be used to send
notification (may be email) or anything per our needs indicating that the
demo process was shut down. Per my understanding, shutdown   hook gets
called whenever JVM shuts down gracefully. Graceful word is very important
here because we won't be able to do much if someone just kills the process.
The only thing a shutdown hook will add to this is that we will be notified
then and there.


Hope it makes sense and correct me if I am wrong.

Well I'm struggling a bit. I didn't understand exactly what needs to be
done? I see mixed topics about JMX, Mbeans, Memory monitors and shutdown
hooks. First this seems to be more like coding than a tool, and second I
have no idea how you want to implement this?


 GV: Yes, it would mostly be coding rather than being a substitute for
the tool. My idea was that to have a timer service run within the JVM and
it access various MBeans for the CPU usage and Memory usages just for our
monitoring purpose and raise an alert if it reaches a threshold. It was
just to have a glance over how JVM is performing. The disadvantage? The
service will run in OFBiz JVM and there will be considerable amount of
coding involved.


My idea for example is simple: create a cronjob that checks the system
periodically and if the demo process stopped, restart it (or maybe

rebuild

and restart). To go with your suggestion we need to perhaps first
understand it.


GV: There is nothing wrong with creating a CRON job, per se. The only
reason why I introduced MBeans in the mix was to be able to sort of having
OFBiz monitor itself within it's realm, hence use of MBeans. I believe a
CRON will be able to do it as well. I probably did not get that we probably
want something that take some action after the JVM has crashed and not
having something that monitors the process and alerts concerned parties
that the process is occupying more than say 2 GB or it's CPU usage has
spiked above 80%.

All in all, I feel we should choose the solution based on what we want to
do and whether we want to take it further as well. I do not know what the
tool does now or whether it can build the system again and restart it
automatically. I also do not know what measures we take in such an event. I
agree CRON will be simplest of them all, but if the tool provides all of
these (be able to take corrective measures) and not just send
notifications, then it can also 

Re: Issue with opening a bookmarked page when the user is logged out

2018-08-24 Thread Taher Alkhateeb
Not enough information. What happens exactly? What is the bug? What do you
mean by it does not let us do that?

On Fri, Aug 24, 2018, 11:09 AM Ritesh Kumar 
wrote:

> Hello Taher,
>
> Changing form method to GET is just to make the query parameters visible in
> the URL so that a user is able to bookmark or share it. Using the POST
> method does not let us do that.
>
> On Fri, Aug 24, 2018 at 11:54 AM Taher Alkhateeb <
> slidingfilame...@gmail.com>
> wrote:
>
> > Why did you change the method to GET?
> >
> > On Fri, Aug 24, 2018, 9:20 AM Ritesh Kumar <
> ritesh.ku...@hotwaxsystems.com
> > >
> > wrote:
> >
> > > Just to put my point more clearly, let me add the steps to generate the
> > > above-mentioned case. Please refer demo-trunk
> > > .
> > >
> > > 1. Open this link, FindWorkEffort
> > >  >.
> > > Find Work Effort screen will be rendered.
> > > 2. Inspect and change the form method to "GET".
> > > 3. Apply any of the two statuses (say, Cancelled and Declined). Click
> on
> > > Find.
> > > 4. Records will be fetched according to the applied filters.
> > > 5. Check the URL. Cancelled and Declined statuses must be there in the
> > URL.
> > > 6. Bookmark this page and log out.
> > > 7. Now, open the bookmark.
> > > 8. The login page will be rendered. Check the URL here. It will be the
> > same
> > > as it was when the page was being bookmarked.
> > > 9. Type in the credentials and log in.
> > > 10. The result may be different. Check the URL. One of the statuses is
> > > gone.
> > >
> > > Due to business requirement, I need to show query parameters in the URL
> > so
> > > that the user is able to bookmark the page. And, we normally pass Id in
> > the
> > > parameters, but, due to some reason, I may have to pass values with
> space
> > > characters.
> > >
> > > I hope, this demo puts forth my concern.
> > >
> > >
> > >
> > > On Thu, Aug 23, 2018 at 6:27 PM Ritesh Kumar <
> > > ritesh.ku...@hotwaxsystems.com>
> > > wrote:
> > >
> > > > Hello All,
> > > >
> > > > I faced an issue while trying to open a bookmarked page with OFBiz.
> > > >
> > > > Suppose, the URL of this bookmarked page contains a parameter with
> > > > multiple values and the value may have space character. The query
> > string
> > > in
> > > > the URL looks somewhat like this
> > > >
> > > >
> > >
> >
> "?categoryHierarchy=3%2FCompany+Catalog%2FBrowse+Root%2FCloths%2FMen%2F"=approved=created".
> > > > The "%2F" and "+" are encoded value of  "/", a separator and space
> > > > character respectively. The status id parameter appears twice and the
> > > > category hierarchy value has space character.
> > > >
> > > > The user is logged out at this instance and this bookmarked page is
> > > > opened. Since the user is not logged in, the login page is rendered.
> I
> > > feed
> > > > in the credentials and the intended URL is hit. Here, I do not get
> the
> > > > required result.
> > > >
> > > > When I check the URL, the parameter with multiple values just has the
> > > last
> > > > value of the list and "+" is encoded into "%2B". The URL now is
> > > >
> > > >
> > >
> >
> "?categoryHierarchy=3%2FCompany%2BCatalog%2FBrowse%2BRoot%2FCloths%2FMen%2F"==created."
> > > >
> > > > I did some digging and found out that LoginWorker.checkLogin() comes
> > into
> > > > action and what it does is that it creates a new session object
> > (because
> > > > the previous session becomes invalid) and in the session object, it
> > puts
> > > > the previous URL parameters. This previous URL parameters are fetched
> > > using
> > > > UtilHttp.getUrlOnlyParameterMap(request) which internally calls
> > > > getQueryStringOnlyParameterMap(). This method returns a map by
> breaking
> > > the
> > > > query string into key and value pair. A map can not have duplicate
> keys
> > > (in
> > > > this case removes the approved status) and the value is not decoded
> > > before
> > > > putting it into the map ('+' is not decoded). This map is then used
> to
> > > > create an encoded ('+' is encoded into '%2B' ) redirect target and
> then
> > > > callRedirect() is called on this new redirect target, ending up with
> > > > unintended URL (inside RequestHandler.doRequest()).
> > > >
> > > > I could resolve this issue by decoding the already encoded value
> before
> > > > putting it into the Map and if the key is already present in the Map,
> > it
> > > > must create a list of the values.
> > > >
> > > > Am I missing something or is this really a bug and needs to be
> > addressed
> > > > OOTB?
> > > > If this is a bug, is proposed solution the right one?
> > > >
> > > > --
> > > > Best,
> > > > Ritesh Kumar
> > > >
> > > >
> > >
> >
>


Re: Issue with opening a bookmarked page when the user is logged out

2018-08-24 Thread Ritesh Kumar
Hello Taher,

Changing form method to GET is just to make the query parameters visible in
the URL so that a user is able to bookmark or share it. Using the POST
method does not let us do that.

On Fri, Aug 24, 2018 at 11:54 AM Taher Alkhateeb 
wrote:

> Why did you change the method to GET?
>
> On Fri, Aug 24, 2018, 9:20 AM Ritesh Kumar  >
> wrote:
>
> > Just to put my point more clearly, let me add the steps to generate the
> > above-mentioned case. Please refer demo-trunk
> > .
> >
> > 1. Open this link, FindWorkEffort
> > .
> > Find Work Effort screen will be rendered.
> > 2. Inspect and change the form method to "GET".
> > 3. Apply any of the two statuses (say, Cancelled and Declined). Click on
> > Find.
> > 4. Records will be fetched according to the applied filters.
> > 5. Check the URL. Cancelled and Declined statuses must be there in the
> URL.
> > 6. Bookmark this page and log out.
> > 7. Now, open the bookmark.
> > 8. The login page will be rendered. Check the URL here. It will be the
> same
> > as it was when the page was being bookmarked.
> > 9. Type in the credentials and log in.
> > 10. The result may be different. Check the URL. One of the statuses is
> > gone.
> >
> > Due to business requirement, I need to show query parameters in the URL
> so
> > that the user is able to bookmark the page. And, we normally pass Id in
> the
> > parameters, but, due to some reason, I may have to pass values with space
> > characters.
> >
> > I hope, this demo puts forth my concern.
> >
> >
> >
> > On Thu, Aug 23, 2018 at 6:27 PM Ritesh Kumar <
> > ritesh.ku...@hotwaxsystems.com>
> > wrote:
> >
> > > Hello All,
> > >
> > > I faced an issue while trying to open a bookmarked page with OFBiz.
> > >
> > > Suppose, the URL of this bookmarked page contains a parameter with
> > > multiple values and the value may have space character. The query
> string
> > in
> > > the URL looks somewhat like this
> > >
> > >
> >
> "?categoryHierarchy=3%2FCompany+Catalog%2FBrowse+Root%2FCloths%2FMen%2F"=approved=created".
> > > The "%2F" and "+" are encoded value of  "/", a separator and space
> > > character respectively. The status id parameter appears twice and the
> > > category hierarchy value has space character.
> > >
> > > The user is logged out at this instance and this bookmarked page is
> > > opened. Since the user is not logged in, the login page is rendered. I
> > feed
> > > in the credentials and the intended URL is hit. Here, I do not get the
> > > required result.
> > >
> > > When I check the URL, the parameter with multiple values just has the
> > last
> > > value of the list and "+" is encoded into "%2B". The URL now is
> > >
> > >
> >
> "?categoryHierarchy=3%2FCompany%2BCatalog%2FBrowse%2BRoot%2FCloths%2FMen%2F"==created."
> > >
> > > I did some digging and found out that LoginWorker.checkLogin() comes
> into
> > > action and what it does is that it creates a new session object
> (because
> > > the previous session becomes invalid) and in the session object, it
> puts
> > > the previous URL parameters. This previous URL parameters are fetched
> > using
> > > UtilHttp.getUrlOnlyParameterMap(request) which internally calls
> > > getQueryStringOnlyParameterMap(). This method returns a map by breaking
> > the
> > > query string into key and value pair. A map can not have duplicate keys
> > (in
> > > this case removes the approved status) and the value is not decoded
> > before
> > > putting it into the map ('+' is not decoded). This map is then used to
> > > create an encoded ('+' is encoded into '%2B' ) redirect target and then
> > > callRedirect() is called on this new redirect target, ending up with
> > > unintended URL (inside RequestHandler.doRequest()).
> > >
> > > I could resolve this issue by decoding the already encoded value before
> > > putting it into the Map and if the key is already present in the Map,
> it
> > > must create a list of the values.
> > >
> > > Am I missing something or is this really a bug and needs to be
> addressed
> > > OOTB?
> > > If this is a bug, is proposed solution the right one?
> > >
> > > --
> > > Best,
> > > Ritesh Kumar
> > >
> > >
> >
>


Re: Old demo restarted

2018-08-24 Thread Taher Alkhateeb
Okay all neat ideas, I'm not sure if the energy you will put into something
like this is equal to the value produced but if you want to make this
happen I would be happy to assist.

How much time will it take to make something like this happen? I ask
because it seems Jacques ia getting annoyed with these crashes and we'd
like to help him out.

On Fri, Aug 24, 2018, 10:59 AM Girish Vasmatkar <
girish.vasmat...@hotwaxsystems.com> wrote:

> Hi Taher
>
> Please see my reply below in-line.
>
> On Fri, Aug 24, 2018 at 12:22 PM Taher Alkhateeb <
> slidingfilame...@gmail.com>
> wrote:
>
> > Hi Girish, inline...
> >
> > On Thu, Aug 23, 2018, 7:25 PM Girish Vasmatkar <
> > girish.vasmat...@hotwaxsystems.com> wrote:
> >
> > > I had earlier replied to this thread but looks like the email did not
> go
> > > through. I had leaned towards using the tool (only just) instead of may
> > be
> > > having a CRON job or an alternative.
> > >
> > > What I feel now is that may be we can use JMX here and try to use
> various
> > > in build MBeans that provide CPU usage for the system and also for the
> > JVM
> > > process we are concerned about that is OFBiz instance. We should also
> be
> > > able to get the memory usage of the JVM and if reaches a particular
> > > threshold we can be notified.
> > >
> > Do you have a PoC for all of this?
> >
>GV : I can have one ready; and there is going to be much doing involved.
>
> >
> > >
> > > In addition, I think we already add a shutdown hook to the JVM
> > process... I
> > > am not sure and have not used it much but may be we can use it to send
> > some
> > > notifications? Of course, it is applicable for graceful exits of JVM
> only
> > > and if you just happen to kill the process it won't be of much help.
> > >
> > The shutdown hook is used for shutting down. I'm not sure what is the
> > purpose of mentioning it here?
> >
> GV : The reason I mentioned shutdown hook was it can be used to send
> notification (may be email) or anything per our needs indicating that the
> demo process was shut down. Per my understanding, shutdown   hook gets
> called whenever JVM shuts down gracefully. Graceful word is very important
> here because we won't be able to do much if someone just kills the process.
> The only thing a shutdown hook will add to this is that we will be notified
> then and there.
>
> >
> > >
> > > Hope it makes sense and correct me if I am wrong.
> >
> > Well I'm struggling a bit. I didn't understand exactly what needs to be
> > done? I see mixed topics about JMX, Mbeans, Memory monitors and shutdown
> > hooks. First this seems to be more like coding than a tool, and second I
> > have no idea how you want to implement this?
> >
> GV: Yes, it would mostly be coding rather than being a substitute for
> the tool. My idea was that to have a timer service run within the JVM and
> it access various MBeans for the CPU usage and Memory usages just for our
> monitoring purpose and raise an alert if it reaches a threshold. It was
> just to have a glance over how JVM is performing. The disadvantage? The
> service will run in OFBiz JVM and there will be considerable amount of
> coding involved.
>
> >
> > My idea for example is simple: create a cronjob that checks the system
> > periodically and if the demo process stopped, restart it (or maybe
> rebuild
> > and restart). To go with your suggestion we need to perhaps first
> > understand it.
> >
>GV: There is nothing wrong with creating a CRON job, per se. The only
> reason why I introduced MBeans in the mix was to be able to sort of having
> OFBiz monitor itself within it's realm, hence use of MBeans. I believe a
> CRON will be able to do it as well. I probably did not get that we probably
> want something that take some action after the JVM has crashed and not
> having something that monitors the process and alerts concerned parties
> that the process is occupying more than say 2 GB or it's CPU usage has
> spiked above 80%.
>
> All in all, I feel we should choose the solution based on what we want to
> do and whether we want to take it further as well. I do not know what the
> tool does now or whether it can build the system again and restart it
> automatically. I also do not know what measures we take in such an event. I
> agree CRON will be simplest of them all, but if the tool provides all of
> these (be able to take corrective measures) and not just send
> notifications, then it can also be worth it's salt. Yes, CRON will be more
> technical way of achieving :)
>
> Thanks and Best regards,
> Girish Vasmatkar
> HotWax Systems
>
> >
> > >
> > > Best regards,
> > > Girish Vasmatkar
> > > HotWax Systems
> > >
> > >
> > > On Thu, Aug 23, 2018 at 8:48 PM Jacques Le Roux <
> > > jacques.le.r...@les7arts.com> wrote:
> > >
> > > > Le 23/08/2018 à 14:04, Taher Alkhateeb a écrit :
> > > > > I'm not sure why you're hanging this on me,
> > > > Because you answered to the bait ;)
> > > >
> > > > > but sure I'm willing to
> > > > > 

Re: Old demo restarted

2018-08-24 Thread Girish Vasmatkar
Hi Taher

Please see my reply below in-line.

On Fri, Aug 24, 2018 at 12:22 PM Taher Alkhateeb 
wrote:

> Hi Girish, inline...
>
> On Thu, Aug 23, 2018, 7:25 PM Girish Vasmatkar <
> girish.vasmat...@hotwaxsystems.com> wrote:
>
> > I had earlier replied to this thread but looks like the email did not go
> > through. I had leaned towards using the tool (only just) instead of may
> be
> > having a CRON job or an alternative.
> >
> > What I feel now is that may be we can use JMX here and try to use various
> > in build MBeans that provide CPU usage for the system and also for the
> JVM
> > process we are concerned about that is OFBiz instance. We should also be
> > able to get the memory usage of the JVM and if reaches a particular
> > threshold we can be notified.
> >
> Do you have a PoC for all of this?
>
   GV : I can have one ready; and there is going to be much doing involved.

>
> >
> > In addition, I think we already add a shutdown hook to the JVM
> process... I
> > am not sure and have not used it much but may be we can use it to send
> some
> > notifications? Of course, it is applicable for graceful exits of JVM only
> > and if you just happen to kill the process it won't be of much help.
> >
> The shutdown hook is used for shutting down. I'm not sure what is the
> purpose of mentioning it here?
>
GV : The reason I mentioned shutdown hook was it can be used to send
notification (may be email) or anything per our needs indicating that the
demo process was shut down. Per my understanding, shutdown   hook gets
called whenever JVM shuts down gracefully. Graceful word is very important
here because we won't be able to do much if someone just kills the process.
The only thing a shutdown hook will add to this is that we will be notified
then and there.

>
> >
> > Hope it makes sense and correct me if I am wrong.
>
> Well I'm struggling a bit. I didn't understand exactly what needs to be
> done? I see mixed topics about JMX, Mbeans, Memory monitors and shutdown
> hooks. First this seems to be more like coding than a tool, and second I
> have no idea how you want to implement this?
>
GV: Yes, it would mostly be coding rather than being a substitute for
the tool. My idea was that to have a timer service run within the JVM and
it access various MBeans for the CPU usage and Memory usages just for our
monitoring purpose and raise an alert if it reaches a threshold. It was
just to have a glance over how JVM is performing. The disadvantage? The
service will run in OFBiz JVM and there will be considerable amount of
coding involved.

>
> My idea for example is simple: create a cronjob that checks the system
> periodically and if the demo process stopped, restart it (or maybe rebuild
> and restart). To go with your suggestion we need to perhaps first
> understand it.
>
   GV: There is nothing wrong with creating a CRON job, per se. The only
reason why I introduced MBeans in the mix was to be able to sort of having
OFBiz monitor itself within it's realm, hence use of MBeans. I believe a
CRON will be able to do it as well. I probably did not get that we probably
want something that take some action after the JVM has crashed and not
having something that monitors the process and alerts concerned parties
that the process is occupying more than say 2 GB or it's CPU usage has
spiked above 80%.

All in all, I feel we should choose the solution based on what we want to
do and whether we want to take it further as well. I do not know what the
tool does now or whether it can build the system again and restart it
automatically. I also do not know what measures we take in such an event. I
agree CRON will be simplest of them all, but if the tool provides all of
these (be able to take corrective measures) and not just send
notifications, then it can also be worth it's salt. Yes, CRON will be more
technical way of achieving :)

Thanks and Best regards,
Girish Vasmatkar
HotWax Systems

>
> >
> > Best regards,
> > Girish Vasmatkar
> > HotWax Systems
> >
> >
> > On Thu, Aug 23, 2018 at 8:48 PM Jacques Le Roux <
> > jacques.le.r...@les7arts.com> wrote:
> >
> > > Le 23/08/2018 à 14:04, Taher Alkhateeb a écrit :
> > > > I'm not sure why you're hanging this on me,
> > > Because you answered to the bait ;)
> > >
> > > > but sure I'm willing to
> > > > help.
> > > Thanks, much appreciated!
> > >
> > > > Can I get some information on how the crashes are happening and
> > > > how you're getting notified, and I will take it from there.
> > > I think after a crash it's mostly to use dumps there (we have several
> > from
> > > the recent pas) but I'm not sure they will help, and it takes time to
> > > analyse.
> > >
> > > In the past I took the time to analyse some of them and it was
> > > interesting. For instance in 2010 I found a bug in a Java version we
> were
> > > using and it
> > > helped me in a custom project I was also doing then:
> > > https://markmail.org/message/byu2ivjn7wckayzz
> > >
> > > Lastly it was mostly lack of 

Re: Promised Datetime & Current Promised Date values not getting updated in OISGIR Entity

2018-08-24 Thread deepak nigam
*Updated the description.* :)

Thanks & Regards
--
Deepak Nigam
HotWax Systems Pvt. Ltd.

On Fri, Aug 24, 2018 at 1:17 PM deepak nigam 
wrote:

> Thanks, Taher.
>
> Update the description in the ticket.
>
> Thanks & Regards
> --
> Deepak Nigam
> HotWax Systems Pvt. Ltd.
>
>
> On Fri, Aug 24, 2018 at 12:04 PM Taher Alkhateeb <
> slidingfilame...@gmail.com> wrote:
>
>> Or alternatively, perhaps update the description to propose that the date
>> _should_ be updated
>>
>> On Fri, Aug 24, 2018, 9:32 AM Taher Alkhateeb > >
>> wrote:
>>
>> > Hi Deepak,
>> >
>> > I could be wrong but the JIRA seems to more like a question, not a bug
>> > report.
>> >
>> > Perhaps it would be better to issue a JIRA when:
>> > - you have identified and confirmed a bug
>> > - you can provide an explanation for it.
>> > - you can provide _repeat_ steps for others to replicate.
>> >
>> > On Fri, Aug 24, 2018, 9:24 AM deepak nigam 
>> > wrote:
>> >
>> >> Here is the JIRA ticket for addressing this issue:
>> >>
>> >> https://issues.apache.org/jira/browse/OFBIZ-10538
>> >>
>> >> Thanks & Regards
>> >> --
>> >> Deepak Nigam
>> >> HotWax Systems Pvt. Ltd.
>> >>
>> >>
>> >> On Wed, Aug 8, 2018 at 9:42 PM Jacques Le Roux <
>> >> jacques.le.r...@les7arts.com>
>> >> wrote:
>> >>
>> >> > Hi Suraj, Deepak,
>> >> >
>> >> > I agree, I see no reasons why it would be created and not update.
>> >> > While at it, using currentPromisedDate in services seems also better
>> >> > indeed.
>> >> >
>> >> > Jacques
>> >> >
>> >> > Le 08/08/2018 à 11:17, Suraj Khurana a écrit :
>> >> > > Hello Deepak,
>> >> > >
>> >> > > This is interesting case. IMO, currentPromisedDate should also be
>> >> updated
>> >> > > after updating 'Ship Before Date'.
>> >> > > Also, in mentioned services, I propose we should use
>> >> currentPromisedDate
>> >> > > instead of promisedDateTime field.
>> >> > >
>> >> > > --
>> >> > > Best Regards,
>> >> > > Suraj Khurana | Omni-channel OMS Technical Expert
>> >> > > Cell phone: +91 96697-50002
>> >> > >
>> >> > >
>> >> > > On Tue, Aug 7, 2018 at 11:29 AM, deepak nigam <
>> >> > deepak.nigam1...@gmail.com>
>> >> > > wrote:
>> >> > >
>> >> > >> Hello Devs,
>> >> > >>
>> >> > >> While creating the sales order from the backend, if we set the
>> 'Ship
>> >> > Before
>> >> > >> Date' it will be stored in OrderItemShipGroup.shipByDate field and
>> >> same
>> >> > >> will be propagated to OrderItemShipGrpInvRes.promisedDateTime
>> >> > >> and OrderItemShipGrpInvRes.currentPromisedDate fields.
>> >> > >>
>> >> > >> On updating the 'Ship Before Date' from the order view page later,
>> >> the
>> >> > >> value gets updated in OrderItemShipGroup entity but remains the
>> same
>> >> in
>> >> > >> OrderItemShipGroupInvRes entity.
>> >> > >>
>> >> > >> Is this the expected behaviour or OrderItemShipGroupInvRes should
>> >> also
>> >> > get
>> >> > >> updated? OrderItemShipGrpInvRes.promisedDateTime &
>> >> > >> OrderItemShipGrpInvRes.currentPromisedDate is used in many
>> services
>> >> like
>> >> > >> 'getOrderItemShipGroupEstimatedShipDate',
>> >> 'getItemBackOrderedQuantity',
>> >> > >> 'reserveProductInventory' etc.
>> >> > >>
>> >> > >>
>> >> > >> Thanks & Regards
>> >> > >> --
>> >> > >> Deepak Nigam
>> >> > >>
>> >> >
>> >> >
>> >>
>> >
>>
>


Re: Promised Datetime & Current Promised Date values not getting updated in OISGIR Entity

2018-08-24 Thread deepak nigam
Thanks, Taher.

Update the description in the ticket.

Thanks & Regards
--
Deepak Nigam
HotWax Systems Pvt. Ltd.


On Fri, Aug 24, 2018 at 12:04 PM Taher Alkhateeb 
wrote:

> Or alternatively, perhaps update the description to propose that the date
> _should_ be updated
>
> On Fri, Aug 24, 2018, 9:32 AM Taher Alkhateeb 
> wrote:
>
> > Hi Deepak,
> >
> > I could be wrong but the JIRA seems to more like a question, not a bug
> > report.
> >
> > Perhaps it would be better to issue a JIRA when:
> > - you have identified and confirmed a bug
> > - you can provide an explanation for it.
> > - you can provide _repeat_ steps for others to replicate.
> >
> > On Fri, Aug 24, 2018, 9:24 AM deepak nigam 
> > wrote:
> >
> >> Here is the JIRA ticket for addressing this issue:
> >>
> >> https://issues.apache.org/jira/browse/OFBIZ-10538
> >>
> >> Thanks & Regards
> >> --
> >> Deepak Nigam
> >> HotWax Systems Pvt. Ltd.
> >>
> >>
> >> On Wed, Aug 8, 2018 at 9:42 PM Jacques Le Roux <
> >> jacques.le.r...@les7arts.com>
> >> wrote:
> >>
> >> > Hi Suraj, Deepak,
> >> >
> >> > I agree, I see no reasons why it would be created and not update.
> >> > While at it, using currentPromisedDate in services seems also better
> >> > indeed.
> >> >
> >> > Jacques
> >> >
> >> > Le 08/08/2018 à 11:17, Suraj Khurana a écrit :
> >> > > Hello Deepak,
> >> > >
> >> > > This is interesting case. IMO, currentPromisedDate should also be
> >> updated
> >> > > after updating 'Ship Before Date'.
> >> > > Also, in mentioned services, I propose we should use
> >> currentPromisedDate
> >> > > instead of promisedDateTime field.
> >> > >
> >> > > --
> >> > > Best Regards,
> >> > > Suraj Khurana | Omni-channel OMS Technical Expert
> >> > > Cell phone: +91 96697-50002
> >> > >
> >> > >
> >> > > On Tue, Aug 7, 2018 at 11:29 AM, deepak nigam <
> >> > deepak.nigam1...@gmail.com>
> >> > > wrote:
> >> > >
> >> > >> Hello Devs,
> >> > >>
> >> > >> While creating the sales order from the backend, if we set the
> 'Ship
> >> > Before
> >> > >> Date' it will be stored in OrderItemShipGroup.shipByDate field and
> >> same
> >> > >> will be propagated to OrderItemShipGrpInvRes.promisedDateTime
> >> > >> and OrderItemShipGrpInvRes.currentPromisedDate fields.
> >> > >>
> >> > >> On updating the 'Ship Before Date' from the order view page later,
> >> the
> >> > >> value gets updated in OrderItemShipGroup entity but remains the
> same
> >> in
> >> > >> OrderItemShipGroupInvRes entity.
> >> > >>
> >> > >> Is this the expected behaviour or OrderItemShipGroupInvRes should
> >> also
> >> > get
> >> > >> updated? OrderItemShipGrpInvRes.promisedDateTime &
> >> > >> OrderItemShipGrpInvRes.currentPromisedDate is used in many services
> >> like
> >> > >> 'getOrderItemShipGroupEstimatedShipDate',
> >> 'getItemBackOrderedQuantity',
> >> > >> 'reserveProductInventory' etc.
> >> > >>
> >> > >>
> >> > >> Thanks & Regards
> >> > >> --
> >> > >> Deepak Nigam
> >> > >>
> >> >
> >> >
> >>
> >
>


Re: [PROPOSITION] Demos: replace old by trunk framework only

2018-08-24 Thread Taher Alkhateeb
I have just reviewed the links again, and the example provided by Jacques
is to access the ecommerce product page from the product component as a
menu item.

Honestly, I think for this example it should simply be deleted. It serves
no substantial value to me:

- I most likely will not use the standard ecommerce component
- I can easily view all the products directly from the ecommerce component.
There is no terrible need to access it from the product component.
- It does not even make sense to access the product page from the product
component. The purpose of the product component is to define and control
products, not view their ecommerce pages, heck you might have them on an
external system all together.

Furthermore, I'm not sure we need another superman initiative in the widget
system? The price to pay for this does not seem to be worth the added
value, I would hardly call it a value but maybe I'm wrong?

On Aug 24, 2018 9:55 AM, "Julien NICOLAS"  wrote:

Hi Nicolas,

With your proposal, I'm afraid that we can't simply add a new menu in an
application from a plugin. Maybe it's another subject but it could be
interesting to manage it in the same times.

Technically I understand your proposal but it's difficult for me to
understand the impact ^^

Julien.



Le 23/08/2018 à 11:19, Nicolas Malin a écrit :
> Hello
>
> This thread about a "simple" problem highlights the difficulty for a
> plugin to extend the framework on different elements. Since many years
> I search different solution to how surcharge correctly the framework
> and it was not easy :)
>
> in line
>
> On 22/08/2018 18:52, Taher Alkhateeb wrote:
>> Hi Julien,
>>
>> Good ideas, and this is a good start to try and tackle the problem.
>> Whatever we do, we must not keep "ghosts" or things that are waiting
>> for specific outside plugins. The framework should _never_ know
>> anything about the outside. This is a fundamental architectural
>> concept in any layered software system.
> Absolutely right, I knew a ghost history with addons that changed
> source code base to load plugin's specificsinstead of understandingwhy
> we can't surcharge the framework :)
>> I'm ready to help if needed, and I think there are many ways to fix
>> this problem. As you said one way is to extend webapps, another is
>> perhaps to optionally include freemarker templates that match a
>> certain pattern if they exist. In other words, you provide a generic
>> plugin-like mechanism for enhancing the system, but the direction is
>> _always_ from the outside to the inside, and not the other way around.
>> And that is what I mean with a root-cause analysis and solutions.
>
> Maybe I have two different solutions, based on theidea to usethemodel
> pattern toload all plugin surcharge at the ofbiz start like services
> and entities
> * The first, load all screen engine modelsin memory at start, but I
> fearthatit would be too expensive on memory (load unnecessary screens)

> * The second, create an'extend model' who permit to surcharge all
> screen engine model elements,andload it on ofbiz start and when we
> load a model, we check on extend model if the element have surcharge
> to apply just before settingit as immutable and put it in cache.

>
> example :
>  name='ViewPartyGroup'>
> 
>  target="/myplugin/control/viewprofile" target-type="inter-app"
> target-window="blank_">
> 
> 
> 
> 
>
> With this, we would have a plugin that can surcharge a screen, a form,
> a menu without changingnothing in the framework, identify clearly what
> change has been made and a failure support when the extend can't be
> applied.
>
> Currently I didn't found a solution to surcharge ftl.
>
> If you feel that it's a good way to explore, I will start a new thread.
>
> Nicolas
>> So I'm all for a generic solution, but not for hard-wiring any
>> component or any link that is specific to a certain component. That is
>> definitely a code smell and beats the entire purpose of splitting the
>> repositories in the first place. [...]
>
>


Re: [PROPOSITION] Demos: replace old by trunk framework only

2018-08-24 Thread Julien NICOLAS

Hi Nicolas,

With your proposal, I'm afraid that we can't simply add a new menu in an 
application from a plugin. Maybe it's another subject but it could be 
interesting to manage it in the same times.


Technically I understand your proposal but it's difficult for me to 
understand the impact ^^


Julien.


Le 23/08/2018 à 11:19, Nicolas Malin a écrit :

Hello

This thread about a "simple" problem highlights the difficulty for a 
plugin to extend the framework on different elements. Since many years 
I search different solution to how surcharge correctly the framework 
and it was not easy :)


in line

On 22/08/2018 18:52, Taher Alkhateeb wrote:

Hi Julien,

Good ideas, and this is a good start to try and tackle the problem.
Whatever we do, we must not keep "ghosts" or things that are waiting
for specific outside plugins. The framework should _never_ know
anything about the outside. This is a fundamental architectural
concept in any layered software system.
Absolutely right, I knew a ghost history with addons that changed 
source code base to load plugin's specificsinstead of understandingwhy 
we can't surcharge the framework :)

I'm ready to help if needed, and I think there are many ways to fix
this problem. As you said one way is to extend webapps, another is
perhaps to optionally include freemarker templates that match a
certain pattern if they exist. In other words, you provide a generic
plugin-like mechanism for enhancing the system, but the direction is
_always_ from the outside to the inside, and not the other way around.
And that is what I mean with a root-cause analysis and solutions.


Maybe I have two different solutions, based on theidea to usethemodel 
pattern toload all plugin surcharge at the ofbiz start like services 
and entities
* The first, load all screen engine modelsin memory at start, but I 
fearthatit would be too expensive on memory (load unnecessary screens)
* The second, create an'extend model' who permit to surcharge all 
screen engine model elements,andload it on ofbiz start and when we 
load a model, we check on extend model if the element have surcharge 
to apply just before settingit as immutable and put it in cache.


example :
name='ViewPartyGroup'>


target="/myplugin/control/viewprofile" target-type="inter-app" 
target-window="blank_">






With this, we would have a plugin that can surcharge a screen, a form, 
a menu without changingnothing in the framework, identify clearly what 
change has been made and a failure support when the extend can't be 
applied.


Currently I didn't found a solution to surcharge ftl.

If you feel that it's a good way to explore, I will start a new thread.

Nicolas

So I'm all for a generic solution, but not for hard-wiring any
component or any link that is specific to a certain component. That is
definitely a code smell and beats the entire purpose of splitting the
repositories in the first place. [...]







Re: Old demo restarted

2018-08-24 Thread Taher Alkhateeb
Hi Girish, inline...

On Thu, Aug 23, 2018, 7:25 PM Girish Vasmatkar <
girish.vasmat...@hotwaxsystems.com> wrote:

> I had earlier replied to this thread but looks like the email did not go
> through. I had leaned towards using the tool (only just) instead of may be
> having a CRON job or an alternative.
>
> What I feel now is that may be we can use JMX here and try to use various
> in build MBeans that provide CPU usage for the system and also for the JVM
> process we are concerned about that is OFBiz instance. We should also be
> able to get the memory usage of the JVM and if reaches a particular
> threshold we can be notified.
>
Do you have a PoC for all of this?

>
> In addition, I think we already add a shutdown hook to the JVM process... I
> am not sure and have not used it much but may be we can use it to send some
> notifications? Of course, it is applicable for graceful exits of JVM only
> and if you just happen to kill the process it won't be of much help.
>
The shutdown hook is used for shutting down. I'm not sure what is the
purpose of mentioning it here?

>
> Hope it makes sense and correct me if I am wrong.

Well I'm struggling a bit. I didn't understand exactly what needs to be
done? I see mixed topics about JMX, Mbeans, Memory monitors and shutdown
hooks. First this seems to be more like coding than a tool, and second I
have no idea how you want to implement this?

My idea for example is simple: create a cronjob that checks the system
periodically and if the demo process stopped, restart it (or maybe rebuild
and restart). To go with your suggestion we need to perhaps first
understand it.

>
> Best regards,
> Girish Vasmatkar
> HotWax Systems
>
>
> On Thu, Aug 23, 2018 at 8:48 PM Jacques Le Roux <
> jacques.le.r...@les7arts.com> wrote:
>
> > Le 23/08/2018 à 14:04, Taher Alkhateeb a écrit :
> > > I'm not sure why you're hanging this on me,
> > Because you answered to the bait ;)
> >
> > > but sure I'm willing to
> > > help.
> > Thanks, much appreciated!
> >
> > > Can I get some information on how the crashes are happening and
> > > how you're getting notified, and I will take it from there.
> > I think after a crash it's mostly to use dumps there (we have several
> from
> > the recent pas) but I'm not sure they will help, and it takes time to
> > analyse.
> >
> > In the past I took the time to analyse some of them and it was
> > interesting. For instance in 2010 I found a bug in a Java version we were
> > using and it
> > helped me in a custom project I was also doing then:
> > https://markmail.org/message/byu2ivjn7wckayzz
> >
> > Lastly it was mostly lack of memory, despite having 8GB now. I created
> > https://issues.apache.org/jira/browse/INFRA-16780 for that, but not sure
> > it was
> > the reason. At least we have less issues since.
> >
> > Before (months ago) the Infra was monitoring our demos and alerting us by
> > mail (you just had to subscribe). Unfortunately we are on our own for
> that
> > now, too much projects in the ASF...
> > As as I said initially in this thread I'm currently using montastic.com
> > for the email alerts.
> > My idea when I started this thread was that it all depends on me, and
> > that's bad. So I wanted people to be aware, you are much welcome.
> >
> > Jacques
> > > On Thu, Aug 23, 2018 at 2:29 PM Jacques Le Roux
> > >  wrote:
> > >> Yes we can, will you?
> > >>
> > >> Jacques
> > >>
> > >>
> > >> Le 22/08/2018 à 19:29, Taher Alkhateeb a écrit :
> > >>> Well, we can ask Infra for help, we can check available solutions, we
> > >>> can create a CRON script that checks things periodically, there are
> > >>> multiple ways to go about this.
> > >>>
> > >>> My personal preference is for a simple CRON script that takes care of
> > this.
> > >>> On Wed, Aug 22, 2018 at 8:25 PM Jacques Le Roux
> > >>>  wrote:
> >  So you prefer that I'm the only one to take care of the demos and
> act
> > on alerts?
> > 
> >  Jacques
> > 
> > 
> >  Le 22/08/2018 à 18:53, Taher Alkhateeb a écrit :
> > > I prefer not to include any tools without proper analysis and
> > > discussion first. Less is more.
> > > On Wed, Aug 22, 2018 at 5:31 PM Jacques Le Roux
> > >  wrote:
> > >> Hi,
> > >>
> > >> Should I consider no answers as a lazy consensus and should I send
> > (rare) alerts to this ML?
> > >>
> > >> Without any answers I'll consider it a lazy consensus in 2 days.
> > >>
> > >> Jacques
> > >>
> > >>
> > >> Le 17/08/2018 à 12:22, Jacques Le Roux a écrit :
> > >>> Le 13/08/2018 à 18:21, Jacques Le Roux a écrit :
> >  Le 12/08/2018 à 11:26, Jacques Le Roux a écrit :
> > > Hi,
> > >
> > > This morning I noticed the old demo was down and restarted it
> > after cleaning things.
> > >
> > > Previously (still some weeks ago) Daniel Gruno's (from Infra
> > team) company was kindly providing us a mean to monitor our demos but it
> > seems that
> > > this 

Re: Promised Datetime & Current Promised Date values not getting updated in OISGIR Entity

2018-08-24 Thread Taher Alkhateeb
Or alternatively, perhaps update the description to propose that the date
_should_ be updated

On Fri, Aug 24, 2018, 9:32 AM Taher Alkhateeb 
wrote:

> Hi Deepak,
>
> I could be wrong but the JIRA seems to more like a question, not a bug
> report.
>
> Perhaps it would be better to issue a JIRA when:
> - you have identified and confirmed a bug
> - you can provide an explanation for it.
> - you can provide _repeat_ steps for others to replicate.
>
> On Fri, Aug 24, 2018, 9:24 AM deepak nigam 
> wrote:
>
>> Here is the JIRA ticket for addressing this issue:
>>
>> https://issues.apache.org/jira/browse/OFBIZ-10538
>>
>> Thanks & Regards
>> --
>> Deepak Nigam
>> HotWax Systems Pvt. Ltd.
>>
>>
>> On Wed, Aug 8, 2018 at 9:42 PM Jacques Le Roux <
>> jacques.le.r...@les7arts.com>
>> wrote:
>>
>> > Hi Suraj, Deepak,
>> >
>> > I agree, I see no reasons why it would be created and not update.
>> > While at it, using currentPromisedDate in services seems also better
>> > indeed.
>> >
>> > Jacques
>> >
>> > Le 08/08/2018 à 11:17, Suraj Khurana a écrit :
>> > > Hello Deepak,
>> > >
>> > > This is interesting case. IMO, currentPromisedDate should also be
>> updated
>> > > after updating 'Ship Before Date'.
>> > > Also, in mentioned services, I propose we should use
>> currentPromisedDate
>> > > instead of promisedDateTime field.
>> > >
>> > > --
>> > > Best Regards,
>> > > Suraj Khurana | Omni-channel OMS Technical Expert
>> > > Cell phone: +91 96697-50002
>> > >
>> > >
>> > > On Tue, Aug 7, 2018 at 11:29 AM, deepak nigam <
>> > deepak.nigam1...@gmail.com>
>> > > wrote:
>> > >
>> > >> Hello Devs,
>> > >>
>> > >> While creating the sales order from the backend, if we set the 'Ship
>> > Before
>> > >> Date' it will be stored in OrderItemShipGroup.shipByDate field and
>> same
>> > >> will be propagated to OrderItemShipGrpInvRes.promisedDateTime
>> > >> and OrderItemShipGrpInvRes.currentPromisedDate fields.
>> > >>
>> > >> On updating the 'Ship Before Date' from the order view page later,
>> the
>> > >> value gets updated in OrderItemShipGroup entity but remains the same
>> in
>> > >> OrderItemShipGroupInvRes entity.
>> > >>
>> > >> Is this the expected behaviour or OrderItemShipGroupInvRes should
>> also
>> > get
>> > >> updated? OrderItemShipGrpInvRes.promisedDateTime &
>> > >> OrderItemShipGrpInvRes.currentPromisedDate is used in many services
>> like
>> > >> 'getOrderItemShipGroupEstimatedShipDate',
>> 'getItemBackOrderedQuantity',
>> > >> 'reserveProductInventory' etc.
>> > >>
>> > >>
>> > >> Thanks & Regards
>> > >> --
>> > >> Deepak Nigam
>> > >>
>> >
>> >
>>
>


Re: Promised Datetime & Current Promised Date values not getting updated in OISGIR Entity

2018-08-24 Thread Taher Alkhateeb
Hi Deepak,

I could be wrong but the JIRA seems to more like a question, not a bug
report.

Perhaps it would be better to issue a JIRA when:
- you have identified and confirmed a bug
- you can provide an explanation for it.
- you can provide _repeat_ steps for others to replicate.

On Fri, Aug 24, 2018, 9:24 AM deepak nigam 
wrote:

> Here is the JIRA ticket for addressing this issue:
>
> https://issues.apache.org/jira/browse/OFBIZ-10538
>
> Thanks & Regards
> --
> Deepak Nigam
> HotWax Systems Pvt. Ltd.
>
>
> On Wed, Aug 8, 2018 at 9:42 PM Jacques Le Roux <
> jacques.le.r...@les7arts.com>
> wrote:
>
> > Hi Suraj, Deepak,
> >
> > I agree, I see no reasons why it would be created and not update.
> > While at it, using currentPromisedDate in services seems also better
> > indeed.
> >
> > Jacques
> >
> > Le 08/08/2018 à 11:17, Suraj Khurana a écrit :
> > > Hello Deepak,
> > >
> > > This is interesting case. IMO, currentPromisedDate should also be
> updated
> > > after updating 'Ship Before Date'.
> > > Also, in mentioned services, I propose we should use
> currentPromisedDate
> > > instead of promisedDateTime field.
> > >
> > > --
> > > Best Regards,
> > > Suraj Khurana | Omni-channel OMS Technical Expert
> > > Cell phone: +91 96697-50002
> > >
> > >
> > > On Tue, Aug 7, 2018 at 11:29 AM, deepak nigam <
> > deepak.nigam1...@gmail.com>
> > > wrote:
> > >
> > >> Hello Devs,
> > >>
> > >> While creating the sales order from the backend, if we set the 'Ship
> > Before
> > >> Date' it will be stored in OrderItemShipGroup.shipByDate field and
> same
> > >> will be propagated to OrderItemShipGrpInvRes.promisedDateTime
> > >> and OrderItemShipGrpInvRes.currentPromisedDate fields.
> > >>
> > >> On updating the 'Ship Before Date' from the order view page later, the
> > >> value gets updated in OrderItemShipGroup entity but remains the same
> in
> > >> OrderItemShipGroupInvRes entity.
> > >>
> > >> Is this the expected behaviour or OrderItemShipGroupInvRes should also
> > get
> > >> updated? OrderItemShipGrpInvRes.promisedDateTime &
> > >> OrderItemShipGrpInvRes.currentPromisedDate is used in many services
> like
> > >> 'getOrderItemShipGroupEstimatedShipDate',
> 'getItemBackOrderedQuantity',
> > >> 'reserveProductInventory' etc.
> > >>
> > >>
> > >> Thanks & Regards
> > >> --
> > >> Deepak Nigam
> > >>
> >
> >
>


Re: Old demo restarted

2018-08-24 Thread Deepak Dixit
Hi Girish,

Your email has been moderated, Please subscribe to the mailing list
http://ofbiz.apache.org/mailing-lists.html

Thanks & Regards
--
Deepak Dixit


On Thu, Aug 23, 2018 at 6:19 PM, girish...@gmail.com 
wrote:

>
>
> On 2018/08/23 12:04:53, Taher Alkhateeb 
> wrote:
> > I'm not sure why you're hanging this on me, but sure I'm willing to
> > help. Can I get some information on how the crashes are happening and
> > how you're getting notified, and I will take it from there.
> > On Thu, Aug 23, 2018 at 2:29 PM Jacques Le Roux
> >  wrote:
> > >
> > > Yes we can, will you?
> > >
> > > Jacques
> > >
> > >
> > > Le 22/08/2018 à 19:29, Taher Alkhateeb a écrit :
> > > > Well, we can ask Infra for help, we can check available solutions, we
> > > > can create a CRON script that checks things periodically, there are
> > > > multiple ways to go about this.
> > > >
> > > > My personal preference is for a simple CRON script that takes care
> of this.
> > > > On Wed, Aug 22, 2018 at 8:25 PM Jacques Le Roux
> > > >  wrote:
> > > >> So you prefer that I'm the only one to take care of the demos and
> act on alerts?
> > > >>
> > > >> Jacques
> > > >>
> > > >>
> > > >> Le 22/08/2018 à 18:53, Taher Alkhateeb a écrit :
> > > >>> I prefer not to include any tools without proper analysis and
> > > >>> discussion first. Less is more.
> > > >>> On Wed, Aug 22, 2018 at 5:31 PM Jacques Le Roux
> > > >>>  wrote:
> > >  Hi,
> > > 
> > >  Should I consider no answers as a lazy consensus and should I
> send (rare) alerts to this ML?
> > > 
> > >  Without any answers I'll consider it a lazy consensus in 2 days.
> > > 
> > >  Jacques
> > > 
> > > 
> > >  Le 17/08/2018 à 12:22, Jacques Le Roux a écrit :
> > > > Le 13/08/2018 à 18:21, Jacques Le Roux a écrit :
> > > >> Le 12/08/2018 à 11:26, Jacques Le Roux a écrit :
> > > >>> Hi,
> > > >>>
> > > >>> This morning I noticed the old demo was down and restarted it
> after cleaning things.
> > > >>>
> > > >>> Previously (still some weeks ago) Daniel Gruno's (from Infra
> team) company was kindly providing us a mean to monitor our demos but it
> seems that
> > > >>> this mean is no longer available
> > > >>>
> > > >>> I have asked about it and will let you know about it...
> > > >>>
> > > >>> Have a good weekend
> > > >>>
> > > >>> Jadques
> > > >>>
> > > >> Daniel confirmed it's terminated. I turned to UpTimeRobot which
> is free and seems as well good :)
> > > >>
> > > >> Jacques
> > > >>
> > > >>
> > > > This thread started on user ML but I don't want to bother
> everyone with technical details.
> > > >
> > > > I used my own @a.o email to create the monitoring. UpTimeRobot
> is certainly the best free monitoring tool, with some possibilities others
> don't give.
> > > >
> > > > But the free version has an inconvenient. You can only check
> every 5 mins and when the instances restart it takes more than 5 mins each.
> > > >
> > > > So everyday I get a down an up alerts for each. I have switched
> to montastic.com.
> > > >
> > > > I was wondering if we don't want to share that here.
> > > > We could then have these alerts here and any committer, using
> the info in https://svn.apache.org/repos/asf/ofbiz/tools/demo-backup
> could handle issues.
> > > >
> > > > It seems better, isn'it?
> > > >
> > > > Jacques
> > > >
> > > >
> > >
> >
>
> Hi Jacques/Taher
> While I do agree this can be taken care of by a CRON Job or any other
> scheduler service for that matter, but I personally would lean towards
> using a tool. It is just one of those requirements where dedicated tools
> best fit in; otherwise a CRON script can do the same as well.
> Not sure why using a tool is not the preferred way to go here.
>
> Thanks and Regards,
> Girish Vasmatkar
> HotWax Systems
>
>


Re: Old demo restarted

2018-08-24 Thread girishvas



On 2018/08/23 12:04:53, Taher Alkhateeb  wrote: 
> I'm not sure why you're hanging this on me, but sure I'm willing to
> help. Can I get some information on how the crashes are happening and
> how you're getting notified, and I will take it from there.
> On Thu, Aug 23, 2018 at 2:29 PM Jacques Le Roux
>  wrote:
> >
> > Yes we can, will you?
> >
> > Jacques
> >
> >
> > Le 22/08/2018 à 19:29, Taher Alkhateeb a écrit :
> > > Well, we can ask Infra for help, we can check available solutions, we
> > > can create a CRON script that checks things periodically, there are
> > > multiple ways to go about this.
> > >
> > > My personal preference is for a simple CRON script that takes care of 
> > > this.
> > > On Wed, Aug 22, 2018 at 8:25 PM Jacques Le Roux
> > >  wrote:
> > >> So you prefer that I'm the only one to take care of the demos and act on 
> > >> alerts?
> > >>
> > >> Jacques
> > >>
> > >>
> > >> Le 22/08/2018 à 18:53, Taher Alkhateeb a écrit :
> > >>> I prefer not to include any tools without proper analysis and
> > >>> discussion first. Less is more.
> > >>> On Wed, Aug 22, 2018 at 5:31 PM Jacques Le Roux
> > >>>  wrote:
> >  Hi,
> > 
> >  Should I consider no answers as a lazy consensus and should I send 
> >  (rare) alerts to this ML?
> > 
> >  Without any answers I'll consider it a lazy consensus in 2 days.
> > 
> >  Jacques
> > 
> > 
> >  Le 17/08/2018 à 12:22, Jacques Le Roux a écrit :
> > > Le 13/08/2018 à 18:21, Jacques Le Roux a écrit :
> > >> Le 12/08/2018 à 11:26, Jacques Le Roux a écrit :
> > >>> Hi,
> > >>>
> > >>> This morning I noticed the old demo was down and restarted it after 
> > >>> cleaning things.
> > >>>
> > >>> Previously (still some weeks ago) Daniel Gruno's (from Infra team) 
> > >>> company was kindly providing us a mean to monitor our demos but it 
> > >>> seems that
> > >>> this mean is no longer available
> > >>>
> > >>> I have asked about it and will let you know about it...
> > >>>
> > >>> Have a good weekend
> > >>>
> > >>> Jadques
> > >>>
> > >> Daniel confirmed it's terminated. I turned to UpTimeRobot which is 
> > >> free and seems as well good :)
> > >>
> > >> Jacques
> > >>
> > >>
> > > This thread started on user ML but I don't want to bother everyone 
> > > with technical details.
> > >
> > > I used my own @a.o email to create the monitoring. UpTimeRobot is 
> > > certainly the best free monitoring tool, with some possibilities 
> > > others don't give.
> > >
> > > But the free version has an inconvenient. You can only check every 5 
> > > mins and when the instances restart it takes more than 5 mins each.
> > >
> > > So everyday I get a down an up alerts for each. I have switched to 
> > > montastic.com.
> > >
> > > I was wondering if we don't want to share that here.
> > > We could then have these alerts here and any committer, using the 
> > > info in https://svn.apache.org/repos/asf/ofbiz/tools/demo-backup 
> > > could handle issues.
> > >
> > > It seems better, isn'it?
> > >
> > > Jacques
> > >
> > >
> >
> 

Hi Jacques/Taher
While I do agree this can be taken care of by a CRON Job or any other scheduler 
service for that matter, but I personally would lean towards using a tool. It 
is just one of those requirements where dedicated tools best fit in; otherwise 
a CRON script can do the same as well.
Not sure why using a tool is not the preferred way to go here.

Thanks and Regards,
Girish Vasmatkar
HotWax Systems



Re: Issue with opening a bookmarked page when the user is logged out

2018-08-24 Thread Taher Alkhateeb
Why did you change the method to GET?

On Fri, Aug 24, 2018, 9:20 AM Ritesh Kumar 
wrote:

> Just to put my point more clearly, let me add the steps to generate the
> above-mentioned case. Please refer demo-trunk
> .
>
> 1. Open this link, FindWorkEffort
> .
> Find Work Effort screen will be rendered.
> 2. Inspect and change the form method to "GET".
> 3. Apply any of the two statuses (say, Cancelled and Declined). Click on
> Find.
> 4. Records will be fetched according to the applied filters.
> 5. Check the URL. Cancelled and Declined statuses must be there in the URL.
> 6. Bookmark this page and log out.
> 7. Now, open the bookmark.
> 8. The login page will be rendered. Check the URL here. It will be the same
> as it was when the page was being bookmarked.
> 9. Type in the credentials and log in.
> 10. The result may be different. Check the URL. One of the statuses is
> gone.
>
> Due to business requirement, I need to show query parameters in the URL so
> that the user is able to bookmark the page. And, we normally pass Id in the
> parameters, but, due to some reason, I may have to pass values with space
> characters.
>
> I hope, this demo puts forth my concern.
>
>
>
> On Thu, Aug 23, 2018 at 6:27 PM Ritesh Kumar <
> ritesh.ku...@hotwaxsystems.com>
> wrote:
>
> > Hello All,
> >
> > I faced an issue while trying to open a bookmarked page with OFBiz.
> >
> > Suppose, the URL of this bookmarked page contains a parameter with
> > multiple values and the value may have space character. The query string
> in
> > the URL looks somewhat like this
> >
> >
> "?categoryHierarchy=3%2FCompany+Catalog%2FBrowse+Root%2FCloths%2FMen%2F"=approved=created".
> > The "%2F" and "+" are encoded value of  "/", a separator and space
> > character respectively. The status id parameter appears twice and the
> > category hierarchy value has space character.
> >
> > The user is logged out at this instance and this bookmarked page is
> > opened. Since the user is not logged in, the login page is rendered. I
> feed
> > in the credentials and the intended URL is hit. Here, I do not get the
> > required result.
> >
> > When I check the URL, the parameter with multiple values just has the
> last
> > value of the list and "+" is encoded into "%2B". The URL now is
> >
> >
> "?categoryHierarchy=3%2FCompany%2BCatalog%2FBrowse%2BRoot%2FCloths%2FMen%2F"==created."
> >
> > I did some digging and found out that LoginWorker.checkLogin() comes into
> > action and what it does is that it creates a new session object (because
> > the previous session becomes invalid) and in the session object, it puts
> > the previous URL parameters. This previous URL parameters are fetched
> using
> > UtilHttp.getUrlOnlyParameterMap(request) which internally calls
> > getQueryStringOnlyParameterMap(). This method returns a map by breaking
> the
> > query string into key and value pair. A map can not have duplicate keys
> (in
> > this case removes the approved status) and the value is not decoded
> before
> > putting it into the map ('+' is not decoded). This map is then used to
> > create an encoded ('+' is encoded into '%2B' ) redirect target and then
> > callRedirect() is called on this new redirect target, ending up with
> > unintended URL (inside RequestHandler.doRequest()).
> >
> > I could resolve this issue by decoding the already encoded value before
> > putting it into the Map and if the key is already present in the Map, it
> > must create a list of the values.
> >
> > Am I missing something or is this really a bug and needs to be addressed
> > OOTB?
> > If this is a bug, is proposed solution the right one?
> >
> > --
> > Best,
> > Ritesh Kumar
> >
> >
>


Re: Promised Datetime & Current Promised Date values not getting updated in OISGIR Entity

2018-08-24 Thread deepak nigam
Here is the JIRA ticket for addressing this issue:

https://issues.apache.org/jira/browse/OFBIZ-10538

Thanks & Regards
--
Deepak Nigam
HotWax Systems Pvt. Ltd.


On Wed, Aug 8, 2018 at 9:42 PM Jacques Le Roux 
wrote:

> Hi Suraj, Deepak,
>
> I agree, I see no reasons why it would be created and not update.
> While at it, using currentPromisedDate in services seems also better
> indeed.
>
> Jacques
>
> Le 08/08/2018 à 11:17, Suraj Khurana a écrit :
> > Hello Deepak,
> >
> > This is interesting case. IMO, currentPromisedDate should also be updated
> > after updating 'Ship Before Date'.
> > Also, in mentioned services, I propose we should use currentPromisedDate
> > instead of promisedDateTime field.
> >
> > --
> > Best Regards,
> > Suraj Khurana | Omni-channel OMS Technical Expert
> > Cell phone: +91 96697-50002
> >
> >
> > On Tue, Aug 7, 2018 at 11:29 AM, deepak nigam <
> deepak.nigam1...@gmail.com>
> > wrote:
> >
> >> Hello Devs,
> >>
> >> While creating the sales order from the backend, if we set the 'Ship
> Before
> >> Date' it will be stored in OrderItemShipGroup.shipByDate field and same
> >> will be propagated to OrderItemShipGrpInvRes.promisedDateTime
> >> and OrderItemShipGrpInvRes.currentPromisedDate fields.
> >>
> >> On updating the 'Ship Before Date' from the order view page later, the
> >> value gets updated in OrderItemShipGroup entity but remains the same in
> >> OrderItemShipGroupInvRes entity.
> >>
> >> Is this the expected behaviour or OrderItemShipGroupInvRes should also
> get
> >> updated? OrderItemShipGrpInvRes.promisedDateTime &
> >> OrderItemShipGrpInvRes.currentPromisedDate is used in many services like
> >> 'getOrderItemShipGroupEstimatedShipDate', 'getItemBackOrderedQuantity',
> >> 'reserveProductInventory' etc.
> >>
> >>
> >> Thanks & Regards
> >> --
> >> Deepak Nigam
> >>
>
>


Re: Issue with opening a bookmarked page when the user is logged out

2018-08-24 Thread Ritesh Kumar
Just to put my point more clearly, let me add the steps to generate the
above-mentioned case. Please refer demo-trunk
.

1. Open this link, FindWorkEffort
.
Find Work Effort screen will be rendered.
2. Inspect and change the form method to "GET".
3. Apply any of the two statuses (say, Cancelled and Declined). Click on
Find.
4. Records will be fetched according to the applied filters.
5. Check the URL. Cancelled and Declined statuses must be there in the URL.
6. Bookmark this page and log out.
7. Now, open the bookmark.
8. The login page will be rendered. Check the URL here. It will be the same
as it was when the page was being bookmarked.
9. Type in the credentials and log in.
10. The result may be different. Check the URL. One of the statuses is
gone.

Due to business requirement, I need to show query parameters in the URL so
that the user is able to bookmark the page. And, we normally pass Id in the
parameters, but, due to some reason, I may have to pass values with space
characters.

I hope, this demo puts forth my concern.



On Thu, Aug 23, 2018 at 6:27 PM Ritesh Kumar 
wrote:

> Hello All,
>
> I faced an issue while trying to open a bookmarked page with OFBiz.
>
> Suppose, the URL of this bookmarked page contains a parameter with
> multiple values and the value may have space character. The query string in
> the URL looks somewhat like this
>
> "?categoryHierarchy=3%2FCompany+Catalog%2FBrowse+Root%2FCloths%2FMen%2F"=approved=created".
> The "%2F" and "+" are encoded value of  "/", a separator and space
> character respectively. The status id parameter appears twice and the
> category hierarchy value has space character.
>
> The user is logged out at this instance and this bookmarked page is
> opened. Since the user is not logged in, the login page is rendered. I feed
> in the credentials and the intended URL is hit. Here, I do not get the
> required result.
>
> When I check the URL, the parameter with multiple values just has the last
> value of the list and "+" is encoded into "%2B". The URL now is
>
> "?categoryHierarchy=3%2FCompany%2BCatalog%2FBrowse%2BRoot%2FCloths%2FMen%2F"==created."
>
> I did some digging and found out that LoginWorker.checkLogin() comes into
> action and what it does is that it creates a new session object (because
> the previous session becomes invalid) and in the session object, it puts
> the previous URL parameters. This previous URL parameters are fetched using
> UtilHttp.getUrlOnlyParameterMap(request) which internally calls
> getQueryStringOnlyParameterMap(). This method returns a map by breaking the
> query string into key and value pair. A map can not have duplicate keys (in
> this case removes the approved status) and the value is not decoded before
> putting it into the map ('+' is not decoded). This map is then used to
> create an encoded ('+' is encoded into '%2B' ) redirect target and then
> callRedirect() is called on this new redirect target, ending up with
> unintended URL (inside RequestHandler.doRequest()).
>
> I could resolve this issue by decoding the already encoded value before
> putting it into the Map and if the key is already present in the Map, it
> must create a list of the values.
>
> Am I missing something or is this really a bug and needs to be addressed
> OOTB?
> If this is a bug, is proposed solution the right one?
>
> --
> Best,
> Ritesh Kumar
>
>