Re: JobPoller strange behavior with multiple ofbiz instances in Docker Containers

2022-03-02 Thread Shi Jinghai
Hi Giulio,

Interesting, are you want to set JobPoller a role for each instance? If yes, my 
+1.

And +1 to make a queue and some snowflake like support/implements OOTB.

Good Luck,

Shi Jinghai


从 Windows 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>发送


发件人: Giulio Speri - MpStyle Srl 
发送时间: Saturday, February 12, 2022 7:49:04 AM
收件人: Dev list 
主题: Re: JobPoller strange behavior with multiple ofbiz instances in Docker 
Containers

Hello Devs,

I'll reach you with an update on this.
Me and my colleagues (@Nicola Mazzoni is in this ML) have found the issue
and a possible solution that we applied almost a week ago in our production
environment.
We found no issue or bug in OFBiz JobPoller and JobManager code, but it was
more a "timing" problem.

I explain: each container started an instance of OFbiz, each instance also
started its JobPoller thread with all the JobManagers associated with a
specific tenant.
All the instances had the poll-enable parameter set to true and all run
services from the pool "pool", and since all has access to the same MySQL
database, what happened was that the "first" (in terms of time) thread
between all the containers that polled the JobSandbox entity (of that
tenant), run the service.
This explains why we saw jobs always executed by different *ofbiz_instanceIds,
*and why output files were written in a container different from the one we
would expect.

We've been able to prove this behaviour, proceeding step-by-step:
1 - at first we disabled (poll-enabled=false) all the JobPoller thread in
all the containers, except one; this was the simple case and JobPoller
behaves as expected: service and output file were executed and written to
the correct container.
2 - put some debug prints into the JobManager poll() method outputting
instanceId - service name and timing of execution;
3 - rebuilt container images and enabled a second JobPoller thread in
another instance;
4 - scheduled the same service in the tenants related to each
container/ofbiz instance, repeated for 5/10 times every 3 minutes (just to
be sure to catch something);
5 - observed the live tail output of the ofbiz log files on both container
consoles;
6 - visually check and confirm that the thread which woke up earlier (but
after job schedule time) did execute the job, and that happened regardless
of the container we scheduled the job from;
7 - repeated this test re-enabling all the JobPollers one after another,
with the same result as step 6.

In short:
Container A - tenant A - ofbiz_instanceId = 1 - JobPoller-A - pool="pool"
Container B - tenant B - ofbiz_instanceId = 2 - JobPoller-B - pool="pool"

Service "MY_SERVICE" scheduled in container/tenant A at time X.
Service "MY_SERVICE" scheduled in container/tenant B at time Y.

JobPoller-A, that has all the tenant managers registered, polls after
schedule time Y of MY_SERVICE for tenant B, but before JobPoller-B: then
MY_SERVICE of tenant B is executed by ofbiz_instanceId = 1.

Once we were sure about this behavior we could think of a solution and we
came up with two possibilities.

*[1]* Start a new ofbiz container with the JobPoller enabled and in the
meanwhile disable all the other JobPoller threads, so that only one poller
thread between all containers would be active.

*[2]* JobManager search/schedule/queue/run jobs looking also at the
thread-pool of execution: giving each container a different
.. configuration for parameters *send-to-pool*
and *run-from-pool* (ie for Container A: send-to-pool="poolA" and
run-from-pool name="poolA", and so on for Container B,C,D,...), will cause
each JobPoller run services only of its specific pool name, so that if I
schedule a service in the Container A, only the JobPoller in that container
will run the job, since the JobPoller in the container B, will search in
tenants for jobs with pool="poolB".

We decided to proceed with the solution [2], because we think that it's
correct in this scenario to have each container run its own (per tenant)
jobs, in order to keep each container/customer logically separated from the
others.
The last point done to complete this configuration was to update JobSandbox
entities and assign to already scheduled services the proper and specific
thread execution pool.

The checks we've done throughout the week had successful results, but we
will keep monitoring the situation still for some days.

I don't know if other devs/contributors/users are using ofbiz in docker
containers in the same way as we do, but this problem gave us more than a
headache for a lot of time, so I hope that our experience could be helpful
in saving some precious time to anyone will face this kind of situation.

Have a great weekend ahead.
Kind Regards,
Giulio









Il giorno gio 20 gen 2022 alle ore 20:27 Giulio Speri - MpStyle Srl <
giulio.sp...@mpstyle.it> ha scritto:


Re: A little bit of Lombok

2020-08-29 Thread Shi Jinghai
Hi Jacques,

It’s about a year ago. My IDE is eclipse. I spent about half of a day to make 
Lombok work correctly, Getter/Setter, AllArgsConstructor, plugin version 
problem and etc.

Does Lombok plugin worth a requirement and a time investment by all OFBiz 
developers? My answer is NO.

Kind Regards,

Shi Jinghai

发送自 Windows 10 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>应用

发件人: Jacques Le Roux<mailto:jacques.le.r...@les7arts.com>
发送时间: 2020年8月27日 15:10
收件人: dev@ofbiz.apache.org<mailto:dev@ofbiz.apache.org>
主题: Re: A little bit of Lombok

Thanks Jinghai,

Is that long ago? Do you remember the most important issues you crossed?

Jacques

Le 27/08/2020 à 06:20, Shi Jinghai a écrit :
> Just my 2 cents.
>
> -1 for using Lombok plugin in OFBiz.
>
> I had some not good experiences with this plugin in Apereo CAS 5.3.x.
>
>
>
> 发送自 Windows 10 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>应用
>
> 发件人: Daniel Watford<mailto:d...@foomoo.co.uk>
> 发送时间: 2020年7月28日 20:44
> 收件人: dev@ofbiz.apache.org<mailto:dev@ofbiz.apache.org>
> 主题: A little bit of Lombok
>
> Hello,
>
> Back in April the possibility of using Lombok for the generation of some
> boilerplate code was mentioned on the mailing list [1].
>
> As part of work-in-progress on OFBIZ-11900 (refactoring MacroFormRenderer)
> I have used Lombok on a few small classes. The work-in-progress branch can
> be found at [2].
>
> Only a small amount of Lombok has been used so far, meaning it shouldn't be
> too difficult to remove it if needed.
>
> In build.gradle I have used the FreeFair Gradle Lombok plugin [3]
> referenced by the Lombok Project [4].
>
> Building with the lombok plugin seemed to use a lot of memory and caused
> gradle to garbage collect and run out of heap regularly. To resolve this I
> increased the about of memory available to gradle in gradle.properties
> using:
>
> org.gradle.jvmargs=-Xmx2g -XX\:MaxHeapSize\=4g
>
> Tuning this might be important depending on the CI infrastructure used by
> the Ofbiz project.
>
> You will likely need your IDE to apply annotation processing otherwise you
> might see warning of missing methods. In IntelliJ I use what appears to be
> the de facto Lombok plugin [5].
> Guidance is available from the Lombok project for other IDEs [6].
>
> Lombok @ToString annotations have been applied to RenderableFtlString and
> RenderableFtlNoop. This causes Lombok to insert toString() methods into the
> classes based on the class names and field values.
>
> The @Value annotation has been applied to
> MacroCallParameterStringValue, MacroCallParameterBooleanValue
> and MacroCallParameterMapValue. This annotation turns those classes into
> immutable-like entities, where all fields must be set in the inserted
> constructor and are available from automatically inserted getters.
> ToString(), equals and hashCode() methods are also created meaning these
> classes can be relied upon as map keys if needed.
>
> The @Builder annotation has been applied to RenderableFtlMacroCall
> and RenderableFtlSequence. This annotation does quite a lot so I'd
> recommend you run delombok (instructions below) to see the code that Lombok
> inserts for us.
>
> To see the sources generated by Lombok we can run DeLombok. At the command
> line execute:
> ./gradlew delombok
>
> A copy of all sources (not just those with lombok annotations) will be
> placed under build/delombok. Please take a look at the delomboked sources
> for the above classes under
> build/delombok/main/org/apache/ofbiz/widget/renderer/macro/parameter and
> build/delombok/main/org/apache/ofbiz/widget/renderer/macro/renderable.
>
> Please let me know what you think about this usage of Lombok.
>
> Thanks,
>
> Dan.
>
> [1] - 
> http://ofbiz.135035.n4.nabble.com/Default-constructors-in-JAVA-classes-tp4749257p4749258.html
>
> [2] - https://github.com/danwatford/ofbiz-framework/tree/OFBIZ-11900-WIP
> [3] - https://plugins.gradle.org/plugin/io.freefair.lombok
> [4] - https://projectlombok.org/setup/gradle
> [5] - https://plugins.jetbrains.com/plugin/6317-lombok/
> [6] - https://projectlombok.org/setup/overview
>
> --
> Daniel Watford
>



Re: A little bit of Lombok

2020-08-26 Thread Shi Jinghai
Just my 2 cents.

-1 for using Lombok plugin in OFBiz.

I had some not good experiences with this plugin in Apereo CAS 5.3.x.



发送自 Windows 10 版邮件应用

发件人: Daniel Watford
发送时间: 2020年7月28日 20:44
收件人: dev@ofbiz.apache.org
主题: A little bit of Lombok

Hello,

Back in April the possibility of using Lombok for the generation of some
boilerplate code was mentioned on the mailing list [1].

As part of work-in-progress on OFBIZ-11900 (refactoring MacroFormRenderer)
I have used Lombok on a few small classes. The work-in-progress branch can
be found at [2].

Only a small amount of Lombok has been used so far, meaning it shouldn't be
too difficult to remove it if needed.

In build.gradle I have used the FreeFair Gradle Lombok plugin [3]
referenced by the Lombok Project [4].

Building with the lombok plugin seemed to use a lot of memory and caused
gradle to garbage collect and run out of heap regularly. To resolve this I
increased the about of memory available to gradle in gradle.properties
using:

org.gradle.jvmargs=-Xmx2g -XX\:MaxHeapSize\=4g

Tuning this might be important depending on the CI infrastructure used by
the Ofbiz project.

You will likely need your IDE to apply annotation processing otherwise you
might see warning of missing methods. In IntelliJ I use what appears to be
the de facto Lombok plugin [5].
Guidance is available from the Lombok project for other IDEs [6].

Lombok @ToString annotations have been applied to RenderableFtlString and
RenderableFtlNoop. This causes Lombok to insert toString() methods into the
classes based on the class names and field values.

The @Value annotation has been applied to
MacroCallParameterStringValue, MacroCallParameterBooleanValue
and MacroCallParameterMapValue. This annotation turns those classes into
immutable-like entities, where all fields must be set in the inserted
constructor and are available from automatically inserted getters.
ToString(), equals and hashCode() methods are also created meaning these
classes can be relied upon as map keys if needed.

The @Builder annotation has been applied to RenderableFtlMacroCall
and RenderableFtlSequence. This annotation does quite a lot so I'd
recommend you run delombok (instructions below) to see the code that Lombok
inserts for us.

To see the sources generated by Lombok we can run DeLombok. At the command
line execute:
./gradlew delombok

A copy of all sources (not just those with lombok annotations) will be
placed under build/delombok. Please take a look at the delomboked sources
for the above classes under
build/delombok/main/org/apache/ofbiz/widget/renderer/macro/parameter and
build/delombok/main/org/apache/ofbiz/widget/renderer/macro/renderable.

Please let me know what you think about this usage of Lombok.

Thanks,

Dan.

[1] - 
http://ofbiz.135035.n4.nabble.com/Default-constructors-in-JAVA-classes-tp4749257p4749258.html

[2] - https://github.com/danwatford/ofbiz-framework/tree/OFBIZ-11900-WIP
[3] - https://plugins.gradle.org/plugin/io.freefair.lombok
[4] - https://projectlombok.org/setup/gradle
[5] - https://plugins.jetbrains.com/plugin/6317-lombok/
[6] - https://projectlombok.org/setup/overview

--
Daniel Watford



Re: REST implementation

2020-08-04 Thread Shi Jinghai
Hi Daniel and Girish,

I updated my OFBiz-CAS plugin several days ago, it’s an OAuth2 implement, and 
there’s an openapi-demo in the plugin:
https://github.com/langhua/OFBiz-CAS/tree/ofbiz-17.12.03-cas-5.3.15.1

Hope it could be helpful to you.

Kind Regards,

Shi Jinghai


发送自 Windows 10 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>应用

发件人: Girish Vasmatkar<mailto:girish.vasmat...@hotwaxsystems.com>
发送时间: 2020年8月2日 18:03
收件人: dev@ofbiz.apache.org<mailto:dev@ofbiz.apache.org>
主题: Re: REST implementation

Hi Daniel

You can use the JWT token in the README of. Sorry, if it is not clearly
documented, this will be improved upon further as I make more changes.
https://github.com/girishvasmatkar/ofbiz-plugins/tree/trunk/ofbiz-rest-impl

I need to implement an API endpoint that eventually generates a JWT token
that can be issued to the client to make subsequent API calls. Until then,
please use the once mentioned in the README examples. That JWT has userId
claim value as admin assuming admin would have got himself authenticated
and a JWT was issued to him.

I will soon add an API endpoint to issue JWTs and will update README
accordingly. I hope that answers your question.

Best Regards,
Girish







On Sun, Aug 2, 2020 at 3:21 PM Daniel Watford  wrote:

> Hi Girish,
>
> I wanted to try out some REST calls using Swagger-ui (
> https://localhost:8443/docs/swagger-ui.html) but don't know how to
> authenticate to get a JWT.
>
> Apologies if I missed the instructions elsewhere but please could you
> advise on how to authenticate against the REST api?
>
> Thanks,
>
> Dan.
>
> On Fri, 31 Jul 2020 at 09:34, Girish Vasmatkar <
> girish.vasmat...@hotwaxsystems.com> wrote:
>
> > Greetings!
> >
> > I have created a PR to add a REST component -
> > https://github.com/apache/ofbiz-plugins/pull/35 . Please take a look
> > and let me know what you think and let me know if you face any issues. I
> > intend to merge it in a week from now.
> >
> > With the PR (https://github.com/apache/ofbiz-framework/pull/214) to add
> > "action" attribute to the service definition now merged, this above
> > component should be able to expose exportable (export=true) and
> > actionable(action=GET|POST) services via REST.
> >
> > Once the changes for nested attributes (OFBIZ-11902
> > <https://issues.apache.org/jira/browse/OFBIZ-11902>) are done, I will
> also
> > be making corresponding changes in the GraphQL plugin to account for
> nested
> > attributes. OFBIZ-11902
> > <https://issues.apache.org/jira/browse/OFBIZ-11902> will
> > help in defining complex GraphQL mutations.
> >
> > I am parallelly also working on designing an XML DSL for REST that should
> > allow tying up REST resources with OFBiz services.
> >
> > Best,
> > Girish
> >
> >
> >
> > On Thu, Jul 9, 2020 at 6:27 PM Shi Jinghai  wrote:
> >
> > > Hi Girish,
> > >
> > > Yes, you got it.
> > >
> > > Web browser will popup a login dialog when response code is 401:
> > > setResponseHeader("WWW-Authenticate", "Bearer realm=\"authentication
> > > required\"");
> > >
> > > The popup is skipped and then react/vue/angular can handle the
> response:
> > > setResponseHeader("WWW-Authenticate", "OFBiz realm=\"authentication
> > > required\"");
> > >
> > >
> > > 发件人: Girish Vasmatkar<mailto:girish.vasmat...@hotwaxsystems.com>
> > > 发送时间: 2020年7月9日 14:54
> > > 收件人: dev@ofbiz.apache.org<mailto:dev@ofbiz.apache.org>
> > > 主题: Re: REST implementation
> > >
> > > Hi Shi
> > >
> > > Thanks for taking a look at it. I have a question on "WWW-Authenticate"
> > > header so please clarify and I can make appropriate changes
> accordingly -
> > >
> > > All I am finding is that to prevent the pop-up, either return 403
> (which
> > I
> > > do not want to do) or not include "WWW-Authenticate" header at all (not
> > > inclined to do this as well because then we would be violating the
> spec).
> > > Do you mean to NOT start the value of the header with "Bearer" ?
> > > so instead of below
> > >
> > > *WWW-Authenticate: Bearer realm="Access to OFBiz", charset="UTF-8"*
> > >
> > > should we change it to
> > >
> > > *WWW-Authenticate: xBearer realm="Access to OFBiz", charset="UTF-8"*
> > >
> > > I did not test it, but I can just change it like this without testing

Re: REST implementation

2020-07-09 Thread Shi Jinghai
Hi Girish,

Yes, you got it.

Web browser will popup a login dialog when response code is 401:
setResponseHeader("WWW-Authenticate", "Bearer realm=\"authentication 
required\"");

The popup is skipped and then react/vue/angular can handle the response:
setResponseHeader("WWW-Authenticate", "OFBiz realm=\"authentication 
required\"");


发件人: Girish Vasmatkar<mailto:girish.vasmat...@hotwaxsystems.com>
发送时间: 2020年7月9日 14:54
收件人: dev@ofbiz.apache.org<mailto:dev@ofbiz.apache.org>
主题: Re: REST implementation

Hi Shi

Thanks for taking a look at it. I have a question on "WWW-Authenticate"
header so please clarify and I can make appropriate changes accordingly -

All I am finding is that to prevent the pop-up, either return 403 (which I
do not want to do) or not include "WWW-Authenticate" header at all (not
inclined to do this as well because then we would be violating the spec).
Do you mean to NOT start the value of the header with "Bearer" ?
so instead of below

*WWW-Authenticate: Bearer realm="Access to OFBiz", charset="UTF-8"*

should we change it to

*WWW-Authenticate: xBearer realm="Access to OFBiz", charset="UTF-8"*

I did not test it, but I can just change it like this without testing if
you can please confirm it will prevent the browser dialog.

Thanks again for the review.

Best,
Girish

On Wed, Jul 8, 2020 at 8:45 PM Shi Jinghai  wrote:

> Hi Girish,
>
> Excellent.
>
> Only one suggestion from my quick view, when response code is 401, the
> "WWW-Authenticate" header should be set to start with a word NOT “Bearer
> …”, this can prevent web browser from popping up a login dialog.
>
> Kind Regards,
>
> Shi Jinghai
>
> 发件人: Girish Vasmatkar<mailto:girish.vasmat...@hotwaxsystems.com>
> 发送时间: 2020年7月8日 20:47
> 收件人: dev@ofbiz.apache.org<mailto:dev@ofbiz.apache.org>
> 主题: Re: REST implementation
>
> Hi Folks
>
> I have added support for OpenApi Integration. The updated code can be found
> here : https://github.com/girishvasmatkar/ofbiz-rest-impl. Please go
> through the changes and test at your end and let me know your thoughts.
>
> I am planning to do some refactoring and then raise initial PR for the
> plug-in if the changes look good to everyone.
>
> Best,
> Girish
>
>
> On Wed, Jun 17, 2020 at 4:54 PM Carsten Schinzer <
> cars...@dcs-verkaufssysteme.de> wrote:
>
> > Hi Girish,
> >
> > Thanks to clarify :)
> > What caught me on the OpenAPI integration is the snippet quoted below and
> > I realize I should have read it in context. Actually then it is aligned
> > with my view.
> >
> > Warm regards
> >
> > Carsten
> >
> > >>>>> Initial implementation does not contain OpenApi integration yet.
> And
> >
> >
>
>



Re: REST implementation

2020-07-08 Thread Shi Jinghai
Hi Girish,

Excellent.

Only one suggestion from my quick view, when response code is 401, the 
"WWW-Authenticate" header should be set to start with a word NOT “Bearer …”, 
this can prevent web browser from popping up a login dialog.

Kind Regards,

Shi Jinghai

发件人: Girish Vasmatkar<mailto:girish.vasmat...@hotwaxsystems.com>
发送时间: 2020年7月8日 20:47
收件人: dev@ofbiz.apache.org<mailto:dev@ofbiz.apache.org>
主题: Re: REST implementation

Hi Folks

I have added support for OpenApi Integration. The updated code can be found
here : https://github.com/girishvasmatkar/ofbiz-rest-impl. Please go
through the changes and test at your end and let me know your thoughts.

I am planning to do some refactoring and then raise initial PR for the
plug-in if the changes look good to everyone.

Best,
Girish


On Wed, Jun 17, 2020 at 4:54 PM Carsten Schinzer <
cars...@dcs-verkaufssysteme.de> wrote:

> Hi Girish,
>
> Thanks to clarify :)
> What caught me on the OpenAPI integration is the snippet quoted below and
> I realize I should have read it in context. Actually then it is aligned
> with my view.
>
> Warm regards
>
> Carsten
>
> >>>>> Initial implementation does not contain OpenApi integration yet. And
>
>



Re: [PROPOSAL] Change implementation/runtimeOnly in build.gradle to comma separated style?

2020-06-30 Thread Shi Jinghai
Hi Jacques,

OK, agree.

发件人: Jacques Le Roux<mailto:jacques.le.r...@les7arts.com>
发送时间: 2020年6月30日 21:23
收件人: dev@ofbiz.apache.org<mailto:dev@ofbiz.apache.org>
主题: Re: [PROPOSAL] Change implementation/runtimeOnly in build.gradle to comma 
separated style?

Hi Jinghai,

Actually I prefer the current version. I find it easier to maintain: eg when 
you add a line you simply copy the line above and don't need to worry
about the comma.

I can't remember the number of cases I forgot a comma in the Buildbot config 
file :)

Jacques

Le 30/06/2020 à 11:19, Shi Jinghai a écrit :
> Hi Eugen,
>
> I agree this proposal is mild cosmetic :)
>
>
> 发件人: Eugen Stan<mailto:eugen.s...@netdava.com>
> 发送时间: 2020年6月30日 17:07
> 收件人: dev@ofbiz.apache.org<mailto:dev@ofbiz.apache.org>; Shi 
> Jinghai<mailto:huaru...@hotmail.com>
> 主题: Re: [PROPOSAL] Change implementation/runtimeOnly in build.gradle to comma 
> separated style?
>
> Hi Shi Jinghai,
>
> What are the benefits?
>
> Why do all this work?
>
> It seems to me they are only mild cosmetic improvements (arguably an
> improvement).
>
> In my apps I usually copy dependencies from maven (the copy button) and
> they include the 'implementation' word, as most similar sites do.
>
> Example:
> https://search.maven.org/artifact/org.huihoo/ofbiz-smart-framework/0.9.5/jar
>
>
>
> La 30.06.2020 06:05, Shi Jinghai a scris:
>> Hi there,
>>
>> While typing implementation, runtimeOnly and etc. in build.gradle, I find 
>> they can be changed to comma separated style, as the build.gradle is a 
>> groovy file, for example:
>>
>> implementation 'xerces:xercesImpl:2.11.0'
>> implementation 'com.google.zxing:core:3.4.0'
>> implementation 
>> 'com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.2'
>> implementation 'com.googlecode.ez-vcard:ez-vcard:0.9.10'
>> implementation 
>> 'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:1.1'
>>
>> EQUALS to
>>
>> implementation 'xerces:xercesImpl:2.11.0',
>> 'com.google.zxing:core:3.4.0',
>> 
>> 'com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.2',
>> 'com.googlecode.ez-vcard:ez-vcard:0.9.10',
>> 
>> 'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:1.1'
>>
>> Just the same as
>>int a, b
>> equals to
>>int a
>>int b
>>
>> What do you think?
>>
>> Kind Regards,
>>
>> Shi Jinghai
>>
>>
> --
> Eugen Stan
> +40720 898 747 / netdava.com
>
>



[PROPOSAL] Return json from database directly

2020-06-30 Thread Shi Jinghai
Hi there,

While playing openapi with ofbiz, I found it would more convenient to get some 
view entity results in json format. I tried array-to-json of PostgreSQL, it 
worked.

A sample use case:









And then the result could be sent to front-end(react/vue/angular) directly.

Kind Regards,

Shi Jinghai


Re: [PROPOSAL] Change implementation/runtimeOnly in build.gradle to comma separated style?

2020-06-30 Thread Shi Jinghai
Hi Eugen,

I agree this proposal is mild cosmetic :)


发件人: Eugen Stan<mailto:eugen.s...@netdava.com>
发送时间: 2020年6月30日 17:07
收件人: dev@ofbiz.apache.org<mailto:dev@ofbiz.apache.org>; Shi 
Jinghai<mailto:huaru...@hotmail.com>
主题: Re: [PROPOSAL] Change implementation/runtimeOnly in build.gradle to comma 
separated style?

Hi Shi Jinghai,

What are the benefits?

Why do all this work?

It seems to me they are only mild cosmetic improvements (arguably an
improvement).

In my apps I usually copy dependencies from maven (the copy button) and
they include the 'implementation' word, as most similar sites do.

Example:
https://search.maven.org/artifact/org.huihoo/ofbiz-smart-framework/0.9.5/jar



La 30.06.2020 06:05, Shi Jinghai a scris:
> Hi there,
>
> While typing implementation, runtimeOnly and etc. in build.gradle, I find 
> they can be changed to comma separated style, as the build.gradle is a groovy 
> file, for example:
>
> implementation 'xerces:xercesImpl:2.11.0'
> implementation 'com.google.zxing:core:3.4.0'
> implementation 
> 'com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.2'
> implementation 'com.googlecode.ez-vcard:ez-vcard:0.9.10'
> implementation 
> 'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:1.1'
>
> EQUALS to
>
> implementation 'xerces:xercesImpl:2.11.0',
>'com.google.zxing:core:3.4.0',
>
> 'com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.2',
>'com.googlecode.ez-vcard:ez-vcard:0.9.10',
>
> 'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:1.1'
>
> Just the same as
>   int a, b
> equals to
>   int a
>   int b
>
> What do you think?
>
> Kind Regards,
>
> Shi Jinghai
>
>
--
Eugen Stan
+40720 898 747 / netdava.com




[PROPOSAL] Change implementation/runtimeOnly in build.gradle to comma separated style?

2020-06-29 Thread Shi Jinghai
Hi there,

While typing implementation, runtimeOnly and etc. in build.gradle, I find they 
can be changed to comma separated style, as the build.gradle is a groovy file, 
for example:

implementation 'xerces:xercesImpl:2.11.0'
implementation 'com.google.zxing:core:3.4.0'
implementation 
'com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.2'
implementation 'com.googlecode.ez-vcard:ez-vcard:0.9.10'
implementation 
'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:1.1'

EQUALS to

implementation 'xerces:xercesImpl:2.11.0',
   'com.google.zxing:core:3.4.0',
   
'com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.2',
   'com.googlecode.ez-vcard:ez-vcard:0.9.10',
   
'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:1.1'

Just the same as
  int a, b
equals to
  int a
  int b

What do you think?

Kind Regards,

Shi Jinghai



Re: ReturnReason: Is this really required?

2019-09-01 Thread Shi Jinghai
Scott is quite right.

From my view, the column missing in ReturnReason is implied by the reason 
labels. A scenario is in inventory tally, when a reason selected in tally 
operation to an inventory item, we can validate new quantity and reason, for 
example, if reasonId is STOLEN, then we know the item quantity should be 
decreased.

Kind Regards,

Shi Jinghai


-邮件原件-
发件人: Scott Gray [mailto:scott.g...@hotwaxsystems.com] 
发送时间: 2019年8月30日 5:07
收件人: Dev list
主题: Re: ReturnReason: Is this really required?

Hi Suraj,

One good reason for custom enum/type tables is that it allows you to
specify behaviors for the values.

As a quick made-up example:
I could add columns like "storeCredit", "exchange", "replace", "fullRefund"
to the ReturnReason table and then set those flags to Y/N depending on the
return reason.  Now I can easily configure that "Do not want" as a return
reason is only eligible for store credit, while "Arrived with damage"
return reason is eligible for replacement or a full refund, while "Wrong
size" is eligible for exchange.  Adding behaviors like this to enums/types
allows a user to introduce new records with a unique combination of
behaviors without the need for code changes (assuming all of the desired
behaviors are already supported).

Although for the above example one could argue that the configuration
should be made in conjunction with a ProductStore or Product rather than
globally, in which case you could also consider adding productStoreId and
productId to the ReturnReason table and have the returnReasonId simply
become a sequenced id rather than an enum.

So even if OFBiz doesn't make use of it currently, I think there's a solid
use case for return reasons not simply being Enumeration records.

Regards
Scott


On Thu, 29 Aug 2019 at 17:21, Suraj Khurana  wrote:

> Hello folks,
>
> We have an entity ReturnReason in which we have some predefined return
> reasons and any custom projects and add more reason to it.
> My question is do we really need an entity for this, it can be easily
> managed through any enumeration data as well of certain enum type.
>
> Are there any other cases that I am missing here for which we need this
> specific entity?
> Please share your thoughts on this.
>
> --
> Best Regards,
> Suraj Khurana
> Technical Consultant
>


Re: [QUESTION] Has anyone worked with vue.js and ofbiz?

2019-08-18 Thread Shi Jinghai
Hi Hannes,

I think I understand your feeling as I tried BlazeDS in 2007/2008 and Angular 
at the same time as you did. I have changed to Vue for a year. I'm very happy 
on it as both development quality and speed are great.

I'm sure the front end container is mature and steady now, new investments on 
Vue and React won't be wasted.

My system main structure is here:
Front-end
Back-end
Vue Element for PC usershttps/websockt
Wechat MiniApp (React)->  OpenAPI  -->  OFBiz 
Service Engine  -->  OFBiz Entity Engine  -->  Database
Alipay MiniApp(React)   |   
   |
 |  -->  Apereo 
CAS  -->  |
 |  -->  JBoss 
Drools  -->  |
 |  -->  
Activiti  -->  |
 |  -->  Quartz 
 -->  |



All openapi are implemented by groovy services, here's the openapi doc/demo:
https://216s86948t.iask.in/directsale-trunk-test/openapi/

The Vue Element:
https://216s86948t.iask.in/directsale-trunk-test/entropyAdmin/
Username: admin
Password: entropy
ClientId: Entropy (only required in openapi oauth2 login)


Kind Regards,

Shi Jinghai



-邮件原件-
发件人: Hannes Geist [mailto:h...@hgeist.com] 
发送时间: 2019年8月18日 18:02
收件人: dev@ofbiz.apache.org
主题: [QUESTION] Has anyone worked with vue.js and ofbiz?

Hi Everyone,

i have developed an AngularJS 1.7.x frontend with Foundation 6.x, 
angular-foundation, ag-grid, jqx-grid and ngDialog based on ofbiz 16.x for a 
customer for 2,5 years now.

It works pretty well, although one can see AngularJs 1.x weaknesses when you 
have to display large amounts of data and the code rights belong to the 
customer, for now.


TypeScript and Angular 6.x etc. suffer from the same problem from what i see: 
Crazy amount of work and structure just for the simplest js-apps.

Steep learning curve.

Architecture still changing so fast that you can't find reliable components 
that just work.


Has anyone tried building a vue.js frontend for ofbiz yet and could you 
recommend doing that, based on stability of components etc.?


Best regards

Hannes Geist




Re: Supply chain example

2019-04-07 Thread Shi Jinghai
Hi Laxman,

I'm building an OFBiz blockchain system in past half year. Unfortunately it's 
not a tracking system, it's a retail system.

AFAIK, in China Spirits industry, RFID is the main tracking tech, is your soft 
drink number in a RFID label?

Kind Regards,

Shi Jinghai

-邮件原件-
发件人: laxman [mailto:lax...@akeo.no] 
发送时间: 2019年4月5日 13:32
收件人: dev@ofbiz.apache.org
主题: Re: Supply chain example

Hi, I want to create an application in which we have soft drink manufacture
company. They will fill the information in our supply chain. and end user
can we get information bases on soft drink number 



--
Sent from: http://ofbiz.135035.n4.nabble.com/OFBiz-Dev-f165671.html


Re: [REMOVE?] OWASP Dependency Check feature (Gradle plugin)

2019-03-04 Thread Shi Jinghai
+1 to the OWASP-failure patch.

I applied the patch and ran "gradlew -PenableOwasp dependencyCheckAnalyze" on 
Windows 10, JDK 8, "BUILD SUCCESSFUL in 23m 16s".


-邮件原件-
发件人: Mathieu Lirzin [mailto:mathieu.lir...@nereide.fr] 
发送时间: 2019年3月3日 18:39
收件人: dev@ofbiz.apache.org
主题: Re: [REMOVE?] OWASP Dependency Check feature (Gradle plugin)

Hello Jacques,

Jacques Le Roux  writes:

> I added the OWASP Dependency Check feature before we switched to
> Gradle. It was then really useful, but it's no disputable as explained
> at
> https://cwiki.apache.org/confluence/display/OFBIZ/About+OWASP+Dependency+Check:
>
>Since OFBiz uses Gradle, all dependent libraries (ie also
>dependencies from the libraries OFBiz uses and recursively) are
>loaded by Gradle and analysed by the OWASP Dependency Check
>plugin. So it's materially impossible to check all the possible
>vulnerabilities. I decided to only check the higher ones, currently
>(2017-09-29) we have only already know ones:
>
> So one option could be to completely remove this feature, what do you
> think? (see more at OFBIZ-10700)

I am not familiar with OWASP dependency check, but since it doesn't work
on my machine (See OFBIZ-10700) I can hardly see any reason to keep it.

-- 
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37


Re: Welcome to Mathieu Lirzin as new committer!

2019-02-19 Thread Shi Jinghai
Congratulations Mathieu!

Cheers,


-邮件原件-
发件人: Taher Alkhateeb [mailto:ta...@apache.org] 
发送时间: 2019年2月20日 1:16
收件人: OFBiz development mailing list
主题: Welcome to Mathieu Lirzin as new committer!

The OFBiz PMC has invited Mathieu Lirzin to become a new committer and
we are happy to announce that he has accepted this role.

Some of the reasons for inviting Mathieu include:

- He is invested in the OFBiz project and has delivered substantial
work to the code base.
- He has demonstrated solid technical skills.
- He adopts a professional attitude towards coding and software development.
- He engages thoughtfully with others and likes to work with the community.

Please join me in welcoming and congratulating Mathieu!

Cheers,
Taher Alkhateeb


Re: JobManager/JobPoller issues

2019-01-31 Thread Shi Jinghai
Hi Scott,

Perhaps we can use multiple service engines (pools), each pool run a set of 
specific services, fast or slow.

I created an issue "Enable a service to run by a specific service engine"[1] 
about 2 years ago, not sure whether it works in your case.

Kind Regards,

Shi Jinghai

[1] https://issues.apache.org/jira/browse/OFBIZ-9233



-邮件原件-
发件人: Scott Gray [mailto:scott.g...@hotwaxsystems.com] 
发送时间: 2019年1月31日 3:48
收件人: dev@ofbiz.apache.org
主题: JobManager/JobPoller issues

Hi folks,

Just jotting down some issues with the JobManager over noticed over the
last few days:
1. min-threads in serviceengine.xml is never exceeded unless the job count
in the queue exceeds 5000 (or whatever is configured).  Is this not obvious
to anyone else?  I don't think this was the behavior prior to a refactoring
a few years ago.
2. The advice on the number of threads to use doesn't seem good to me, it
assumes your jobs are CPU bound when in my experience they are more likely
to be I/O bound while making db or external API calls, sending emails etc.
With the default setup, it only takes two long running jobs to effectively
block the processing of any others until the queue hits 5000 and the other
threads are finally opened up.  If you're not quickly maxing out the queue
then any other jobs are stuck until the slow jobs finally complete.
3. Purging old jobs doesn't seem to be well implemented to me, from what
I've seen the system is only capable of clearing a few hundred per minute
and if you've filled the queue with them then regular jobs have to queue
behind them and can take many minutes to finally be executed.

I'm wondering if anyone has experimented with reducing the queue the size?
I'm considering reducing it to say 100 jobs per thread (along with
increasing the thread count).  In theory it would reduce the time real jobs
have to sit behind PurgeJobs and would also open up additional threads for
use earlier.

Alternatively I've pondered trying a PriorityBlockingQueue for the job
queue (unfortunately the implementation is unbounded though so it isn't a
drop-in replacement) so that PurgeJobs always sit at the back of the
queue.  It might also allow prioritizing certain "user facing" jobs (such
as asynchronous data imports) over lower priority less time critical jobs.
Maybe another option (or in conjunction) is some sort of "swim-lane"
queue/executor that allocates jobs to threads based on prior execution
speed so that slow running jobs can never use up all threads and block
faster jobs.

Any thoughts/experiences you have to share would be appreciated.

Thanks
Scott


Re: [DISCUSSION] turn off OOTB JWT authorization/SSO functionality

2019-01-19 Thread Shi Jinghai
I've just reviewed the code of JWT implements. Sorry for my bad English, I'm a 
bit lost, are we discussing which one is more secure, the tomcat session or JWT?


-邮件原件-
发件人: Michael Brohl [mailto:michael.br...@ecomify.de] 
发送时间: 2019年1月19日 19:58
收件人: dev@ofbiz.apache.org
主题: [DISCUSSION] turn off OOTB JWT authorization/SSO functionality

Hi all,

during my work in [1] I realized that the OOTB JWT authorization / 
single sign on is switched on by default. The logic to retrieve the 
secret key uses a default if there is no configuration in SystemProperty 
or security.properties.

This makes it easy to prepare a JWT (e.g. by using [2] or [3]) and login 
using a guessed userLoginId and this token (which can be retrieved from 
the code).

I think we should secure this so that this cannot be done in an OOTB 
setting with the following additions:

1. make it configurable through a property which is initially turned 
off. I think thi is better than commenting the preprocessor in/out 
because it can be better integrated in (custom) configuration mechanisms.

2. don't use a default secret key if none is provided. The 
user/administrator must explicitly set a secret key and should know what 
he is doing then.

3. don't proceed if no secret key can be found (do not attempt a login 
using the JWT)


I think that we should turn this feature off by default for the 
following reasons:

1. it opens up a security hole if the user does not remove the 
checkJWTLogin preprocessor (see above)

2. the functionality to have a single sign on between two OFBiz 
instances will only be used in rare cases (I think). It is only designed 
for this special case and cannot be used for standard single sign on 
scenarios with other systems.

3. if it is not used, it will still try to read the authorization 
header, key etc. *on every request*


What do think?

Regards,

Michael


[1] https://issues.apache.org/jira/browse/OFBIZ-10814

[2] https://jwt.io/

[3] http://jwtbuilder.jamiekurtz.com/






Re: OFBIZ-10693 vs OFBIZ-10694

2018-12-13 Thread Shi Jinghai
Hi Jacques,

Love you! :)


-邮件原件-
发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com] 
发送时间: 2018年12月13日 22:55
收件人: dev@ofbiz.apache.org
主题: Re: OFBIZ-10693 vs OFBIZ-10694

Thanks Jinghai for your opinion,

Fixed with OFBIZ-10693

Jacques

Le 07/12/2018 à 11:06, Jacques Le Roux a écrit :
> Hi,
>
> Mathieu and I propose 2 solutions for "gradlew generateOfbizDocumentation’ 
> fails with Gradle 5.0"
>
> Please check which one you would prefer to be committed
>
> Thanks
>
> Jacques
>
>


Re: OFBIZ-10693 vs OFBIZ-10694

2018-12-11 Thread Shi Jinghai
My + 1 to Mathieu's method, as I have confidence it will not affect 
dependencies check and tasks such as eclipseClasspath.


-邮件原件-
发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com] 
发送时间: 2018年12月11日 23:13
收件人: dev@ofbiz.apache.org
主题: Re: OFBIZ-10693 vs OFBIZ-10694

Le 07/12/2018 à 11:06, Jacques Le Roux a écrit :
> Hi,
>
> Mathieu and I propose 2 solutions for "gradlew generateOfbizDocumentation’ 
> fails with Gradle 5.0"
>
> Please check which one you would prefer to be committed
>
> Thanks
>
> Jacques
>
>
I think I did not give enough elements.

Mathieu suggested to use

-    classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.9.2'
+    classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.8.1'

I suggested

+configurations.all { exclude module: "groovy-all" } // Temporary 
workaround, see OFBIZ-10694

We crossed on wire so were not influenced. I think now that my proposition, 
though temporary, as the merit of not depend on a specific 
asciidoctor-gradle-plugin version

I did not invent it, it comes from https://github.com/gradle/gradle/issues/3698

Thanks for your opinions to fix this issue ASAP

Jacques



Re: OFBiz as Marketplace

2018-11-23 Thread Shi Jinghai
+1

Current OFBiz ecommerce is for single product store running the website, a 
market place website is a product store delegates many stores. So the whole set 
of ShoppingList/Item, OrderHeader/Item, OrderAssoc, Shipment, Return/Refund has 
to be changed accordingly.

In China, a typical procedure is:
1. Customer adds products from stores into shopping list
2. Customer selects shopping list items to check out
3. Marketplace generates an original order and splits the order to a set of 
orders for each store to reduce the QOH/QTP or lock the inventory if necessary
4. Customer pays the original order to the market place
5. Marketplace changes the whole set of orders to approved status
6. Each store ships its own orders separately
7. Return:
  7.1 Customer returns a product to the store directly
  7.2 Store approves the return
  7.3 Maketplace refunds the customer
  * For VIP customer, 7.3 would be 7.2, 7.2 be 7.3
8. The payment from marketplace to store may have a term
9. The marketplace commission is from 0% to 15%

Kind Regards,

Shi Jinghai


-邮件原件-
发件人: Rishi Solanki [mailto:rishisolan...@gmail.com] 
发送时间: 2018年11月13日 20:36
收件人: dev@ofbiz.apache.org
主题: OFBiz as Marketplace

Devs,
While shopping with different marketplaces like amazon the idea came into
my mind that, what are the things required to have an marketplace plugin
within the OFBiz same as we have ecommerce.

Which behaves same as ecommerce but also offers sellers to sale their
products on marketplace. I could think of following workflow;

1) Sellers can upload their product, images, prices with all the required
details.
2) The same product can be sale by other sellers as well.
3) An customer can purchase the product from any listed sellers at
ecommerce side.
4) Manage the product inventory by sellers.
5) Shipment tracking.
6) Manage/Create seller profile.
7) Commission Engine marketplace run and payment made to sellers.
8) Manage product details as per seller preferences.
9) Seller specific reports and other tasks.
10) Manage Orders, Returns and related reports etc.
11) Marketing Campaign setup.

Here I'm sharing the idea what comes in my mind, and it would be great to
have this as plugin in OFBiz which support the marketplace business problem
and increase the OFBiz acceptance in market.

Any suggestion and help in designing, structuring, modeling, coding,
architecture is greatly appreciated. I wonder if anyone already implemented
one using OFBiz.

If all are agree to have this, then I'll start documentation around it and
move from there.

Thanks!

Best Regards,
--
Rishi Solanki
Sr Manager, Enterprise Software Development
HotWax Systems Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxsystems.com
www.hotwax.co


Re: Question on RMI in current version 17.12

2018-10-24 Thread Shi Jinghai
If I remembered right, you can return List or a single 
GenericEntity to rmi client, the client can call getAllFields method in 
GenericEntity to fetch entity data to a Map, and then you can use the data as 
you wish.

-邮件原件-
发件人: horst leitenmueller [mailto:horst.leitenmuel...@it4health.at] 
发送时间: 2018年10月24日 17:04
收件人: dev@ofbiz.apache.org
主题: Re: Question on RMI in current version 17.12

hi

Yes and inside the map you have a 
"org.apache.ofbiz.entity.util.EntityListIterator".
Where you then need ALL server side classes to get the entries just an example 
for the service performFindParty

It there a way to JUST get a Map with String, String/Integer/Whatever and NO 
ofbiz specific Classes ?

Thank in advance

On 2018/10/24 08:52:52, Shi Jinghai  wrote: 
> NOT true, as the fields in a GenericValue can fetched by a Map.> 
> 
> 
> 
> -邮件原件-> 
> 
> 发件人: horst leitenmueller [mailto:horst.leitenmuel...@it4health.at] > 
> 
> 发送时间: 2018年10月24日 16:49> 
> 
> 收件人: dev@ofbiz.apache.org> 
> 
> 主题: Re: Question on RMI in current version 17.12> 
> 
> 
> 
> SOLVED: my own reply to the Question> 
> 
> 
> 
> !!! NOT POSSIBLE !!! to use RMI inside of an JEE Application Server like 
> Wildfly > 
> 
> 
> 
> Why? its easy the dependency Tree of the classes (especially GenericValue ) 
> is needing ALL classes (including Services / DAO etc..) of the ofbiz server 
> side…> 
> 
> => you can’t create a small thin client with only containing the RMI part and 
> the transport objects…> 
> 
> 
> 
> Only a ofbiz.jar to ofbiz.jar is possible (or java clients wrapping all the 
> ofbiz.jar but I would not do that)….> 
> 
> 
> 
> Br> 
> 
> 
> 
> On 2018/10/23 08:08:38, horst leitenmueller  wrote: > 
> 
> > Hi,> > 
> 
> > > 
> 
> > I have a question on accessing the Backend of Ofbiz via RMI there have been 
> > a example client which was integrated in a single jar of ofbiz> > 
> 
> > > 
> 
> > But I want to integrate it in an application server (at the moment I get an 
> > exception of missing file java.lang.NoClassDefFoundError: 
> > org/apache/juli/logging/LogFactory)> > 
> 
> > > 
> 
> > It seems that something is trying to do more than I want that it does…> > 
> 
> > > 
> 
> > Question 1: Is there / was there a thin client jar file to access it from 
> > the outside ?> > 
> 
> > Question 2: IF Question 1 is not  true how can I extract it on the current 
> > project structure ? The classes are splittet over all framework parts and 
> > I’m not a gradle specialist to get this flying…> > 
> 
> > > 
> 
> > Perhaps somebody can help or explain me..  (btw maven not a problem same 
> > with ant) > > 
> 
> > > 
> 
> > Br horst> > 
> 
> > > 
> 
> > > 
> 
> > > 
> 
> > > 
> 
> >  > 
> 
> 
> 
> 
> 
> 
> 
>  

--
IT4Health.at
Ing. DI Horst Leitenmueller
Sperlstr. 11
4040 Linz

tel.: +43 650 2042702
email: horst.leitenmuel...@it4health.at
--





Re: Question on RMI in current version 17.12

2018-10-24 Thread Shi Jinghai
NOT true, as the fields in a GenericValue can fetched by a Map.

-邮件原件-
发件人: horst leitenmueller [mailto:horst.leitenmuel...@it4health.at] 
发送时间: 2018年10月24日 16:49
收件人: dev@ofbiz.apache.org
主题: Re: Question on RMI in current version 17.12

SOLVED: my own reply to the Question

!!! NOT POSSIBLE !!! to use RMI inside of an JEE Application Server like 
Wildfly 

Why? its easy the dependency Tree of the classes (especially GenericValue ) is 
needing ALL classes (including Services / DAO etc..) of the ofbiz server side…
=> you can’t create a small thin client with only containing the RMI part and 
the transport objects…

Only a ofbiz.jar to ofbiz.jar is possible (or java clients wrapping all the 
ofbiz.jar but I would not do that)….

Br

On 2018/10/23 08:08:38, horst leitenmueller  wrote: 
> Hi,> 
> 
> I have a question on accessing the Backend of Ofbiz via RMI there have been a 
> example client which was integrated in a single jar of ofbiz> 
> 
> But I want to integrate it in an application server (at the moment I get an 
> exception of missing file java.lang.NoClassDefFoundError: 
> org/apache/juli/logging/LogFactory)> 
> 
> It seems that something is trying to do more than I want that it does…> 
> 
> Question 1: Is there / was there a thin client jar file to access it from the 
> outside ?> 
> Question 2: IF Question 1 is not  true how can I extract it on the current 
> project structure ? The classes are splittet over all framework parts and I’m 
> not a gradle specialist to get this flying…> 
> 
> Perhaps somebody can help or explain me..  (btw maven not a problem same with 
> ant) > 
> 
> Br horst> 
> 
> 
> 
> 
>  





Re: Question on RMI in current version 17.12

2018-10-24 Thread Shi Jinghai
Hi Horst,

Good question. The original ofbiz-rmi.jar is a thin rmi client, you can use it 
access ofbiz remotely. It's missing after changing to use gradle, it can be 
recovered by adding a new task to build the jar separately.

The missing file exception may be related to underlying logging framework of 
your application server.

You can treat Gradle as an alternative version of maven build tool, same 
concepts but simple writing.

Kind Regards,

Shi Jinghai


-邮件原件-
发件人: horst leitenmueller [mailto:horst.leitenmuel...@it4health.at] 
发送时间: 2018年10月23日 16:09
收件人: dev@ofbiz.apache.org
主题: Question on RMI in current version 17.12

Hi,

I have a question on accessing the Backend of Ofbiz via RMI there have been a 
example client which was integrated in a single jar of ofbiz

But I want to integrate it in an application server (at the moment I get an 
exception of missing file java.lang.NoClassDefFoundError: 
org/apache/juli/logging/LogFactory)

It seems that something is trying to do more than I want that it does…

Question 1: Is there / was there a thin client jar file to access it from the 
outside ?
Question 2: IF Question 1 is not  true how can I extract it on the current 
project structure ? The classes are splittet over all framework parts and I’m 
not a gradle specialist to get this flying…

Perhaps somebody can help or explain me..  (btw maven not a problem same with 
ant) 

Br horst






Re: Should we keep the multi-tenants feature in OFBiz?

2018-09-03 Thread Shi Jinghai
Hi Jacques,

I assume we face the same requirement: how to become a value-added reseller of 
cloud services. In China, the reseller margin could be 15-20% from Alibaba 
cloud or other cloud venders, so there's a new business model that we can offer 
some vertical OFBiz applications "free" and profitable.

Kubernetes is the management tool to sell/distribute OFBiz applications.

The OFBiz applications can be a multi-tenants model: multiple customers share 
one machine at a low price, this model is suitable for tiny/small customers.

The OFBiz applications can also be a multi-instances model: each customer can 
scale up/down its-own application on-demand, this model is suitable for 
medium/large customers.

Every customer can upgrade from multi-tenants to multi-instances, or downgrade 
from multi-instances to multi-tenants.

Thank you for this topic. Please count me in if we have the same target.

Kind Regards,

Shi Jinghai



-邮件原件-
发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com] 
发送时间: 2018年9月2日 16:13
收件人: dev@ofbiz.apache.org
主题: Re: Should we keep the multi-tenants feature in OFBiz?

Hi Jinghai,

Inline...


Le 29/08/2018 à 14:49, Shi Jinghai a écrit :
> Hi Jacques,
>
> Honestly I was shocked by this email, I'm working on deploying OFBiz in 
> Kubernetes, are you monitoring me?
Not at all :D

> In 2010, Kubernetes was quite new and not good enough, now it's the standard 
> on cloud deploy management, and we can support it.
I agree Kubernetes is a good tool. How do you envision to use it with OFBiz? I 
see it more as a production tool, not something we can embed like Tomcat.

> Before doing that, we have to answer some common questions in cloud running 
> lifecycle, such as how may instances/requests can share one CPU, how to 
> deliver(create) an instance, how to isolate an instance, how to offline, how 
> to remove, how to online again and etc.
You seem to be advanced in this, have you already , even partially, answered 
these questions? Are you working on a multi-tenant solution?

> Personally I don't think we have to remove current multi-tenants implements, 
> add a SAAS implement would be OK.
The problem with the current implementation is that it has changed the OFBiz 
code in some places, not always for the good.
It seems you not alone to want to keep it. Are you using it as is?
They are also people who would be glad to get rid of.
Let's see...

Jacques

>
> Kind Regards,
>
> Shi Jinghai
>
>
> -邮件原件-
> 发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com]
> 发送时间: 2018年8月29日 17:46
> 收件人: dev@ofbiz.apache.org
> 主题: Should we keep the multi-tenants feature in OFBiz?
>
> Hi,
>
> The multi-tenants feature in OFBiz only allows a dozens or maybe even few 
> hundreds tenants, after it begin to be a lot of DBs!
> I faced that with a startup which wanted to handle thousands, if not millions 
> (actually they failed), of tenants, obviously OFBiz can't do that.
>
> I don't break any secret to say that I was working with David (and Andrew) on 
> a project in 2010 when David had to quickly answer to the client's
> demand who wanted to have tenants. David brilliantly and quickly delivered, 
> but it was only a start.
>
> After many improvements, this feature still have some issues
>       
> https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FOFBIZ-6066data=02%7C01%7C%7C08ade5bcabda49a1f68308d610abf411%7C84df9e7fe9f640afb435%7C1%7C0%7C636714728052368674sdata=QCPlqtRHjd9a%2Fq3NIVujeqhR3o6sjjZ0sUEbFk4ojp8%3Dreserved=0
>       
> https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FOFBIZ-7900data=02%7C01%7C%7C08ade5bcabda49a1f68308d610abf411%7C84df9e7fe9f640afb435%7C1%7C0%7C636714728052368674sdata=fxUSwHPjg%2F8Nf2aDGCODhKauIVAbmK1wb%2B67%2FPZGrRU%3Dreserved=0
>       
> https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FOFBIZ-6164data=02%7C01%7C%7C08ade5bcabda49a1f68308d610abf411%7C84df9e7fe9f640afb435%7C1%7C0%7C636714728052368674sdata=MoH0jYAEo5IY0HA5xQOO2ZBKKMMU9RdloK1xlWNY6oY%3Dreserved=0
>       
> https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FOFBIZ-6065data=02%7C01%7C%7C08ade5bcabda49a1f68308d610abf411%7C84df9e7fe9f640afb435%7C1%7C0%7C636714728052368674sdata=4lZb89MwttM6VGxNdT9XSeP0sEL6UBlEMOdwf%2BsU9c8%3Dreserved=0
>
> Also this is somehow related
>       
> https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FOFBIZ-6712data=02%7C01%7C%7C08ade5bcabda49a1f68308d610abf411%7C84df9e7fe9f640afb435%7C1%7C0%7C636714728052368674sdata=LdE%2FSQc51d%2BeN1TdZMFJgDLJT8MmFaN16VPP9H1izto%3Dreserved=0
>
&

Re: Should we keep the multi-tenants feature in OFBiz?

2018-08-29 Thread Shi Jinghai
Hi Jacques,

Honestly I was shocked by this email, I'm working on deploying OFBiz in 
Kubernetes, are you monitoring me?

In 2010, Kubernetes was quite new and not good enough, now it's the standard on 
cloud deploy management, and we can support it.

Before doing that, we have to answer some common questions in cloud running 
lifecycle, such as how may instances/requests can share one CPU, how to 
deliver(create) an instance, how to isolate an instance, how to offline, how to 
remove, how to online again and etc.

Personally I don't think we have to remove current multi-tenants implements, 
add a SAAS implement would be OK.

Kind Regards,

Shi Jinghai


-邮件原件-
发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com] 
发送时间: 2018年8月29日 17:46
收件人: dev@ofbiz.apache.org
主题: Should we keep the multi-tenants feature in OFBiz?

Hi,

The multi-tenants feature in OFBiz only allows a dozens or maybe even few 
hundreds tenants, after it begin to be a lot of DBs!
I faced that with a startup which wanted to handle thousands, if not millions 
(actually they failed), of tenants, obviously OFBiz can't do that.

I don't break any secret to say that I was working with David (and Andrew) on a 
project in 2010 when David had to quickly answer to the client's 
demand who wanted to have tenants. David brilliantly and quickly delivered, but 
it was only a start.

After many improvements, this feature still have some issues
     https://issues.apache.org/jira/browse/OFBIZ-6066
     https://issues.apache.org/jira/browse/OFBIZ-7900
     https://issues.apache.org/jira/browse/OFBIZ-6164
     https://issues.apache.org/jira/browse/OFBIZ-6065

Also this is somehow related
     https://issues.apache.org/jira/browse/OFBIZ-6712

And most importantly
     https://issues.apache.org/jira/browse/OFBIZ-7112
     https://issues.apache.org/jira/browse/OFBIZ-7754

I recently read this article

https://www.linkedin.com/pulse/architecture-constraints-end-multi-tenancy-gregor-hohpe/

and, after my experiences with multi-tenant as is in OFBiz, it made me wonder 
if we should not think about how it's done now in OFBiz in 2018 with the 
clouds being everywhere!

Before sending this email, I quickly exchanged with David about how Moqui 
handles that now. And we are on the same page, see

https://www.linkedin.com/groups/4640689/4640689-6180851287941201924

https://stackoverflow.com/questions/41952818/does-moqui-framework-2-0-still-support-mutli-tenency?rq=1
 [1]

[1] Initially David gave me this link

https://www.linkedin.com/pulse/multi-instance-moqui-docker-david-e-jones/

but it seems LinkedIn has lost it, as said in the stackoverflow comment.

So IMO why not deprecating the multi-tenants as is now and rather push a 
multi-instances way?

Opinions?

Jacques



Re: OFBIZ-10307: Navigate from a domain to another with automated signed in authentication

2018-08-22 Thread Shi Jinghai
Thank you Jacques!

Perhaps we can build a cloud-ready (SAAS version) OFBiz and add such a common 
clause :)


-邮件原件-
发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com] 
发送时间: 2018年8月22日 12:11
收件人: dev@ofbiz.apache.org
主题: Re: OFBIZ-10307: Navigate from a domain to another with automated signed in 
authentication

Hi Jinghai,

You maybe read it already, what did redislabs very recently might be affecting 
you

https://redislabs.com/community/commons-clause/

Jacques


Le 15/08/2018 à 14:37, Shi Jinghai a écrit :
> Dear Jacques,
>
> On how to store the Tokens, as a token is a key, value is the UserLogin 
> entity and/or other info, a key-value db, Redis[1] is a good choice. Redis is 
> no.7 in db ranking in Aug 2018[2], becomes more and more popular. Goldman 
> Sachs invested Redis team in last year[3]. It's common view now in China that 
> Redis is better than any others including Gemfire of Pivotal, the railway 
> ticket system of China replaced its 3 Gemfire clusters with 3 Redis clusters 
> last year and then there are much less complains on how difficulties to buy 
> spring festival tickets.
>
> Mr. Dai Haipeng contributed a Redis component in Jira[4].
>
> [1] https://redis.io/
> [2] https://db-engines.com/en/ranking
> [3] 
> https://redislabs.com/press/redis-labs-secures-44-million-funding-led-goldman-sachs-private-capital-investing-strengthen-database-leadership/
> [4] https://issues.apache.org/jira/browse/OFBIZ-9829
>
> BTW, I'll try to review the patches.
>
> Kind Regards,
>
> Shi Jinghai
>
> -邮件原件-
> 发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com]
> 发送时间: 2018年8月15日 15:09
> 收件人: dev@ofbiz.apache.org
> 主题: OFBIZ-10307: Navigate from a domain to another with automated signed in 
> authentication
>
> Hi,
>
> Some time ago I created https://issues.apache.org/jira/browse/OFBIZ-10307.
>
> I asked for reviews but only Taher answered and he asked to know the goal of 
> this new feature.
>
> It was actually developed for a client who needed to get from one OFBiz 
> instance on a server (on a domain) to another OFBiz instance on another
> server (on another domain) without having to sign up between the 2 while 
> keeping things secure.
>
> There could be many reasons why you want to split OFBiz application on 
> servers. In their case it was for performance issues.
>
> The technology used is as secure as possible. Like OAuth 2.0 it uses a token 
> but it does not need a middle authorization server (think to  two-factor
> authentication) because it's only for OFBiz instances of the same version.
>
> To commit this work we need 1st to agree an commit the work done by Deepak at 
> OFBIZ-9833 "Token Based Authentication" that I use in my last patch.
>
> For me there is only one question outstanding: how to store the Token secret. 
> But this should not prevent us to commit Deepak's work.
>
> It's now a long time (9 months) since I started this work. And my last patch 
> is ready for a month.
>
> I crossed several issues which are now all resolved. So please review and 
> answer to this thread.
>
> Without negative comments well argumented I'll commit both OFBIZ-9833 and 
> OFBIZ-10307 in a week. You can always test and review later, we use RTC.
>
> Also a veto on a commit is always possible... Of course, as ever, a good 
> consensus is preferred.
>
> Let me know if you need more information about the goal. For the technical 
> details I think I already provided them the in OFBIZ-10307.
>
> Jacques
>



Re: OFBIZ-10307: Navigate from a domain to another with automated signed in authentication

2018-08-22 Thread Shi Jinghai
Hi Michael,

Release means from private to public, i.e. upload to github.


-邮件原件-
发件人: Michael Brohl [mailto:michael.br...@ecomify.de] 
发送时间: 2018年8月21日 15:24
收件人: dev@ofbiz.apache.org
主题: Re: OFBIZ-10307: Navigate from a domain to another with automated signed in 
authentication

Hi Shi,

what do you mean when you say you are going to release the plugin? Where 
will this take place?

Regards,

Michael


Am 19.08.18 um 22:00 schrieb Shi Jinghai:
> Thanks Jacques!
>
> If so, I'll release a CAS plugin to make OFBiz offer OAuth2 alliance next 
> week. I have cas 4.2.x version running in production environment, I'll 
> upgrade it to cas 5.2.x and then release it.
>
>
>
> -邮件原件-
> 发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com]
> 发送时间: 2018年8月19日 18:34
> 收件人: dev@ofbiz.apache.org
> 主题: Re: OFBIZ-10307: Navigate from a domain to another with automated signed 
> in authentication
>
> Hi Jinghai,
>
> Actually I did not pick auth0 (not to be confused with 
> https://en.wikipedia.org/wiki/OAuth) nor https://oauth.net/2/ because those 
> need a central
> Identify server (as is the SAML protocol).
>
> I simply send a JWT token: https://en.wikipedia.org/wiki/JSON_Web_Token and 
> https://jwt.io/ to
>
> Please refer to OFBIZ-10307 "Navigate from a domain to another with automated 
> signed in authentication"
>
> Thanks for your interest.
>
> Jacques
>
>
> Le 17/08/2018 à 09:02, Shi Jinghai a écrit :
>> Hi Jacques,
>>
>> OK, I think the redis topic is jumped to next step.
>>
>> I have read the patches carelly, as a fan of Apereo CAS[1], I wonder why 
>> choose auth0[2] rather than CAS. And is the implement OAuth2 alliance?
>>
>> [1] https://github.com/apereo/cas
>> [2] https://auth0.com/
>>
>> Kind Regards,
>>
>> Shi Jinghai
>>
>>
>> -邮件原件-
>> 发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com]
>> 发送时间: 2018年8月16日 2:08
>> 收件人: dev@ofbiz.apache.org
>> 主题: Re: OFBIZ-10307: Navigate from a domain to another with automated signed 
>> in authentication
>>
>> Hi Jinghai,
>>
>> The problem with the token master secret key is to guarantee its secrecy at 
>> max.
>>
>> We already discussed different solutions at https://s.apache.org/7yyR and 
>> https://s.apache.org/IBDM
>>
>> How is Redis more secure than Postgres for storing values?
>>
>> Thanks
>>
>> Jacques
>>
>>
>> Le 15/08/2018 à 14:37, Shi Jinghai a écrit :
>>> Dear Jacques,
>>>
>>> On how to store the Tokens, as a token is a key, value is the UserLogin 
>>> entity and/or other info, a key-value db, Redis[1] is a good choice. Redis 
>>> is no.7 in db ranking in Aug 2018[2], becomes more and more popular. 
>>> Goldman Sachs invested Redis team in last year[3]. It's common view now in 
>>> China that Redis is better than any others including Gemfire of Pivotal, 
>>> the railway ticket system of China replaced its 3 Gemfire clusters with 3 
>>> Redis clusters last year and then there are much less complains on how 
>>> difficulties to buy spring festival tickets.
>>>
>>> Mr. Dai Haipeng contributed a Redis component in Jira[4].
>>>
>>> [1] https://redis.io/
>>> [2] https://db-engines.com/en/ranking
>>> [3] 
>>> https://redislabs.com/press/redis-labs-secures-44-million-funding-led-goldman-sachs-private-capital-investing-strengthen-database-leadership/
>>> [4] https://issues.apache.org/jira/browse/OFBIZ-9829
>>>
>>> BTW, I'll try to review the patches.
>>>
>>> Kind Regards,
>>>
>>> Shi Jinghai
>>>
>>> -邮件原件-
>>> 发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com]
>>> 发送时间: 2018年8月15日 15:09
>>> 收件人: dev@ofbiz.apache.org
>>> 主题: OFBIZ-10307: Navigate from a domain to another with automated signed in 
>>> authentication
>>>
>>> Hi,
>>>
>>> Some time ago I created https://issues.apache.org/jira/browse/OFBIZ-10307.
>>>
>>> I asked for reviews but only Taher answered and he asked to know the goal 
>>> of this new feature.
>>>
>>> It was actually developed for a client who needed to get from one OFBiz 
>>> instance on a server (on a domain) to another OFBiz instance on another
>>> server (on another domain) without having to sign up between the 2 while 
>>> keeping things secure.
>>>
>>> There could be many reasons why you want to split OFBiz application on 
>>> servers. In their case it

Re: OFBIZ-10307: Navigate from a domain to another with automated signed in authentication

2018-08-20 Thread Shi Jinghai
Hi Jacques,

The LDAP plugin can be split to 2 parts, LDAP and CAS client. The LDAP part can 
be removed, because Andrian Crum implemented it in framework/security, he 
insisted it's earlier than mine, I agree now. The CAS client can be merged into 
passport plugin. Personally I think the CAS protocol is the origin of OAuth2 
and many others, and it's stricter than OAuth2 as its service token can be 
used/validated only once, to prevent naughty children in Yale University reuse 
the service tokens, well typically access token in OAuth2 has a much longer 
life time (from hours to month).

The CAS plugin I mentioned is a cas-server, to make OFBiz as a central OAuth2 
provider. It's not related to OFBIZ-10307, it's a part of WebPOS2 contribution 
I promised in last year. Adding method attribute in request map (OFBIZ-10438) 
is the 1st step, CAS plugin is the 2nd step, OpenAPI (swagger) plugin is the 
3rd step, then the WebPOS2 (Angular) plugin, and perhaps a Wechat/Facebook 
(React) mini app further. Not in a hurry, we can achieve it step by step :)

Briefly, this belongs to mobile support line. I'll try to open a blockchain 
support line when community has common interests in blockchain area.

Kind Regards,

Shi Jinghai


-邮件原件-
发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com] 
发送时间: 2018年8月20日 15:59
收件人: dev@ofbiz.apache.org
主题: Re: OFBIZ-10307: Navigate from a domain to another with automated signed in 
authentication

Hi Jinghai,

I'm not sure why you want to create a CAS plugin. At least it's unrelated with 
OFBIZ-1307

Also are you aware of 
https://demo-trunk.ofbiz.apache.org/cmssite/cms/APACHE_OFBIZ_HTML#CASLDAP ?

Does this still work? Do we need a new plugin?

Thanks

Jacques


Le 19/08/2018 à 22:00, Shi Jinghai a écrit :
> Thanks Jacques!
>
> If so, I'll release a CAS plugin to make OFBiz offer OAuth2 alliance next 
> week. I have cas 4.2.x version running in production environment, I'll 
> upgrade it to cas 5.2.x and then release it.
>
>
>
> -邮件原件-
> 发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com]
> 发送时间: 2018年8月19日 18:34
> 收件人: dev@ofbiz.apache.org
> 主题: Re: OFBIZ-10307: Navigate from a domain to another with automated signed 
> in authentication
>
> Hi Jinghai,
>
> Actually I did not pick auth0 (not to be confused with 
> https://en.wikipedia.org/wiki/OAuth) nor https://oauth.net/2/ because those 
> need a central
> Identify server (as is the SAML protocol).
>
> I simply send a JWT token: https://en.wikipedia.org/wiki/JSON_Web_Token and 
> https://jwt.io/ to
>
> Please refer to OFBIZ-10307 "Navigate from a domain to another with automated 
> signed in authentication"
>
> Thanks for your interest.
>
> Jacques
>
>
> Le 17/08/2018 à 09:02, Shi Jinghai a écrit :
>> Hi Jacques,
>>
>> OK, I think the redis topic is jumped to next step.
>>
>> I have read the patches carelly, as a fan of Apereo CAS[1], I wonder why 
>> choose auth0[2] rather than CAS. And is the implement OAuth2 alliance?
>>
>> [1] https://github.com/apereo/cas
>> [2] https://auth0.com/
>>
>> Kind Regards,
>>
>> Shi Jinghai
>>
>>
>> -邮件原件-
>> 发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com]
>> 发送时间: 2018年8月16日 2:08
>> 收件人: dev@ofbiz.apache.org
>> 主题: Re: OFBIZ-10307: Navigate from a domain to another with automated signed 
>> in authentication
>>
>> Hi Jinghai,
>>
>> The problem with the token master secret key is to guarantee its secrecy at 
>> max.
>>
>> We already discussed different solutions at https://s.apache.org/7yyR and 
>> https://s.apache.org/IBDM
>>
>> How is Redis more secure than Postgres for storing values?
>>
>> Thanks
>>
>> Jacques
>>
>>
>> Le 15/08/2018 à 14:37, Shi Jinghai a écrit :
>>> Dear Jacques,
>>>
>>> On how to store the Tokens, as a token is a key, value is the UserLogin 
>>> entity and/or other info, a key-value db, Redis[1] is a good choice. Redis 
>>> is no.7 in db ranking in Aug 2018[2], becomes more and more popular. 
>>> Goldman Sachs invested Redis team in last year[3]. It's common view now in 
>>> China that Redis is better than any others including Gemfire of Pivotal, 
>>> the railway ticket system of China replaced its 3 Gemfire clusters with 3 
>>> Redis clusters last year and then there are much less complains on how 
>>> difficulties to buy spring festival tickets.
>>>
>>> Mr. Dai Haipeng contributed a Redis component in Jira[4].
>>>
>>> [1] https://redis.io/
>>> [2] https://db-engines.com/en/ranking
>>> [3] 
>>> https://redislabs.com/press/redis-labs-secures

Re: svn commit: r1838081 - in /ofbiz/ofbiz-framework/trunk/framework: base/src/main/java/org/apache/ofbiz/base/util/collections/ base/src/test/java/org/apache/ofbiz/base/collections/ webapp/config/ we

2018-08-19 Thread Shi Jinghai
Hi Deepak,

As Rishi suggested, could you please reopen OFBIZ-10438 or create a new jira 
for the bug you mentioned here?

I cannot reproduce it in my local and online trunk demo environments, I guess 
my test case is not the same as yours.

Thanks,

Shi Jinghai

-邮件原件-
发件人: Rishi Solanki [mailto:rishisolan...@gmail.com] 
发送时间: 2018年8月17日 21:24
收件人: dev@ofbiz.apache.org
抄送: comm...@ofbiz.apache.org
主题: Re: svn commit: r1838081 - in /ofbiz/ofbiz-framework/trunk/framework: 
base/src/main/java/org/apache/ofbiz/base/util/collections/ 
base/src/test/java/org/apache/ofbiz/base/collections/ webapp/config/ 
webapp/dtd/ webapp/src/main/java/org/apache/ofbiz/weba...

Deepak,

Thanks for reporting the issue, can you please create Jira ticket and add
details (images are not coming at mailing list) with logs if possible?



Rishi Solanki
Sr Manager, Enterprise Software Development
HotWax Systems Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxsystems.com
www.hotwax.co

On Fri, Aug 17, 2018 at 6:32 PM, deepak nigam 
wrote:

> I am using OFBiz trunk and on creating an order from backend and getting
> error screens while adding an item to cart and selecting shipping methods.
> Please find the attached images for your reference.
>
> On further investigation, I found that on reverting this commit things are
> working fine. Can we verify this commit once more?
>
> On Wed, Aug 15, 2018 at 5:15 PM  wrote:
>
>> Author: shijh
>> Date: Wed Aug 15 11:45:45 2018
>> New Revision: 1838081
>>
>> URL: http://svn.apache.org/viewvc?rev=1838081=rev
>> Log:
>> Implemented: Add method attribute to request-map to controll a uri can be
>> called GET or POST only
>> OFBIZ-10438
>>
>> Thanks: Mathieu Lirzin for the contribution.
>>
>> Added:
>> ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/
>> org/apache/ofbiz/base/util/collections/MultivaluedMapContext.java
>>  (with props)
>> ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/
>> org/apache/ofbiz/base/util/collections/MultivaluedMapContextAdapter.java
>>  (with props)
>> ofbiz/ofbiz-framework/trunk/framework/base/src/test/java/
>> org/apache/ofbiz/base/collections/
>> ofbiz/ofbiz-framework/trunk/framework/base/src/test/java/
>> org/apache/ofbiz/base/collections/MultivaluedMapContextAdapterTests.java
>>  (with props)
>> ofbiz/ofbiz-framework/trunk/framework/base/src/test/java/
>> org/apache/ofbiz/base/collections/MultivaluedMapContextTests.java
>>  (with props)
>> ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/
>> java/org/apache/ofbiz/webapp/control/MethodNotAllowedException.java
>>  (with props)
>> ofbiz/ofbiz-framework/trunk/framework/webapp/src/test/
>> java/org/apache/ofbiz/webapp/control/RequestHandlerTests.java   (with
>> props)
>> Modified:
>> ofbiz/ofbiz-framework/trunk/framework/webapp/config/
>> WebappUiLabels.xml
>> ofbiz/ofbiz-framework/trunk/framework/webapp/dtd/site-conf.xsd
>> ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/
>> java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java
>> ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/
>> java/org/apache/ofbiz/webapp/control/ControlServlet.java
>> ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/
>> java/org/apache/ofbiz/webapp/control/RequestHandler.java
>>
>> Added: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/
>> org/apache/ofbiz/base/util/collections/MultivaluedMapContext.java
>> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/
>> framework/base/src/main/java/org/apache/ofbiz/base/util/collections/
>> MultivaluedMapContext.java?rev=1838081=auto
>> 
>> ==
>> --- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/
>> org/apache/ofbiz/base/util/collections/MultivaluedMapContext.java (added)
>> +++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/
>> org/apache/ofbiz/base/util/collections/MultivaluedMapContext.java Wed
>> Aug 15 11:45:45 2018
>> @@ -0,0 +1,87 @@
>> +/**
>> *
>> + * Licensed to the Apache Software Foundation (ASF) under one
>> + * or more contributor license agreements.  See the NOTICE file
>> + * distributed with this work for additional information
>> + * regarding copyright ownership.  The ASF licenses this file
>> + * to you under the Apache License, Version 2.0 (the
>> + * "License"); you may not use this file except in compliance
>> + * with the License.  You may obtain a c

Re: OFBIZ-10307: Navigate from a domain to another with automated signed in authentication

2018-08-19 Thread Shi Jinghai
Thanks Jacques!

If so, I'll release a CAS plugin to make OFBiz offer OAuth2 alliance next week. 
I have cas 4.2.x version running in production environment, I'll upgrade it to 
cas 5.2.x and then release it.



-邮件原件-
发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com] 
发送时间: 2018年8月19日 18:34
收件人: dev@ofbiz.apache.org
主题: Re: OFBIZ-10307: Navigate from a domain to another with automated signed in 
authentication

Hi Jinghai,

Actually I did not pick auth0 (not to be confused with 
https://en.wikipedia.org/wiki/OAuth) nor https://oauth.net/2/ because those 
need a central 
Identify server (as is the SAML protocol).

I simply send a JWT token: https://en.wikipedia.org/wiki/JSON_Web_Token and 
https://jwt.io/ to

Please refer to OFBIZ-10307 "Navigate from a domain to another with automated 
signed in authentication"

Thanks for your interest.

Jacques


Le 17/08/2018 à 09:02, Shi Jinghai a écrit :
> Hi Jacques,
>
> OK, I think the redis topic is jumped to next step.
>
> I have read the patches carelly, as a fan of Apereo CAS[1], I wonder why 
> choose auth0[2] rather than CAS. And is the implement OAuth2 alliance?
>
> [1] https://github.com/apereo/cas
> [2] https://auth0.com/
>
> Kind Regards,
>
> Shi Jinghai
>
>
> -邮件原件-
> 发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com]
> 发送时间: 2018年8月16日 2:08
> 收件人: dev@ofbiz.apache.org
> 主题: Re: OFBIZ-10307: Navigate from a domain to another with automated signed 
> in authentication
>
> Hi Jinghai,
>
> The problem with the token master secret key is to guarantee its secrecy at 
> max.
>
> We already discussed different solutions at https://s.apache.org/7yyR and 
> https://s.apache.org/IBDM
>
> How is Redis more secure than Postgres for storing values?
>
> Thanks
>
> Jacques
>
>
> Le 15/08/2018 à 14:37, Shi Jinghai a écrit :
>> Dear Jacques,
>>
>> On how to store the Tokens, as a token is a key, value is the UserLogin 
>> entity and/or other info, a key-value db, Redis[1] is a good choice. Redis 
>> is no.7 in db ranking in Aug 2018[2], becomes more and more popular. Goldman 
>> Sachs invested Redis team in last year[3]. It's common view now in China 
>> that Redis is better than any others including Gemfire of Pivotal, the 
>> railway ticket system of China replaced its 3 Gemfire clusters with 3 Redis 
>> clusters last year and then there are much less complains on how 
>> difficulties to buy spring festival tickets.
>>
>> Mr. Dai Haipeng contributed a Redis component in Jira[4].
>>
>> [1] https://redis.io/
>> [2] https://db-engines.com/en/ranking
>> [3] 
>> https://redislabs.com/press/redis-labs-secures-44-million-funding-led-goldman-sachs-private-capital-investing-strengthen-database-leadership/
>> [4] https://issues.apache.org/jira/browse/OFBIZ-9829
>>
>> BTW, I'll try to review the patches.
>>
>> Kind Regards,
>>
>> Shi Jinghai
>>
>> -邮件原件-
>> 发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com]
>> 发送时间: 2018年8月15日 15:09
>> 收件人: dev@ofbiz.apache.org
>> 主题: OFBIZ-10307: Navigate from a domain to another with automated signed in 
>> authentication
>>
>> Hi,
>>
>> Some time ago I created https://issues.apache.org/jira/browse/OFBIZ-10307.
>>
>> I asked for reviews but only Taher answered and he asked to know the goal of 
>> this new feature.
>>
>> It was actually developed for a client who needed to get from one OFBiz 
>> instance on a server (on a domain) to another OFBiz instance on another
>> server (on another domain) without having to sign up between the 2 while 
>> keeping things secure.
>>
>> There could be many reasons why you want to split OFBiz application on 
>> servers. In their case it was for performance issues.
>>
>> The technology used is as secure as possible. Like OAuth 2.0 it uses a token 
>> but it does not need a middle authorization server (think to  two-factor
>> authentication) because it's only for OFBiz instances of the same version.
>>
>> To commit this work we need 1st to agree an commit the work done by Deepak 
>> at OFBIZ-9833 "Token Based Authentication" that I use in my last patch.
>>
>> For me there is only one question outstanding: how to store the Token 
>> secret. But this should not prevent us to commit Deepak's work.
>>
>> It's now a long time (9 months) since I started this work. And my last patch 
>> is ready for a month.
>>
>> I crossed several issues which are now all resolved. So please review and 
>> answer to this thread.
>>
>> Without negative comments well argumented I'll commit both OFBIZ-9833 and 
>> OFBIZ-10307 in a week. You can always test and review later, we use RTC.
>>
>> Also a veto on a commit is always possible... Of course, as ever, a good 
>> consensus is preferred.
>>
>> Let me know if you need more information about the goal. For the technical 
>> details I think I already provided them the in OFBIZ-10307.
>>
>> Jacques
>>



Re: [Proposal] Enhance the controller logic to accommodate HTTP methods and prepare for REST

2018-08-19 Thread Shi Jinghai
Thanks Taher!

I noticed this bug report, and I have tested it, I cannot reproduce it in my 
local and online trunk demo environments.

As Rishi Solanki suggested, if it's a bug, please reopen the OFBIZ-10438 or 
create a new jira. I'm waiting a further feedback from Deepak Nigam or anyone 
else.

Kind Regards,

Shi Jinghai


-邮件原件-
发件人: Taher Alkhateeb [mailto:slidingfilame...@gmail.com] 
发送时间: 2018年8月20日 2:33
收件人: OFBIZ Development Mailing List
主题: Re: [Proposal] Enhance the controller logic to accommodate HTTP methods and 
prepare for REST

Well, I guess Shi rushed another commit without a proper review. And
now we have a bug reported in [1]. The strange thing is that Shi
suggested he's no longer interested in this work!

[1] 
https://lists.apache.org/thread.html/9f669ab211ca47282a5d2b0640d9ec08a683c6883aae31b836746124@%3Cdev.ofbiz.apache.org%3E
On Fri, Aug 10, 2018 at 10:51 AM Shi Jinghai  wrote:
>
> Thanks Taher for the great proposal!
>
> +1.
>
> I tested Swagger OpenAPI editor[1], both 2.0 and 3.0.n regulations support 
> multiple methods for one uri/path, here is my test code (yaml format):
>
> openapi: "3.0.1"
> info:
>   title: OFBiz OpenAPI Test
>   description: OFBiz OpenAPI Test
>   version: 1.0.0
>
> tags:
> - name: "pet"
>   description: "Everything about your Pets"
>   externalDocs:
> description: "Find out more"
> url: "http://swagger.io;
>
> paths:
>   /webtools/control/pet:
> get:
>   tags:
>   - "pet"
>   summary: "Add a new pet to the store"
>   description: ""
>   operationId: "addPet"
>   parameters:
>   - in: "query"
> name: "body"
> description: "Pet object that needs to be added to the store"
> required: true
> schema:
>   $ref: "#/components/schemas/Pet"
>   responses:
> 405:
>   description: "Invalid input"
> post:
>   tags:
>   - "pet"
>   summary: "Update an existing pet"
>   description: ""
>   operationId: "updatePet"
>   parameters:
>   - in: "query"
> name: "body"
> description: "Pet object that needs to be added to the store"
> required: true
> schema:
>   $ref: "#/components/schemas/Pet"
>   responses:
> 400:
>   description: "Invalid ID supplied"
> 404:
>   description: "Pet not found"
> 405:
>   description: "Validation exception"
>
> components:
>   schemas:
> Category:
>   type: "object"
>   properties:
> id:
>   type: "integer"
>   format: "int64"
> name:
>   type: "string"
>   xml:
> name: "Category"
> Tag:
>   type: "object"
>   properties:
> id:
>   type: "integer"
>   format: "int64"
> name:
>   type: "string"
>   xml:
> name: "Tag"
> Pet:
>   type: "object"
>   required:
>   - "name"
>   - "photoUrls"
>   properties:
> id:
>   type: "integer"
>   format: "int64"
> category:
>   $ref: "#/components/schemas/Category"
> name:
>   type: "string"
>   example: "doggie"
> photoUrls:
>   type: "array"
>   xml:
> name: "photoUrl"
> wrapped: true
>   items:
> type: "string"
> tags:
>   type: "array"
>   xml:
> name: "tag"
> wrapped: true
>   items:
> $ref: "#/components/schemas/Tag"
> status:
>   type: "string"
>   description: "pet status in the store"
>   enum:
>   - "available"
>   - "pending"
>   - "sold"
>   xml:
> name: "Pet"
> externalDocs:
>   description: "Find out more about Swagger"
>   url: "http://swagger.io;
>
> Kind Regards,
>
> Shi Jinghai
>
> [1] https://editor.swagger.io/
>
> -邮件原件-
> 发件人: Taher Alkhateeb [mailto:slidingfilame...@gmail.com]
> 发送时间: 2018年8月9

Re: OFBIZ-10307: Navigate from a domain to another with automated signed in authentication

2018-08-17 Thread Shi Jinghai
Hi Jacques,

OK, I think the redis topic is jumped to next step.

I have read the patches carelly, as a fan of Apereo CAS[1], I wonder why choose 
auth0[2] rather than CAS. And is the implement OAuth2 alliance?

[1] https://github.com/apereo/cas
[2] https://auth0.com/

Kind Regards,

Shi Jinghai


-邮件原件-
发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com] 
发送时间: 2018年8月16日 2:08
收件人: dev@ofbiz.apache.org
主题: Re: OFBIZ-10307: Navigate from a domain to another with automated signed in 
authentication

Hi Jinghai,

The problem with the token master secret key is to guarantee its secrecy at max.

We already discussed different solutions at https://s.apache.org/7yyR and 
https://s.apache.org/IBDM

How is Redis more secure than Postgres for storing values?

Thanks

Jacques


Le 15/08/2018 à 14:37, Shi Jinghai a écrit :
> Dear Jacques,
>
> On how to store the Tokens, as a token is a key, value is the UserLogin 
> entity and/or other info, a key-value db, Redis[1] is a good choice. Redis is 
> no.7 in db ranking in Aug 2018[2], becomes more and more popular. Goldman 
> Sachs invested Redis team in last year[3]. It's common view now in China that 
> Redis is better than any others including Gemfire of Pivotal, the railway 
> ticket system of China replaced its 3 Gemfire clusters with 3 Redis clusters 
> last year and then there are much less complains on how difficulties to buy 
> spring festival tickets.
>
> Mr. Dai Haipeng contributed a Redis component in Jira[4].
>
> [1] https://redis.io/
> [2] https://db-engines.com/en/ranking
> [3] 
> https://redislabs.com/press/redis-labs-secures-44-million-funding-led-goldman-sachs-private-capital-investing-strengthen-database-leadership/
> [4] https://issues.apache.org/jira/browse/OFBIZ-9829
>
> BTW, I'll try to review the patches.
>
> Kind Regards,
>
> Shi Jinghai
>
> -邮件原件-
> 发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com]
> 发送时间: 2018年8月15日 15:09
> 收件人: dev@ofbiz.apache.org
> 主题: OFBIZ-10307: Navigate from a domain to another with automated signed in 
> authentication
>
> Hi,
>
> Some time ago I created https://issues.apache.org/jira/browse/OFBIZ-10307.
>
> I asked for reviews but only Taher answered and he asked to know the goal of 
> this new feature.
>
> It was actually developed for a client who needed to get from one OFBiz 
> instance on a server (on a domain) to another OFBiz instance on another
> server (on another domain) without having to sign up between the 2 while 
> keeping things secure.
>
> There could be many reasons why you want to split OFBiz application on 
> servers. In their case it was for performance issues.
>
> The technology used is as secure as possible. Like OAuth 2.0 it uses a token 
> but it does not need a middle authorization server (think to  two-factor
> authentication) because it's only for OFBiz instances of the same version.
>
> To commit this work we need 1st to agree an commit the work done by Deepak at 
> OFBIZ-9833 "Token Based Authentication" that I use in my last patch.
>
> For me there is only one question outstanding: how to store the Token secret. 
> But this should not prevent us to commit Deepak's work.
>
> It's now a long time (9 months) since I started this work. And my last patch 
> is ready for a month.
>
> I crossed several issues which are now all resolved. So please review and 
> answer to this thread.
>
> Without negative comments well argumented I'll commit both OFBIZ-9833 and 
> OFBIZ-10307 in a week. You can always test and review later, we use RTC.
>
> Also a veto on a commit is always possible... Of course, as ever, a good 
> consensus is preferred.
>
> Let me know if you need more information about the goal. For the technical 
> details I think I already provided them the in OFBIZ-10307.
>
> Jacques
>



Re: OFBIZ-10307: Navigate from a domain to another with automated signed in authentication

2018-08-15 Thread Shi Jinghai
Dear Jacques,

On how to store the Tokens, as a token is a key, value is the UserLogin entity 
and/or other info, a key-value db, Redis[1] is a good choice. Redis is no.7 in 
db ranking in Aug 2018[2], becomes more and more popular. Goldman Sachs 
invested Redis team in last year[3]. It's common view now in China that Redis 
is better than any others including Gemfire of Pivotal, the railway ticket 
system of China replaced its 3 Gemfire clusters with 3 Redis clusters last year 
and then there are much less complains on how difficulties to buy spring 
festival tickets.

Mr. Dai Haipeng contributed a Redis component in Jira[4].

[1] https://redis.io/
[2] https://db-engines.com/en/ranking
[3] 
https://redislabs.com/press/redis-labs-secures-44-million-funding-led-goldman-sachs-private-capital-investing-strengthen-database-leadership/
[4] https://issues.apache.org/jira/browse/OFBIZ-9829

BTW, I'll try to review the patches.

Kind Regards,

Shi Jinghai

-邮件原件-
发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com] 
发送时间: 2018年8月15日 15:09
收件人: dev@ofbiz.apache.org
主题: OFBIZ-10307: Navigate from a domain to another with automated signed in 
authentication

Hi,

Some time ago I created https://issues.apache.org/jira/browse/OFBIZ-10307.

I asked for reviews but only Taher answered and he asked to know the goal of 
this new feature.

It was actually developed for a client who needed to get from one OFBiz 
instance on a server (on a domain) to another OFBiz instance on another  
server (on another domain) without having to sign up between the 2 while 
keeping things secure.

There could be many reasons why you want to split OFBiz application on servers. 
In their case it was for performance issues.

The technology used is as secure as possible. Like OAuth 2.0 it uses a token 
but it does not need a middle authorization server (think to  two-factor 
authentication) because it's only for OFBiz instances of the same version.

To commit this work we need 1st to agree an commit the work done by Deepak at 
OFBIZ-9833 "Token Based Authentication" that I use in my last patch.

For me there is only one question outstanding: how to store the Token secret. 
But this should not prevent us to commit Deepak's work.

It's now a long time (9 months) since I started this work. And my last patch is 
ready for a month.

I crossed several issues which are now all resolved. So please review and 
answer to this thread.

Without negative comments well argumented I'll commit both OFBIZ-9833 and 
OFBIZ-10307 in a week. You can always test and review later, we use RTC.

Also a veto on a commit is always possible... Of course, as ever, a good 
consensus is preferred.

Let me know if you need more information about the goal. For the technical 
details I think I already provided them the in OFBIZ-10307.

Jacques



Re: New Impersonate Feature : OFBIZ-10515

2018-08-11 Thread Shi Jinghai
+1.

Now we can hold a cosplay party in OFBiz, right? :)


-邮件原件-
发件人: Gil Portenseigne [mailto:gil.portensei...@nereide.fr] 
发送时间: 2018年8月11日 4:00
收件人: dev OFBiz
主题: New Impersonate Feature : OFBIZ-10515

Hello !

I would like to introduce to you a new feature, i already talked about some
time ago (last year?). We needed it for one of our customer, that is
using it for some time and is very happy with it (like we are).

Indeed this impersonation feature comes to be very useful when we need
to validate some behaviour or to assist a user in production without
asking for its credential. It's became so easy to use that even in
preproduction/integration environment we use it daily to impersonate
specific configured userlogin without trying to remember the password...

It's kinda basic, a new permission is created and can be granted to an
authorized user, that will be offered a way to select a userlogin to
impersonate.

It's a common feature that can be found for example in Gitlab.

If you wanna try it out it's available here :
https://issues.apache.org/jira/browse/OFBIZ-10515

Feedback are welcomed :), although i'll be partly offline next week.

Looking forward reading you !

Gil


Re: [Proposal] Enhance the controller logic to accommodate HTTP methods and prepare for REST

2018-08-10 Thread Shi Jinghai
Thanks Taher for the great proposal!

+1.

I tested Swagger OpenAPI editor[1], both 2.0 and 3.0.n regulations support 
multiple methods for one uri/path, here is my test code (yaml format):

openapi: "3.0.1"
info:
  title: OFBiz OpenAPI Test
  description: OFBiz OpenAPI Test
  version: 1.0.0

tags:
- name: "pet"
  description: "Everything about your Pets"
  externalDocs:
description: "Find out more"
url: "http://swagger.io;

paths:
  /webtools/control/pet:
get:
  tags:
  - "pet"
  summary: "Add a new pet to the store"
  description: ""
  operationId: "addPet"
  parameters:
  - in: "query"
name: "body"
description: "Pet object that needs to be added to the store"
required: true
schema:
  $ref: "#/components/schemas/Pet"
  responses:
405:
  description: "Invalid input"
post:
  tags:
  - "pet"
  summary: "Update an existing pet"
  description: ""
  operationId: "updatePet"
  parameters:
  - in: "query"
name: "body"
description: "Pet object that needs to be added to the store"
required: true
schema:
  $ref: "#/components/schemas/Pet"
  responses:
400:
  description: "Invalid ID supplied"
404:
  description: "Pet not found"
405:
  description: "Validation exception"

components:
  schemas:
Category:
  type: "object"
  properties:
id:
  type: "integer"
  format: "int64"
name:
  type: "string"
  xml:
name: "Category"
Tag:
  type: "object"
  properties:
id:
  type: "integer"
  format: "int64"
name:
  type: "string"
  xml:
name: "Tag"
Pet:
  type: "object"
  required:
  - "name"
  - "photoUrls"
  properties:
id:
  type: "integer"
  format: "int64"
category:
  $ref: "#/components/schemas/Category"
name:
  type: "string"
  example: "doggie"
photoUrls:
  type: "array"
  xml:
name: "photoUrl"
wrapped: true
  items:
type: "string"
tags:
  type: "array"
  xml:
name: "tag"
wrapped: true
  items:
$ref: "#/components/schemas/Tag"
status:
  type: "string"
  description: "pet status in the store"
  enum:
  - "available"
  - "pending"
  - "sold"
  xml:
name: "Pet"
externalDocs:
  description: "Find out more about Swagger"
  url: "http://swagger.io;

Kind Regards,

Shi Jinghai

[1] https://editor.swagger.io/

-邮件原件-
发件人: Taher Alkhateeb [mailto:slidingfilame...@gmail.com] 
发送时间: 2018年8月9日 23:31
收件人: OFBIZ Development Mailing List
主题: [Proposal] Enhance the controller logic to accommodate HTTP methods and 
prepare for REST

Hello Everyone,

We want to make this formal with proper community consensus and I will
try to keep this short.

In [1] Mathieu Lirzin is providing some (in my opinion) good work on
converting the Control Servlet logic to be able to handle the
different HTTP methods (GET, POST, etc ...) The purpose of the work in
this JIRA is simple. You should be able to call a request with a
different HTTP methods by using a format like . You can find a more detailed discussion in [2]. This
is the first step of a multi-step process to be able to integrate REST
API with OFBiz.

So, this is a proposal to apply the following:
1- Enhance the controller to be able to accommodate one-or-more HTTP
methods (method="GET,POST")
2- Enhance the controller to further be able to get "patterns" that
can be mapped to REST APIs. So a request like
https://host/control/request/customer/orders/1/orderName can be
processed as a resource

Please correct me if I was wrong on anything written here Mathieu, and
please everyone provide your feedback if you approve of moving forward
with this initiative.

[1] https://issues.apache.org/jira/browse/OFBIZ-10438
[2] https://s.apache.org/ec2r


Re: Inventory Cycle Count feature gap

2018-07-28 Thread Shi Jinghai
Hi Yashwant,

Besides the scenario you described, I'm working on a retail scenario, selling 
goods in refrigerators/containers, when a door open/close, a count action is 
triggered and fulfilled by RFID, the variance will be generated to an auto 
payed order if the door is opened/closed by a customer.

Regards,

Shi Jinghai


-邮件原件-
发件人: Yashwant Dhakad [mailto:yashwant.dha...@hotwaxsystems.com] 
发送时间: 2018年7月28日 19:37
收件人: dev@ofbiz.apache.org
抄送: Yashwant Dhakad
主题: Inventory Cycle Count feature gap

Hello All,
Currently, we don't have any user interface to do cycle count for the
warehouse, Where user can create or manage cycle count for different
locations within any facility. Authorized users to approve or reject the
count and record variance. Also, the recorded variance against
counted/scanned locations can be made available in the form of the report
on a daily basis. Based on this I am proposing this feature where we can
record and manage the cycle count through different sessions in following
steps:

   1. Create Cycle Count session: User can create a new cycle count session
   by scanning any location from the facility and system would list all the
   inventory items or product ids. The user can physically count or scan the
   inventory/product and update the physical count. Apart from this, user can
   also be allowed to manually add any not listed inventory item or product in
   the same session. Once record count is completed user can submit the
   cycle count session for review. As soon as the session is created the added
   locations can be locked from honoring any inward or outward inventory
   movement or transactions through them.
   2. Find Counting session: On this screen, User can view all the existing
   sessions and further filter by session id, facility, location and status.
   3. Review Cycle Count session:  On this screen, any authorized user can
   review the cycle count for open sessions and accept or reject the recorded
   count, once done system would create the
   necessary variance to corresponding inventory item or product and update
   the ATP/QOH accordingly.
   4. Variance Report screen: On this screen, the user can view the actual
   variance based on facility, location, product/inventory and date.
   5. Later on if required we can also schedule the submitted location for
   next cycle count by setting next counting date. This would allow to user
   see all the pending location on any given date where cycle count is due.
   And can start new sessions for the same.

Please share your thoughts and we make the necessary changes in the
workflow based on that feedback.

Thanks & Regards
--
Yashwant Dhakad


Re: Add ‘method’ attribute to ‘request-map’ elements

2018-07-03 Thread Shi Jinghai
Thank you Mathieu!

Yeah, I forgot the site-conf.xsd, now I reverted it in rev. 1835043.

-邮件原件-
发件人: Mathieu Lirzin [mailto:mathieu.lir...@nereide.fr] 
发送时间: 2018年7月4日 0:06
收件人: dev@ofbiz.apache.org
主题: Add ‘method’ attribute to ‘request-map’ elements

Hello,

Following revert of rev 1834917, I want to “properly” propose adding a ‘method’ 
attribute to ‘request-map’ elements.

I am currently working on adding REST based Web APIs to OFBiz [1].  In order to 
do that, it is important for the HTTP controller to handle various HTTP methods 
differently, meaning allowing a different request handler to be called 
depending on the method of the HTTP request.
Syntactically I am proposing the following:

   
  
  
  
  
   

   
  
  
  
  
   

Here ‘method’ is an optional attribute which defaults to "all" and/or "".  
Currently the patch supports both but I would be in favour of handling only one 
for the sake of simplicity.  The semantic of that default is that it mimics the 
current behavior, meaning it handles every methods.

Attached you will find a serie of 3 patches (meant to be applied in
order) implementing the described change:

- The first one handles the parsing of the XML (the change in the xsd
  file has not been reverted).

- The second is a simple refactoring to agglomerate the read of the XML
  file in one place.  This is done to ease the implementation and tests
  in the third patch.

- The third patch implements the segregation of ‘request-map’ elements
  based on the actual request method.  In order to associate a request
  to an event handler we now need to dispatch both on the URI and on the
  method.  To achieve that, I have decided to keep using the URI as a
  key but associate it to a List of ‘request-map’ (one for each method)
  instead of a single one.  In term of implementation a ‘MultivaluedMap’
  has been used.  The list of candidates for a particular URI is then
  filtered to keep only the best matching one.  The ‘request-map’ Map
  concrete type was a MapContext which is a stack of Maps (to handle
  includes), The ‘MultivaluedMapContext’ implementation is an adaptation
  of MapContext to MultivaluedMaps.  Since
  ‘ControllerConfig::getRequestMapMap’ is used at multiple places I have
  kept it temporarily and replaced its code with an adapter to the new
  ‘ControllerConfig::getRequestMapMultiMap’ method.



Re: [Discussion]: Add method attribute to request-map (Was: svn commit: r1834389 - in /ofbiz/ofbiz-framework/trunk/framework...)

2018-07-03 Thread Shi Jinghai
Yes, your feeling is quite right.

I prefer commit-then-review, you prefer review-then-commit. That's our core 
difference.

-邮件原件-
发件人: Taher Alkhateeb [mailto:slidingfilame...@gmail.com] 
发送时间: 2018年7月3日 18:00
收件人: dev@ofbiz.apache.org
主题: Re: [Discussion]: Add method attribute to request-map (Was: svn commit: 
r1834389 - in /ofbiz/ofbiz-framework/trunk/framework...)

That is not a constructive thing to say in my opinion. Sounds to me like:
hey I don't like reverting, but I know this code is good and now that I
reverted I don't care. This is not how a community works.

On Tue, Jul 3, 2018, 10:51 AM Shi Jinghai  wrote:

> Mathieu decides, I have got his valuable code I needed :)
>
>
> -邮件原件-
> 发件人: Taher Alkhateeb [mailto:slidingfilame...@gmail.com]
> 发送时间: 2018年7月3日 15:09
> 收件人: OFBIZ Development Mailing List
> 主题: Re: [Discussion]: Add method attribute to request-map (Was: svn
> commit: r1834389 - in /ofbiz/ofbiz-framework/trunk/framework...)
>
> Thank you Shi. If you or Mathieu would like to proceed with this work
> I recommend starting a new thread laying out the what, why, and how of
> what you want to do so we can have a proper discussion about it,
> otherwise I recommend closing the JIRA.
>
> If you or Mathieu would like to start a discussion I'd recommend a new
> thread
>
> On Tue, Jul 3, 2018 at 9:22 AM, Shi Jinghai  wrote:
> > Reverted in rev 1834917.
> >
> > -邮件原件-
> > 发件人: Jacopo Cappellato [mailto:jacopo.cappell...@hotwaxsystems.com]
> > 发送时间: 2018年6月28日 23:59
> > 收件人: dev@ofbiz.apache.org
> > 主题: Re: [Discussion]: Add method attribute to request-map (Was: svn
> commit: r1834389 - in /ofbiz/ofbiz-framework/trunk/framework...)
> >
> > +1 to Taher's recommendations.
> >
> > Jacopo
> >
> > On Thu, Jun 28, 2018 at 9:15 AM, Taher Alkhateeb <
> slidingfilame...@gmail.com
> >> wrote:
> >
> >> A few comments:
> >>
> >> 1- I would suggest to try and avoid in the future committing any
> >> design changes to the framework without discussing it properly in the
> >> mailing list first
> >> 2- I think it would be better to revert this work. I noticed in the
> >> JIRA for example that Mathieu Lirzin asked for some time to review his
> >> work when you just committed his work without checking what he wanted
> >> to do, and he later provided refactoring patches.
> >> 3- I would recommend providing a summary of what you want to commit.
> >> The commit was too long and I don't want to read line-by-line
> >> everything in the code to understand what was achieved. Let's first
> >> discuss in here what is being done, agree on the general direction,
> >> and THEN apply a commit.
> >>
> >> Those are my recommendations, and I don't know about the rest of the
> >> folks opinion here so I invite everyone else to have their input.
> >>
> >> On Thu, Jun 28, 2018 at 6:46 AM, Shi Jinghai 
> wrote:
> >> > Hi all,
> >> >
> >> > Thanks Jacques, Taher and Nicolas mentioned our community rule, "a
> >> proper discussion".
> >> >
> >> > I created an issue "Add method attribute to request-map to controll a
> >> uri can be called GET or POST only" a week ago:
> >> > https://issues.apache.org/jira/browse/OFBIZ-10438
> >> >
> >> > Thanks Mathieu, he submitted his patches very quickly while I was
> >> preparing mine. I tested them and submitted to trunk. Please be aware,
> the
> >> latest versions are r1834465 and r1834570, and the implement requires
> JDK
> >> 1.8.
> >> >
> >> > Is the implement acceptable for trunk? Further improvement to do?
> Would
> >> we backport it to releases?
> >> >
> >> > If it's not acceptable, I'll revert the implement.
> >> >
> >> > Kind Regards,
> >> >
> >> > Shi Jinghai
> >> >
> >> >
> >> > -邮件原件-
> >> > 发件人: Paul Foxworthy [mailto:p...@cohsoft.com.au]
> >> > 发送时间: 2018年6月26日 19:31
> >> > 收件人: dev@ofbiz.apache.org
> >> > 主题: Re: svn commit: r1834389 - in
> /ofbiz/ofbiz-framework/trunk/framework:
> >> base/src/main/java/org/apache/ofbiz/base/util/collections/
> webapp/config/
> >> webapp/dtd/ webapp/src/main/java/org/apache/ofbiz/webapp/control/
> >> webapp/src/test/java/org/apache/ofbiz/weba...
> >> >
> >> > On 26 June 2018 at 17:58, Taher Alkhateeb  >
> >> > wrote:
> >> >
> >> >> I could be mistaken, but this seems like a very major change that did
> >> >> not have a thorough and proper discussion at the mailing list? I
> would
> >> >> rather at least have an explanation of what was committed and to
> >> >> discuss the merits and cons of the implementation.
> >> >>
> >> >
> >> > Hi all,
> >> >
> >> > I haven't found the specific issue, but wasn't there a major change
> >> several
> >> > years ago from GET to POST to help guard against XSS attacks?
> >> >
> >> > Cheers
> >> >
> >> > Paul Foxworthy
> >> >
> >> > --
> >> > Coherent Software Australia Pty Ltd
> >> > PO Box 2773
> >> > Cheltenham Vic 3192
> >> > Australia
> >> >
> >> > Phone: +61 3 9585 6788
> >> > Web: http://www.coherentsoftware.com.au/
> >> > Email: i...@coherentsoftware.com.au
> >>
>


Re: [Discussion]: Add method attribute to request-map (Was: svn commit: r1834389 - in /ofbiz/ofbiz-framework/trunk/framework...)

2018-07-03 Thread Shi Jinghai
Mathieu decides, I have got his valuable code I needed :)


-邮件原件-
发件人: Taher Alkhateeb [mailto:slidingfilame...@gmail.com] 
发送时间: 2018年7月3日 15:09
收件人: OFBIZ Development Mailing List
主题: Re: [Discussion]: Add method attribute to request-map (Was: svn commit: 
r1834389 - in /ofbiz/ofbiz-framework/trunk/framework...)

Thank you Shi. If you or Mathieu would like to proceed with this work
I recommend starting a new thread laying out the what, why, and how of
what you want to do so we can have a proper discussion about it,
otherwise I recommend closing the JIRA.

If you or Mathieu would like to start a discussion I'd recommend a new thread

On Tue, Jul 3, 2018 at 9:22 AM, Shi Jinghai  wrote:
> Reverted in rev 1834917.
>
> -邮件原件-
> 发件人: Jacopo Cappellato [mailto:jacopo.cappell...@hotwaxsystems.com]
> 发送时间: 2018年6月28日 23:59
> 收件人: dev@ofbiz.apache.org
> 主题: Re: [Discussion]: Add method attribute to request-map (Was: svn commit: 
> r1834389 - in /ofbiz/ofbiz-framework/trunk/framework...)
>
> +1 to Taher's recommendations.
>
> Jacopo
>
> On Thu, Jun 28, 2018 at 9:15 AM, Taher Alkhateeb > wrote:
>
>> A few comments:
>>
>> 1- I would suggest to try and avoid in the future committing any
>> design changes to the framework without discussing it properly in the
>> mailing list first
>> 2- I think it would be better to revert this work. I noticed in the
>> JIRA for example that Mathieu Lirzin asked for some time to review his
>> work when you just committed his work without checking what he wanted
>> to do, and he later provided refactoring patches.
>> 3- I would recommend providing a summary of what you want to commit.
>> The commit was too long and I don't want to read line-by-line
>> everything in the code to understand what was achieved. Let's first
>> discuss in here what is being done, agree on the general direction,
>> and THEN apply a commit.
>>
>> Those are my recommendations, and I don't know about the rest of the
>> folks opinion here so I invite everyone else to have their input.
>>
>> On Thu, Jun 28, 2018 at 6:46 AM, Shi Jinghai  wrote:
>> > Hi all,
>> >
>> > Thanks Jacques, Taher and Nicolas mentioned our community rule, "a
>> proper discussion".
>> >
>> > I created an issue "Add method attribute to request-map to controll a
>> uri can be called GET or POST only" a week ago:
>> > https://issues.apache.org/jira/browse/OFBIZ-10438
>> >
>> > Thanks Mathieu, he submitted his patches very quickly while I was
>> preparing mine. I tested them and submitted to trunk. Please be aware, the
>> latest versions are r1834465 and r1834570, and the implement requires JDK
>> 1.8.
>> >
>> > Is the implement acceptable for trunk? Further improvement to do? Would
>> we backport it to releases?
>> >
>> > If it's not acceptable, I'll revert the implement.
>> >
>> > Kind Regards,
>> >
>> > Shi Jinghai
>> >
>> >
>> > -邮件原件-
>> > 发件人: Paul Foxworthy [mailto:p...@cohsoft.com.au]
>> > 发送时间: 2018年6月26日 19:31
>> > 收件人: dev@ofbiz.apache.org
>> > 主题: Re: svn commit: r1834389 - in /ofbiz/ofbiz-framework/trunk/framework:
>> base/src/main/java/org/apache/ofbiz/base/util/collections/ webapp/config/
>> webapp/dtd/ webapp/src/main/java/org/apache/ofbiz/webapp/control/
>> webapp/src/test/java/org/apache/ofbiz/weba...
>> >
>> > On 26 June 2018 at 17:58, Taher Alkhateeb 
>> > wrote:
>> >
>> >> I could be mistaken, but this seems like a very major change that did
>> >> not have a thorough and proper discussion at the mailing list? I would
>> >> rather at least have an explanation of what was committed and to
>> >> discuss the merits and cons of the implementation.
>> >>
>> >
>> > Hi all,
>> >
>> > I haven't found the specific issue, but wasn't there a major change
>> several
>> > years ago from GET to POST to help guard against XSS attacks?
>> >
>> > Cheers
>> >
>> > Paul Foxworthy
>> >
>> > --
>> > Coherent Software Australia Pty Ltd
>> > PO Box 2773
>> > Cheltenham Vic 3192
>> > Australia
>> >
>> > Phone: +61 3 9585 6788
>> > Web: http://www.coherentsoftware.com.au/
>> > Email: i...@coherentsoftware.com.au
>>


Re: [Discussion]: Add method attribute to request-map (Was: svn commit: r1834389 - in /ofbiz/ofbiz-framework/trunk/framework...)

2018-07-03 Thread Shi Jinghai
Reverted in rev 1834917.

-邮件原件-
发件人: Jacopo Cappellato [mailto:jacopo.cappell...@hotwaxsystems.com] 
发送时间: 2018年6月28日 23:59
收件人: dev@ofbiz.apache.org
主题: Re: [Discussion]: Add method attribute to request-map (Was: svn commit: 
r1834389 - in /ofbiz/ofbiz-framework/trunk/framework...)

+1 to Taher's recommendations.

Jacopo

On Thu, Jun 28, 2018 at 9:15 AM, Taher Alkhateeb  wrote:

> A few comments:
>
> 1- I would suggest to try and avoid in the future committing any
> design changes to the framework without discussing it properly in the
> mailing list first
> 2- I think it would be better to revert this work. I noticed in the
> JIRA for example that Mathieu Lirzin asked for some time to review his
> work when you just committed his work without checking what he wanted
> to do, and he later provided refactoring patches.
> 3- I would recommend providing a summary of what you want to commit.
> The commit was too long and I don't want to read line-by-line
> everything in the code to understand what was achieved. Let's first
> discuss in here what is being done, agree on the general direction,
> and THEN apply a commit.
>
> Those are my recommendations, and I don't know about the rest of the
> folks opinion here so I invite everyone else to have their input.
>
> On Thu, Jun 28, 2018 at 6:46 AM, Shi Jinghai  wrote:
> > Hi all,
> >
> > Thanks Jacques, Taher and Nicolas mentioned our community rule, "a
> proper discussion".
> >
> > I created an issue "Add method attribute to request-map to controll a
> uri can be called GET or POST only" a week ago:
> > https://issues.apache.org/jira/browse/OFBIZ-10438
> >
> > Thanks Mathieu, he submitted his patches very quickly while I was
> preparing mine. I tested them and submitted to trunk. Please be aware, the
> latest versions are r1834465 and r1834570, and the implement requires JDK
> 1.8.
> >
> > Is the implement acceptable for trunk? Further improvement to do? Would
> we backport it to releases?
> >
> > If it's not acceptable, I'll revert the implement.
> >
> > Kind Regards,
> >
> > Shi Jinghai
> >
> >
> > -邮件原件-
> > 发件人: Paul Foxworthy [mailto:p...@cohsoft.com.au]
> > 发送时间: 2018年6月26日 19:31
> > 收件人: dev@ofbiz.apache.org
> > 主题: Re: svn commit: r1834389 - in /ofbiz/ofbiz-framework/trunk/framework:
> base/src/main/java/org/apache/ofbiz/base/util/collections/ webapp/config/
> webapp/dtd/ webapp/src/main/java/org/apache/ofbiz/webapp/control/
> webapp/src/test/java/org/apache/ofbiz/weba...
> >
> > On 26 June 2018 at 17:58, Taher Alkhateeb 
> > wrote:
> >
> >> I could be mistaken, but this seems like a very major change that did
> >> not have a thorough and proper discussion at the mailing list? I would
> >> rather at least have an explanation of what was committed and to
> >> discuss the merits and cons of the implementation.
> >>
> >
> > Hi all,
> >
> > I haven't found the specific issue, but wasn't there a major change
> several
> > years ago from GET to POST to help guard against XSS attacks?
> >
> > Cheers
> >
> > Paul Foxworthy
> >
> > --
> > Coherent Software Australia Pty Ltd
> > PO Box 2773
> > Cheltenham Vic 3192
> > Australia
> >
> > Phone: +61 3 9585 6788
> > Web: http://www.coherentsoftware.com.au/
> > Email: i...@coherentsoftware.com.au
>


[Discussion]: Add method attribute to request-map (Was: svn commit: r1834389 - in /ofbiz/ofbiz-framework/trunk/framework...)

2018-06-27 Thread Shi Jinghai
Hi all,

Thanks Jacques, Taher and Nicolas mentioned our community rule, "a proper 
discussion".

I created an issue "Add method attribute to request-map to controll a uri can 
be called GET or POST only" a week ago:
https://issues.apache.org/jira/browse/OFBIZ-10438

Thanks Mathieu, he submitted his patches very quickly while I was preparing 
mine. I tested them and submitted to trunk. Please be aware, the latest 
versions are r1834465 and r1834570, and the implement requires JDK 1.8.

Is the implement acceptable for trunk? Further improvement to do? Would we 
backport it to releases?

If it's not acceptable, I'll revert the implement.

Kind Regards,

Shi Jinghai


-邮件原件-
发件人: Paul Foxworthy [mailto:p...@cohsoft.com.au] 
发送时间: 2018年6月26日 19:31
收件人: dev@ofbiz.apache.org
主题: Re: svn commit: r1834389 - in /ofbiz/ofbiz-framework/trunk/framework: 
base/src/main/java/org/apache/ofbiz/base/util/collections/ webapp/config/ 
webapp/dtd/ webapp/src/main/java/org/apache/ofbiz/webapp/control/ 
webapp/src/test/java/org/apache/ofbiz/weba...

On 26 June 2018 at 17:58, Taher Alkhateeb 
wrote:

> I could be mistaken, but this seems like a very major change that did
> not have a thorough and proper discussion at the mailing list? I would
> rather at least have an explanation of what was committed and to
> discuss the merits and cons of the implementation.
>

Hi all,

I haven't found the specific issue, but wasn't there a major change several
years ago from GET to POST to help guard against XSS attacks?

Cheers

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Welcome to Swapnil M. Mane as new committer!

2018-06-27 Thread Shi Jinghai
Congratulations Swapnil!

-邮件原件-
发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com] 
发送时间: 2018年6月27日 4:01
收件人: dev@ofbiz.apache.org
主题: Welcome to Swapnil M. Mane as new committer!

The OFBiz PMC has invited Swapnil to become a new committer and we arepleased  
to announce that he has accepted.

Swapnil has a high level of commitment for Apache OFBiz and consistently works 
with the community.

He is one of the most advanced contributors (including committers) in the 
functional domain.
  
Please join me in welcoming and congratulating Swapnil.

Jacques



Re: Welcome to Suraj Khurana as new committer!

2018-06-27 Thread Shi Jinghai
Congratulations Suraj!

-邮件原件-
发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com] 
发送时间: 2018年6月27日 4:00
收件人: dev@ofbiz.apache.org
主题: Welcome to Suraj Khurana as new committer!

The OFBiz PMC has invited Suraj to become a new committer and we arepleased  to 
announce that he has accepted.

Suraj has proved to be committed for a long time now and is doing a very good 
work as a contributor.

He helped in a lot of Jiras, answered properly on MLs and proposed a few quite 
interesting subjects.

Please join me in welcoming and congratulating Suraj.

Jacques



Re: Welcome to Aditya Sharma as new committer!

2018-06-27 Thread Shi Jinghai
Congratulations Adity!

-邮件原件-
发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com] 
发送时间: 2018年6月27日 4:00
收件人: dev@ofbiz.apache.org
主题: Welcome to Aditya Sharma as new committer!

The OFBiz PMC has invited Aditya to become a new committer and we arepleased  
to announce that he has accepted.

Aditya has proved to be committed and doing a very good work as a contributor.

He notably coordinated the work around the refactoring of the data model 
documents, helped in a lot of Jiras and answered appropriately on MLs.

Please join me in welcoming and congratulating Aditya.

Jacques



Re: [Discussion] Introduction of Bootstrap and Vue.js

2018-05-20 Thread Shi Jinghai
+1.

Excellent.

-邮件原件-
发件人: Taher Alkhateeb [mailto:slidingfilame...@gmail.com] 
发送时间: 2018年5月20日 2:31
收件人: OFBIZ Development Mailing List
主题: Re: [Discussion] Introduction of Bootstrap and Vue.js

This was a thought provoking and interesting discussion and I learned
new stuff from it, so thank you all for your valuable input.

On further reflection and after thinking about your comments, I think
Vue.js would be influenced in its design if we have a REST API in
place, however, something like Bootstrap is not relevant because it is
just a pure CSS / Javascript library to offer a grid system and some
user interface widgets. It has no model to bind to nor does it require
any back-end traffic (SPA stuff).

So I recommend proceeding with Bootstrap, and we can delay something
like Vue.js while we proceed in implementing the Web Services API.
I'll start or find another thread for that discussion.

WDYT?

On Fri, May 18, 2018 at 10:43 AM, innate Genius
 wrote:
> Hi,
>
> +1 For Jacques, Scot & Rajesh’s View Point.
>
>> "I feel most of the modern UI frameworks  consume JSON and
>> if we have yet another adapter to the rich catalog of WebServices
>> ( in addition to XML/RPC and SOAP) it shall benefit   both UI developers
>> and
>> system integrators / framework users."
>
> This is been discussed in few other threads but this is a issue that is long 
> due. And would love to see the community to finally address this.
>
> @Taher: Webservice to consume JSON would be the most beneficial and desired 
> enhancement to the framework.
>
> Thx & Rgds,
>
> Pratiek
>
>> On 17-May-2018, at 9:27 PM, Rajesh Mallah  wrote:
>>
>> Hi List ,
>>
>> The default UI of OFBiz does look aged but I feel it does a great job
>> of being  productive. As discussed before also ERP being a serious
>> backroom software and mostly operated by staff to whom all the bells
>> and whistles of modern  frameworks may not make any difference.
>>
>> But since adoption of OFBiz to enterprises is dependent on decision makers/
>> influencer who may not even know the nuances of UI and its relation to
>> productivity it is important to look modern and shiny and which is the
>> reason of
>> this thread by Mr. Taher.
>>
>>
>> Hence IMHO its good and required for OFBiz.
>>
>> At the same time we need to increase the comfort level of system integrators
>> and people  who use ofbiz as  a framework.
>>
>> I feel most of the modern UI frameworks  consume JSON and
>> if we have yet another adapter to the rich catalog of WebServices
>> ( in addition to XML/RPC and SOAP) it shall benefit   both UI developers
>> and
>> system integrators / framework users.
>>
>> I also humbly feel while this modernization is done, the existing interface
>> should
>> not be done away with as people develop very strange and innovative comfort
>> zones with software UIs which are difficult to anticipate by developers.
>>
>> my 2cents.
>>
>>
>> regds
>> mallah.
>>
>>
>> On Wed, May 16, 2018 at 5:30 PM, Jacques Le Roux <
>> jacques.le.r...@les7arts.com> wrote:
>>
>>> Hi Scott, Taher,
>>>
>>> I think you are both right, and maybe because you are mostly working for 2
>>> different markets or have different types of clients.
>>>
>>> Anyway, what I mean is:
>>>
>>> 1. Form widgets are not of much use when you have to deploy a new UI for
>>> an ecommerce or alike project (frontend).
>>> 2. They are very useful when you are working on a backend project (ie ERP
>>> part) where people don't care much about bells and whistle (even if that's
>>>   less and less happening) but want a fast ROI ("time-to-market reasons"
>>> as said Taher)
>>>
>>> I don't know if Mathieu will get enough time to succeed on his project.
>>> But obviously if we had the possibility to generate RESTful web services
>>> from OFBiz services, with the export attribute like for SOAP and RMI, then
>>> Scott's idea would be fulfilled and that would help much, not only in the
>>> UI area of course.
>>>
>>> Now for widgets, the form part could maybe slowly replaced by using tools
>>> like Bootstrap and Vue.js. Or the new flavor in some years and that must be
>>> very seriously taken into account to not have to redo it again, in few
>>> years...
>>>
>>> Jacques
>>>
>>>
>>>
>>> Le 15/05/2018 à 12:18, Taher Alkhateeb a écrit :
>>>
 Ahhh, I understand clearly now. Thank you!

 So more or less, the heart of your message as I understand it is that
 we should decouple the rendering of the user interface from data
 fetching and manipulation. This makes perfect sense and is a good
 strategy.

 A bit contrary to your experience though, most of our work relies
 heavily on the widget system for time-to-market reasons. It has been
 immensely beneficial to get something out the door quickly. However,
 of course the system falls short when it comes to heavy customizations
 or the need to integrate with other systems.

 So I would suggest 

Re: [Discussion] Introduction of Bootstrap and Vue.js

2018-05-14 Thread Shi Jinghai
Hi Taher,

+1 to the suggestion.

Personally I think Bootstrap and Vue are quite easy. We started a new project 
(a procurement platform) from this April 9th, we happened to choose Bootstrap 
and Vue(Element) as frontend. My team had zero Vue knowledge, and decided to 
use it by their own, the reason they told me is that they tried to play it and 
found they love it. I suggested react and they didn't like it. We bought a 
bootstrap theme, now we have completed v0.1 development and in the middle of 
v0.2. It's going to production this month or next month. Here is our internal 
test environment, hope you like it (BTW it's restarted frequently):

https://111.160.216.2:7235/
Username: TC_10110 or TC_10120
Password: 123456

Another story (bluffing part): my son is in his 3rd year in a university, he 
has just completed a 3-month practical training in Online Media Group of 
Tencent (Tencent is a local company in China) in his spare time, Tencent uses 
react, so he learned react from zero. At the end of the training, he 
contributed more than 1000 lines code to the news feed section of WeChat(a 
popular app in China) which is used by over 700 million android users in China 
every day.

Kind Regards,

Shi Jinghai



-邮件原件-
发件人: Taher Alkhateeb [mailto:slidingfilame...@gmail.com] 
发送时间: 2018年5月13日 2:03
收件人: OFBIZ Development Mailing List
主题: [Discussion] Introduction of Bootstrap and Vue.js

Hello Everyone,

Recently, we at Pythys had some interactions with clients, and the
user interface proved to be a sour point. It is functioning well, but
looks too classic, too rigid, too 2000s really :) We had many
discussion and attempts in the past like [1] [2] [3] [4] [5] [6] [7]
[8] [9] [10] just to name a few all of which seemed not to follow
through.

So what is the problem? Why is this hard to get right? I'm not sure I
have the magic answer, but it seems to me like part of the problem is
simply .. TOO BIG

So I was thinking about a possible solution, and after some initial
research, I think maybe the solution (like everything else) needs to
be slow, incremental and evolutionary rather than revolutionary. So I
am suggesting the following ideas to try and move forward:

- We include the assets for Bootstrap in the common theme. Bootstrap
will give us the Grid system which allows for a responsive website
that works on all devices, it will also give us beautiful widgets to
work with.
- We include Vue.js assets in the common theme. Vue.js is an excellent
framework for creating Single Page Applications (SPAs) to give dynamic
behavior to our pages and create ajax-heavy pages
- We slowly migrate our old CSS to bootstrap constructs. We can begin
for example by replacing our menus, then tables, then headers, then
buttons etc ..
- We slowly introduce dynamic screens using controller logic in Vue.js
- We slowly update our macro library to migrate to the above mentioned
libraries and widgets
- We do all of this live in Trunk, without branching. This means that
for some period of time, there will be transitional code (a little bit
of bootstrap and a little bit of our current code)

We can start with an initial proof of concept skeleton, and if that
gets consensus, then we can move forward with a full implementation in
trunk. I think this issue is many years over due. Our interface looks
oold and really needs a face lift.

What do you think? Ideas? Suggestions?

[1] https://s.apache.org/rf94
[2] https://s.apache.org/g5zr
[3] https://s.apache.org/XpBO
[4] https://s.apache.org/YIL1
[5] https://s.apache.org/836D
[6] https://s.apache.org/DhyB
[7] https://s.apache.org/Lv9E
[8] https://s.apache.org/zKIo
[9] https://s.apache.org/D6jx
[10] https://issues.apache.org/jira/browse/OFBIZ-5840


Re: [SUMMARY] Tomcat 8.5 and, servlet4preview and how I came there

2018-03-27 Thread Shi Jinghai
Hi Jacques,

My intuitive, we should follow new Servlet features.

And off the topic, I saw websocket added to OFBiz and can be improved, besides 
this, we don't support Annotation of Servlet 3. I'll try to fill these gaps 
when I find some free time.

Kind Regards,

Shi Jinghai


-邮件原件-
发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com] 
发送时间: 2018年3月27日 15:19
收件人: dev@ofbiz.apache.org
主题: [SUMMARY] Tomcat 8.5 and, servlet4preview and how I came there

Hi All,

I think I owe the community an explanation of the current situation and how I 
came there. It will help everybody interested to better understand the 
situation. I'll try to make it as concise as possible (not my strong point).

For a custom project, and another custom feature which will perhaps be 
contributed, I wanted to allow a signed in user on an OFBiz instance to get 
securely signed in on another OFBiz instance on another domain.

My 1st try was a failure. I made an architectural mistake due to my initial 
test done locally and later using the trunk demo. Then I created another 
version based on the 1st one which I believe is sound and well architectured: 
OFBIZ-10307

Though some parts are still useful, I wanted to revert the 1st version. But 
then I stumbled upon an issue which took me a moment to identify.

 1. I wanted to revert a HttpServletRequestWrapper I put in the ContextFilter.
 2. But when I reverted it I got a weird error saying that the userLogin 
service could no longer handle an IN standard HttpServletRequest parameter  3. 
I did that and found that it was due to Tomcat 8.5 using a temporary and 
unachieved servlet4preview (for Servlet 4.0 preview) which hides the
standard HttpServletRequest.
 4. We have discussed that[1] and, thanks to Scott's idea, decided so far to 
use the type-validate child element of attribute.
 5. Eventually we want to update Tomcat 8.5 to to Tomcat 9 (where Servlet 4.0 
is totally, and I suppose well implemented) to get rid of other possible
issues due to servlet4preview.
 6. I think we don't want to revert to Tomcat 8, but that's a community decision

HTH

Jacques
[1] thread "Re: svn commit: r1827439..."



Re: support for schema , ofbiz database , ofbiz olap database specification in tenant_data_source

2018-03-12 Thread Shi Jinghai
Cannot agree more.

And distributed DB such as CockroachDB can be used to get PB level storage.


-邮件原件-
发件人: Rajesh Mallah [mailto:mallah.raj...@gmail.com] 
发送时间: 2018年3月13日 11:33
收件人: dev@ofbiz.apache.org
主题: Re: support for schema , ofbiz database , ofbiz olap database specification 
in tenant_data_source

Hi Paul ,

Thanks for attention and considering the proposal of having feature for 
database name specification for tenantCreation.

Yes I use XML-RPC thoroughly as i mostly use OFBiz as a framework for generic 
data models rather than the OOTB. In such a development model I feel joining 
tables and getting data from DB is much more efficient than implementing DB 
like activities in application code. (ie. utilising xml-rpc)

Sparingly i require to access the ofbiz entities directly and that is where 
having ofbiz entities in a schema of existing database comes handy.

Its true that scaling requirements of the two applications can be different and 
tying them into same DB may lead to redundant allocations.

But i still feel having flexibility shall be a boon as we never know how 
creative people get with their setups!. OFBiz is already a very flexible 
architecture for that matter.

I guess the default behavior of the command can be left like that and for those 
who need more flexibility there can be fine grained options for overriding the 
default values.


regds
mallah.

On Tue, Mar 13, 2018 at 7:59 AM, Paul Foxworthy  wrote:

> On 13 March 2018 at 13:12, Rajesh Mallah  wrote:
>
>
> > I was not suggesting to use schemas  in general for for 
> > accommodating tenants.
> > Each tenant can reside in its own dedicated DB.
> >
> > When we use OFBiz as a part of some application that has other 
> > relational data as well, then schema partitioning comes handy.
> >
> > Eg, The OFBiz data lies in its own schema say 'ofbiz'  and the other 
> > application data lies in another schema say 'general' or 'app' etc. 
> > it makes utilizing
> > ofbiz.*  and general.* tables easier. It allows close integration of 
> > applications with OFBiz.
> >
> > As far as other DBs are concerned that do not have same notion of 
> > schema, the feature can be done on an optional basis (ie controlled 
> > by the args)
> ,
> >  i guess the current form of entityengine.xml is already doing it 
> > i.e, handling diverse DBs and supporting (Pg) schema at the same time.
> >
> > Also the DBname specification is currently embedded in the jdbc_uri 
> > , if
> we
> > can have an option for specifying / overriding the 2 kinds of DBs 
> > (org.apache.ofbiz and org.apache.ofbiz.olap) while creating a tenant 
> > it shall allow to use existing DBs.
> >
> > This shall be very handy for migrations /  consolidation of DBs in 
> > enterprise environments.
> >
>
> Hi Rajesh,
>
> OK, thanks.
>
> I agree it would be useful to have the database name as a separate 
> logical thing rather than embedded in the URI.
>
> Integrating two applications and two schemas within one database might 
> be the best. But managing permissions gets tricky - each application 
> would have its own security management, and yet requires some access 
> to the other application's data, even if read-only. It would be 
> difficult to scale one application independently of the other using a 
> cluster or some other technique. Have you considered using XML-RPC services 
> instead?
>
> Cheers
>
> Paul Foxworthy
>
> --
> Coherent Software Australia Pty Ltd
> PO Box 2773
> Cheltenham Vic 3192
> Australia
>
> Phone: +61 3 9585 6788
> Web: http://www.coherentsoftware.com.au/
> Email: i...@coherentsoftware.com.au
>


Re: OFBiz in cluster, load balance, different availability zones

2018-03-06 Thread Shi Jinghai
Or Redis[1] with Redisson[2]?

1. https://github.com/antirez/redis
2. 
https://github.com/redisson/redisson/wiki/14.-Integration%20with%20frameworks#145-tomcat-redis-session-manager

-邮件原件-
发件人: biletnikov@ [mailto:gmail.com biletni...@gmail.com] 
发送时间: 2018年3月6日 20:53
收件人: dev@ofbiz.apache.org
主题: OFBiz in cluster, load balance, different availability zones

Hi all, I still support OFBiz 12.04 + some custom extensions for one customer. 

Now, we need to launch OFBiz in a cluster or it is better to say on different 
machines in different availability zones in AWS infrastructure. 

The main problem arises here is the http session replications among all 
machines.
At least, in OFBiz 12.04 we have a clustering solution for Tomcat container 
using SimpleTcpCluster.
It is the way when all instances must share sessions via broadcasting IP 
packets, although this way maybe good for clustering on the one server 
instances, but it will not work in cloud infrastructure and in different 
availability zones.  Because broadcasting IP packets are very low level 
communication which is not supported in the cloud services.

Another solutions, which Tomcat proposes for session replication are:

- use shared file system and common directory to store and read sessions 

- use shared database to replicate sessions

I am working on the support for these two solutions in Catalina container.

However, I would like to ask you, maybe we have another solution in OFBiz to 
work with ?

Thank you.



Re: [jira] [Updated] (COMDEV-269) GSOC 2018 OFBiz Extend AR/AP to support China accounting regulations

2018-02-27 Thread Shi Jinghai
Thank you Sharan for the feedback.

Interesting I saw there's a message in Japanese, by Google translation:
Sorry, I don't know English.

Honestly, I suspected that China accounting regulations may be from Japan for a 
long time. It's a potential purpose to know if there is any other country using 
the same regulations as China. And you smart guy asked a Japanese directly.

Anyway, happy to know this.

-邮件原件-
发件人: Sharan Foga [mailto:sharan.f...@gmail.com] 
发送时间: 2018年2月27日 23:22
收件人: dev@ofbiz.apache.org
主题: Fwd: Re: [jira] [Updated] (COMDEV-269) GSOC 2018 OFBiz Extend AR/AP to 
support China accounting regulations

And this one too!

Thanks
Sharan


 Forwarded Message 
Subject:Re: [jira] [Updated] (COMDEV-269) GSOC 2018 OFBiz Extend AR/AP 
to support China accounting regulations
Date:   Wed, 7 Feb 2018 23:40:13 -0800
From:   杉浦剛 <tuyosugi...@gmail.com>
Reply-To:   d...@community.apache.org
To: d...@community.apache.org



すいません。
英語が読めなくて困ってます。

2018/02/08 午後0:03 "Shi Jinghai (JIRA)" <j...@apache.org>:

>
>  [ https://issues.apache.org/jira/browse/COMDEV-269?page=
> com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Shi Jinghai updated COMDEV-269:
> ---
> Description:
> We can imagine business as a network, every company is a node.
>
> In current OFBiz AR/AP model, a payment incoming to the node is AR, a 
> payment outgoing from the node to other one is AP.
>
> In China accounting regulations, every company has suppliers and 
> customers. A payment flow between suppliers and the company is AP, no 
> matter it's an incoming or outgoing payment. A payment flow between 
> the company and customers is AR, no matter it's an incoming or 
> outgoing payment. The pros of China accounting regulations is it's 
> easy to understand a company's financial problems, purchase too much, 
> sales too little. The cons is it's not popular and natural.
>
> No surprise, the balance numbers are same as the results of AR - AP 
> are equal.
>
> Here are the task requirements:
>
> 1. Extend OFBiz to support China accounting regulations, OFBiz user 
> can set a company to use general and/or China AR/AP.
>
> 2. The implement should be a patch against OFBiz trunk.
>
>   was:
> We can imagine business as a network, every company is a node.
>
> In current OFBiz AR/AP model, a payment incoming to the node is AR, a 
> payment outgoing from the node to other one is AP.
>
> In China accounting regulations, every company has suppliers and 
> customers. A payment flow between suppliers and the company is AP, no 
> matter it's an incoming or outgoing payment. A payment flow between 
> the company and customers is AR, no matter it's an incoming or 
> outgoing payment. The pros are that purchase and sales have different 
> staff to deal with, different business rules to run such as contracts, 
> payment terms and etc. The cons is it's not popular and natural.
>
> No surprise, the balance numbers are same as the results of AR - AP 
> are equal.
>
> Here are the task requirements:
>
> 1. Extend OFBiz to support China accounting regulations, OFBiz user 
> can set a company to use general and/or China AR/AP.
>
> 2. The implement should be a patch against OFBiz trunk.
>
>
> > GSOC 2018 OFBiz Extend AR/AP to support China accounting regulations
> > 
> >
> > Key: COMDEV-269
> >     URL: https://issues.apache.org/jira/browse/COMDEV-269
> > Project: Community Development
> >  Issue Type: New Feature
> >  Components: GSoC/Mentoring ideas
> >Reporter: Shi Jinghai
> >Priority: Major
> >  Labels: Java, OFBiz, gsoc2018
> >
> > We can imagine business as a network, every company is a node.
> > In current OFBiz AR/AP model, a payment incoming to the node is AR, 
> > a
> payment outgoing from the node to other one is AP.
> > In China accounting regulations, every company has suppliers and
> customers. A payment flow between suppliers and the company is AP, no 
> matter it's an incoming or outgoing payment. A payment flow between 
> the company and customers is AR, no matter it's an incoming or 
> outgoing payment. The pros of China accounting regulations is it's 
> easy to understand a company's financial problems, purchase too much, 
> sales too little. The cons is it's not popular and natural.
> > No surprise, the balance numbers are same as the results of AR - AP 
> > are
> equal.
> > Here are the task requirements:
> > 1. Extend OFBiz to support China accounting regulations, OFBiz 

Re: [jira] [Updated] (COMDEV-270) GSOC 2018 OFBiz Onpage help tool

2018-02-27 Thread Shi Jinghai
Thank you Sharan for the feedback.

-邮件原件-
发件人: Sharan Foga [mailto:sharan.f...@gmail.com] 
发送时间: 2018年2月27日 23:20
收件人: dev@ofbiz.apache.org
主题: Fwd: [jira] [Updated] (COMDEV-270) GSOC 2018 OFBiz Onpage help tool

Hi All

A reminder that the ASF has been selected as a GSoC mentor organisation for 
2018 and our project has this task sitting in the GSoC task list.

Thanks
Sharan



 Forwarded Message 
Subject:[jira] [Updated] (COMDEV-270) GSOC 2018 OFBiz Onpage help tool
Date:   Mon, 26 Feb 2018 10:11:00 + (UTC)
From:   Mark Thomas (JIRA) <j...@apache.org>
Reply-To:   d...@community.apache.org
To: d...@community.apache.org



  [ 
https://issues.apache.org/jira/browse/COMDEV-270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mark Thomas updated COMDEV-270:
---
 Component/s: GSoC/Mentoring ideas

> GSOC 2018 OFBiz Onpage help tool
> 
>
> Key: COMDEV-270
> URL: https://issues.apache.org/jira/browse/COMDEV-270
> Project: Community Development
>  Issue Type: New Feature
>  Components: GSoC/Mentoring ideas
>Reporter: Shi Jinghai
>Priority: Critical
>
> Sometimes we want to tell OFBiz user that we add a new important function on 
> a page he/she is viewing, or help user understand the steps on a page without 
> leaving that page.
> Obviously, JQuery-pagewalkthrough[1] is a good choice to be the front end of 
> onpage helps, and developers can create/edit the multi-language content of 
> helps in OFBiz content component.
> The target of this task is to implement this Onpage help tool and several 
> example pages for OFBiz trunk.
>  
> 1. [https://github.com/jwarby/jquery-pagewalkthrough]
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@community.apache.org
For additional commands, e-mail: dev-h...@community.apache.org



Re: [jira] [Created] (COMDEV-269) GSOC 2018 OFBiz Extend AR/AP to support China accounting regulations

2018-02-08 Thread Shi Jinghai
Thank you Michael! I agree with you, I should post it in OFBiz dev list and 
discuss first. I'll do this for other tasks.

-邮件原件-
发件人: Michael Brohl [mailto:michael.br...@ecomify.de] 
发送时间: 2018年2月8日 15:49
收件人: dev@ofbiz.apache.org
主题: Re: [jira] [Created] (COMDEV-269) GSOC 2018 OFBiz Extend AR/AP to support 
China accounting regulations

Hi Shi,

I think it would be better to first discuss in the OFBiz developers list 
about the topics we want to address for GoC instead of directly filing 
them in the comdev Jira.

Regards,

Michael


Am 08.02.18 um 03:49 schrieb Shi Jinghai (JIRA):
> Shi Jinghai created COMDEV-269:
> --
>
>   Summary: GSOC 2018 OFBiz Extend AR/AP to support China 
> accounting regulations
>   Key: COMDEV-269
>   URL: https://issues.apache.org/jira/browse/COMDEV-269
>   Project: Community Development
>Issue Type: New Feature
>Components: GSoC/Mentoring ideas
>  Reporter: Shi Jinghai
>
>
> We can imagine business as a network, every company is a node.
>
> In current OFBiz AR/AP model, a payment incoming to the node is AR, a payment 
> outgoing from the node to other one is AP.
>
> In China accounting regulations, every company has suppliers and customers. A 
> payment flow between suppliers and the company is AP, no matter it's an 
> incoming or outgoing payment. A payment flow between the company and 
> customers is AR, no matter it's an incoming or outgoing payment. The pros are 
> that purchase and sales have different staff to deal with, different business 
> rules to run such as contracts, payment terms and etc. The cons is it's not 
> popular and natural.
>
> No surprise, the balance numbers are same as the results of AR - AP are equal.
>
> Here are the task requirements:
>
> 1. Extend OFBiz to support China accounting regulations, OFBiz user can set a 
> company to use general and/or China AR/AP.
>
> 2. The implement should be a patch against OFBiz trunk.
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v7.6.3#76005)
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@community.apache.org
> For additional commands, e-mail: dev-h...@community.apache.org
>




Re: [Proposal] Reducing the clean* operations in gradle

2018-01-30 Thread Shi Jinghai
Hi Taher,

Excellent work on gradle! I like your pluginLibsCompile very much.

Inspired by the pluginLibsCompile, is it possible to define a new clean plugin 
in build.gradle of a component to clean a log or index folder?

Kind Regards,

Shi Jinghai

-邮件原件-
发件人: Taher Alkhateeb [mailto:slidingfilame...@gmail.com] 
发送时间: 2018年1月31日 0:54
收件人: OFBIZ Development Mailing List
主题: Re: [Proposal] Reducing the clean* operations in gradle

Hi Jacques,

Sure okay, we can keep cleanLogs and cleanFooterFiles. Any other opinions 
folks? Does anyone care for the other clean tasks to be isolated?

On Tue, Jan 30, 2018 at 4:27 PM, Jacques Le Roux <jacques.le.r...@les7arts.com> 
wrote:
> Hi Taher,
>
> I'd like to keep at least cleanLogs apart.
>
> It's sometimes useful to clean logs w/o changing anything else.
>
> Maybe cleanFooterFiles could be considered also but no strong opinion
>
> Jacques
>
>
>
> Le 29/01/2018 à 13:27, Nicolas Malin a écrit :
>>
>> Hello Taher,
>>
>> I haven't a strong opinion so your proposal seems to be good for slim 
>> the code.
>>
>> A noob question, can we move deleted tasks to the tools folder like 
>> ant previously ?
>>
>> Nicolas
>>
>>
>> On 29/01/2018 11:31, Taher Alkhateeb wrote:
>>>
>>> Hello Everyone, I'm not sure why we have so many fine-grained clean 
>>> tasks, but to reduce clutter, I suggest to have only the following 
>>> clean operations in build.gradle:
>>>
>>> - cleanCatalina: To reset web server state to test stuff
>>> - cleanData: To reset database state to test stuff
>>> - cleanAll: To remove everything including above.
>>>
>>> So I suggest deleting all other clean* operations and incorporating 
>>> them into cleanAll. This would result in less clutter when issuing 
>>> "./gradlew tasks".
>>>
>>> Ideas?
>>>
>>
>>
>


Re: OFBiz and Google Summer of Code (GsoC) 2018 ?

2018-01-26 Thread Shi Jinghai
Hi Sharan,

Thanks for this topic.

After reading your email, I released a new OFBiz-NER plugin in Github:
https://github.com/YYWorks/OFBiz-NER/

The first version of this plugin is built by Menghan Sun in July, 2016, a 
summer practice, in one month. Now she's reading her doctorate in system 
security in CUHK.

Here is my big +1 to GsoC. I'm eager to be a mentor for one or two students in 
this summer.

I think we have a lot of research/prototype tasks for GsoC students:
1. AI: Sentiment analysis of communications in CRM (OpenNLP, CoreNLP and etc.).
2. AI: Product Recommendation (PredictionIO).
3. Accounting: Extend OFBiz AR/AP to support Chinese rule.
4. Accounting: Extend OFBiz to support distributed ledger.
5. UI: Replace tree with ztree.
6. Help Document: Use jquery-pagewalkthrough to show help messages to user.
7. Scheduler: Use Quartz as an alternative implement of OFBiz scheduler.
8. Security: New password cipher to prevent quantum computing crack.

And so on.:)

Kind Regards,

Shi Jinghai

-邮件原件-
发件人: Sharan Foga [mailto:sha...@apache.org] 
发送时间: 2018年1月25日 22:02
收件人: dev@ofbiz.apache.org
主题: OFBiz and Google Summer of Code (GsoC) 2018 ?

Hi All

The ASF is registering to be a participating organisation for GsoC 2018. We are 
in the middle of doing a lot of work. Would it be interesting for us to add 
some of these tasks to the GsoC list and mentor some students? It is a good way 
of encouraging new people to become involved with the project and maybe also 
promote OFBiz too.

If any of our tasks are selected, then we would need official mentors from our 
community to work with the student on a regular basis to provide feedback. 
There is also a regular reporting that the mentor needs to file about the 
student's progress. 

If the mentor misses filing a report for a student then it reflects badly on 
the ASF as a mentoring organisation. I mention this because it is important 
that anyone wanitng to be a mentor for a GsoC student realises that if they 
sign up to do it – then they need to do it!

Some initial suggestions for GsoC tasks from Taher were:

- convert minilang services to groovy
- documenting the components using the documentation framework we're 
implementing
- convert integration tests to unit tests where possible

If you have any other suggestions for potential tasks then please respond with 
the details.

None of this is any good – if we don't have any mentors, so we need people 
willing to be GsoC mentors.

So what's next?

- First I'd like to get feedback on whether people think it is a good idea for 
OFBiz to participate
- If, so then second I would like to see if we should use the suggestions for 
tasks above or have any more
- Finally, and most importantly I'd like to know who would be willing to be a 
mentor for a student selecting to take on one of our tasks

Please let me have your comments and feedback

Thanks
Sharan


Re: svn commit: r1813679 - in /ofbiz/ofbiz-framework/trunk: ./ framework/common/groovyScripts/ framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/

2018-01-18 Thread Shi Jinghai
Love you. :)

-邮件原件-
发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com] 
发送时间: 2018年1月18日 21:02
收件人: dev@ofbiz.apache.org
主题: Re: svn commit: r1813679 - in /ofbiz/ofbiz-framework/trunk: ./ 
framework/common/groovyScripts/ 
framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/

You are right Jinghai,

This got unnoticed because it's only used internally. But the right word is 
indeed "Authorization"

I'll change that. It will have no side effects because this is only used 
temporarily during the translation to the other server.

It would be misleading to keep it as is. Because in the general case it's only 
"Authorization" and not "Authorisation"

I used "Authorisation" because of my intuitive preference for British 
English[1] I must say due of my French background[2],  a bit pedantic... phew ;)

Thanks!

Jacques

[1] https://www.etymonline.com/word/authorisation

[2] https://fr.wiktionary.org/wiki/autoriser (so the US are right finally: 
https://en.wiktionary.org/wiki/auctorizare)

Le 18/01/2018 à 06:49, Shi Jinghai a écrit :
> Should it be "Authorization"? z, not s. If s is right for some specific 
> environments, we can add an additional step to check "Authorisation" if 
> getting "Authorization" header failed.
>
> -邮件原件-
> 发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com]
> 发送时间: 2018年1月16日 18:52
> 收件人: dev@ofbiz.apache.org
> 主题: Re: svn commit: r1813679 - in /ofbiz/ofbiz-framework/trunk: ./ 
> framework/common/groovyScripts/ 
> framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/
>
> Thanks Deepak,
>
> Ha indeed, I see your point now.
>
> Sorry for the confusion!
>
> Jacques
>
>
> Le 16/01/2018 à 11:30, Deepak Dixit a écrit :
>> Thanks Jacques for detail,
>> but I think name is not always Authorisation in code we are having 
>> lots of request.getHeader usage and its breaks their usage.
>> I'll confirm and reply here (just for reference.)
>>
>> Need to backport this to 17.12 as well.
>>
>> Thanks & Regards
>> --
>> Deepak Dixit
>> www.hotwaxsystems.com
>> www.hotwax.co
>>
>> On Tue, Jan 16, 2018 at 3:26 PM, Jacques Le Roux < 
>> jacques.le.r...@les7arts.com> wrote:
>>
>>> Le 16/01/2018 à 09:53, Deepak Dixit a écrit :
>>>
>>>> +return super.getHeader("Authorisation");
>>>>> I think this should be
>>>> return super.getHeader(name);
>>>>
>>> Thanks Deepak,
>>>
>>> Actually let me explain the context here (maybe not for you but at
>>> large) In the case of ExternalLoginKeysManager, it's always 
>>> "Authorisation". It's explained there 
>>> https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorizat
>>> i on https://en.wikipedia.org/wiki/Basic_access_authentication
>>> And it's the only usage of the wrapper so far.
>>>
>>> Note that in the case of JWT token used in OAuth 2 you normally need 
>>> to use a bearer token 
>>> https://www.google.fr/search?q=http+authorization+header+bearer=U
>>> T
>>> F-8 But in the case I committed it was not necessary (it's not OAuth 
>>> 2, just a JWT token) and I must say I got issue trying to encode 
>>> things with it
>>>
>>> Anyway you are right, why not using name there, it will not change 
>>> things, and the wrapper idea could be then reused/refactored when 
>>> adding other related features, will do :)
>>>
>>> Jacques
>>>
>>>



Re: svn commit: r1813679 - in /ofbiz/ofbiz-framework/trunk: ./ framework/common/groovyScripts/ framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/

2018-01-17 Thread Shi Jinghai
Should it be "Authorization"? z, not s. If s is right for some specific 
environments, we can add an additional step to check "Authorisation" if getting 
"Authorization" header failed.

-邮件原件-
发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com] 
发送时间: 2018年1月16日 18:52
收件人: dev@ofbiz.apache.org
主题: Re: svn commit: r1813679 - in /ofbiz/ofbiz-framework/trunk: ./ 
framework/common/groovyScripts/ 
framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/

Thanks Deepak,

Ha indeed, I see your point now.

Sorry for the confusion!

Jacques


Le 16/01/2018 à 11:30, Deepak Dixit a écrit :
> Thanks Jacques for detail,
> but I think name is not always Authorisation in code we are having 
> lots of request.getHeader usage and its breaks their usage.
> I'll confirm and reply here (just for reference.)
>
> Need to backport this to 17.12 as well.
>
> Thanks & Regards
> --
> Deepak Dixit
> www.hotwaxsystems.com
> www.hotwax.co
>
> On Tue, Jan 16, 2018 at 3:26 PM, Jacques Le Roux < 
> jacques.le.r...@les7arts.com> wrote:
>
>> Le 16/01/2018 à 09:53, Deepak Dixit a écrit :
>>
>>> +return super.getHeader("Authorisation");
 I think this should be
>>> return super.getHeader(name);
>>>
>> Thanks Deepak,
>>
>> Actually let me explain the context here (maybe not for you but at 
>> large) In the case of ExternalLoginKeysManager, it's always 
>> "Authorisation". It's explained there 
>> https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorizati
>> on https://en.wikipedia.org/wiki/Basic_access_authentication
>> And it's the only usage of the wrapper so far.
>>
>> Note that in the case of JWT token used in OAuth 2 you normally need 
>> to use a bearer token
>> https://www.google.fr/search?q=http+authorization+header+bearer=UT
>> F-8 But in the case I committed it was not necessary (it's not OAuth 
>> 2, just a JWT token) and I must say I got issue trying to encode 
>> things with it
>>
>> Anyway you are right, why not using name there, it will not change 
>> things, and the wrapper idea could be then reused/refactored when 
>> adding other related features, will do :)
>>
>> Jacques
>>
>>



Re: Order : Communication between customer and product store

2018-01-03 Thread Shi Jinghai
Yes, you are right.

If data is huge and roleType is many, a flow direction indicator may be very 
helpful for OLAP.


-邮件原件-
发件人: Julien NICOLAS [mailto:julien.nico...@nereide.fr] 
发送时间: 2018年1月3日 17:04
收件人: dev@ofbiz.apache.org; Shi Jinghai
主题: Re: Order : Communication between customer and product store

Hi Shi,

It's already the case you can find from/to fields :

     
     
     
     
     
     

Regards,

Julien.


On 03/01/2018 07:15, Shi Jinghai wrote:
> Hi Julien,
>
> In CommunicationEvent, it would be great if you can add a field to indicate 
> the initial direction of a communication, i.e. Vendor to Customer, or 
> Customer to Vendor.
>
> Kind Regards,
>
> Shi Jinghai
>
>
> -邮件原件-
> 发件人: Julien NICOLAS [mailto:julien.nico...@nereide.fr]
> 发送时间: 2018年1月2日 21:15
> 收件人: OFBiz Dev
> 主题: Order : Communication between customer and product store
>
> Hello,
>
> First of all I wish you all, all the best for 2018 :)
>
> We are working for a customer to add a communication management linked to 
> orders between the customer and the product store.
> It will use communication events and add a new communication screenlet at the 
> bottom of the order screen of the back office.
> We plan to commit modifications to the trunk.
>
> If anybody have some suggestions about this point, don't hesitate to share, 
> we will be pleased to fit to the community recommendations.
>
> Kind regards,
>
> Julien.



Re: Order : Communication between customer and product store

2018-01-02 Thread Shi Jinghai
Hi Julien,

In CommunicationEvent, it would be great if you can add a field to indicate the 
initial direction of a communication, i.e. Vendor to Customer, or Customer to 
Vendor.

Kind Regards,

Shi Jinghai


-邮件原件-
发件人: Julien NICOLAS [mailto:julien.nico...@nereide.fr] 
发送时间: 2018年1月2日 21:15
收件人: OFBiz Dev
主题: Order : Communication between customer and product store

Hello,

First of all I wish you all, all the best for 2018 :)

We are working for a customer to add a communication management linked to 
orders between the customer and the product store.
It will use communication events and add a new communication screenlet at the 
bottom of the order screen of the back office.
We plan to commit modifications to the trunk.

If anybody have some suggestions about this point, don't hesitate to share, we 
will be pleased to fit to the community recommendations.

Kind regards,

Julien.


Re: [OFBIZ] - Job schedules and Multi instance

2018-01-02 Thread Shi Jinghai
Hi Nguyen,

I think your requirement is same as mine, I posted a patch in 
https://issues.apache.org/jira/browse/OFBIZ-9233, please try if they work for 
you.

Kind Regards,

Shi Jinghai

-邮件原件-
发件人: Trà Đá Một Mình [mailto:nguyenthang0...@gmail.com] 
发送时间: 2018年1月2日 18:16
收件人: dev@ofbiz.apache.org
主题: [OFBIZ] - Job schedules and Multi instance

Hi all,

I met a problem. I have more than one instance running my application. When I 
schedules some services using runAsync, ofbiz auto create jobs. And when job is 
started, ofbiz pick one of my instances to process. But, in my case:
when I made an request, I dedicated this to instance A, but after that, when 
job start, it run on another instance B. I just want to it running on A.

Thanks!

--
*THANG NGUYEN (Mr)*

*OLBIUS DEVELOPER**Email:* nguyenthang0...@gmail.com| *Mobile:* (+84) 96
955 0905

*OLBIUS., JSC*
*Tel:* (+84) 9 88 99 
*Address: *25th Fl., No 91, Nguyen Chi Thanh St., Ha Noi City, VietNam
*Website:* http://olbius.com


Re: [Proposal] Add a Redis plugin to codebase (OFBIZ-9829)

2017-10-17 Thread Shi Jinghai
Michael,

You're right. I've removed the Redis plugis from plugins trunk.

Regards,

Shi Jinghai

-邮件原件-
发件人: Michael Brohl [mailto:michael.br...@ecomify.de] 
发送时间: 2017年10月16日 16:52
收件人: dev@ofbiz.apache.org
主题: Re: [Proposal] Add a Redis plugin to codebase (OFBIZ-9829)

Jinghai,

you are not answering our concrete questions and you seem to constantly 
ignore our requests to revert the commit until the community decides 
that we want to integrate this plugin.

To be clear, please do the follwoing:

1. revert the commit

2. make a proper proposal by answering the raised questions

3. adjust the code to match the raised points and provide a new patch in 
Jira (no commit!)

Thanks for your collaboration,

Michael


Am 15.10.17 um 08:07 schrieb Shi Jinghai:
> Thanks Michael and Taher's feedbacks! Very helpful.
>
> While working on an OmniMedia service project (CRM), a requirement to make 
> total time consume to calculate a seat assignment less than 100 milliseconds. 
> The input data used in the calculation includes getting customer info, 
> VIP/Redlist/Blacklist status, last seats to provide service to a customer, 
> last cases and etc.
>
> We came to use Redis to cache customer data and Drools to do the calculation. 
> The amount of customers is around 50 million, as OmniMeidia includes 
> telephone number, email address, social media IDs. The data in Redis may 
> explode to above 100 million.
>
> Currently, test result is ok, and we are happy to share the Redis solution 
> with OFBiz community.
>
> Besides the CRM usage, we use Redis to cluster OFBiz as well, Reddison 
> supports Tomcat 8 session management OOTB:
> https://github.com/redisson/redisson/tree/master/redisson-tomcat
>
> Kind Regards,
>
> Shi Jinghai
>
>
> -邮件原件-
> 发件人: Taher Alkhateeb [mailto:slidingfilame...@gmail.com]
> 发送时间: 2017年10月13日 23:55
> 收件人: OFBIZ Development Mailing List
> 主题: Re: [Proposal] Add a Redis plugin to codebase (OFBIZ-9829)
>
> Hello Shi, thank you for your work on this initiative.
>
> When reviewing the component, I found that it pretty much focused on 
> implementing three services and it doesn't seem to provide any deep 
> integration or added value. The services are just to set, get and delete 
> redis info which is a simple JSON object for initiating settings. I can't see 
> the added value of this setup so far.
>
> I don't understand the purpose of this component, and I do not understand why 
> it was committed without getting consensus from the community. This is 
> actually also true of the pricat component which was committed without 
> consulting with the community.
>
> My recommendation is to remove both components from the repository, and 
> discuss their merits with the community first, and if enough people show 
> interest and approval then we include the code.
>
> On Thu, Oct 12, 2017 at 1:11 PM, Michael Brohl <michael.br...@ecomify.de> 
> wrote:
>> Hi Jinghai,
>>
>> first of all thanks for your contribution. I appreciate your work,
>> even if I do not agree with the process (see Jira issue).
>>
>> So please understand my critical questions as an attempt to assure a
>> good process and quality for the project and not a refusal of your
>> work or this plugin in general.
>>
>> For a proper proposal, please provide more informations on the
>> solution and why it is useful for the project. You can see the
>> community as a customer and you have to convince us that the solution
>> is worth being introduced to OFBiz and being maintained further. In
>> the past, we had several half-baked additions to the codebase which were 
>> committed and not maintained anymore.
>>
>> I would like to avoid this and the best way (IMO) is to be more
>> restrictive when introducing new code to the project.
>>
>> For this plugin, at first glance, I'm missing the following
>> informations and quality aspects:
>>
>> - the big picture: the motivation and use cases for this plugin and
>> OFBiz integration
>> - a documentation (brief descriptions of Redis et al or just links to
>> these projects are not a documentation)
>> - why you have chosen Redis and the Redisson client and not some other
>> - a sample integration into OFBiz (to prove it is working and to show
>> how it is used)
>> - tests
>> - source code documentation
>>
>> This is just a shot from my first impressions, others may  follow.
>>
>> Looking forward to a good collaboration on this.
>>
>> Thanks,
>>
>> Michael
>>
>>
>> Am 12.10.17 um 03:38 schrieb Shi Jinghai:
>>
>>> Hi community,
>>>
>>> There's a patch on Redis plugin in
>>> https://issues.apache.org/jira/browse/OFBIZ-9829.
>>>
>>> Redis is key-value in-memory database widely used in Ecommerce and CRM.
>>>
>>> Michael asked me to discuss whether it's necessary to include it in
>>> OFBiz codebase. If not, I'll revert it.
>>>
>>> Thanks for your feedback,
>>>
>>> Shi Jinghai
>>>
>>>
>>




Re: [Proposal] Add a Redis plugin to codebase (OFBIZ-9829)

2017-10-15 Thread Shi Jinghai
Thanks Michael and Taher's feedbacks! Very helpful.

While working on an OmniMedia service project (CRM), a requirement to make 
total time consume to calculate a seat assignment less than 100 milliseconds. 
The input data used in the calculation includes getting customer info, 
VIP/Redlist/Blacklist status, last seats to provide service to a customer, last 
cases and etc.

We came to use Redis to cache customer data and Drools to do the calculation. 
The amount of customers is around 50 million, as OmniMeidia includes telephone 
number, email address, social media IDs. The data in Redis may explode to above 
100 million.

Currently, test result is ok, and we are happy to share the Redis solution with 
OFBiz community.

Besides the CRM usage, we use Redis to cluster OFBiz as well, Reddison supports 
Tomcat 8 session management OOTB:
https://github.com/redisson/redisson/tree/master/redisson-tomcat

Kind Regards,

Shi Jinghai


-邮件原件-
发件人: Taher Alkhateeb [mailto:slidingfilame...@gmail.com] 
发送时间: 2017年10月13日 23:55
收件人: OFBIZ Development Mailing List
主题: Re: [Proposal] Add a Redis plugin to codebase (OFBIZ-9829)

Hello Shi, thank you for your work on this initiative.

When reviewing the component, I found that it pretty much focused on 
implementing three services and it doesn't seem to provide any deep integration 
or added value. The services are just to set, get and delete redis info which 
is a simple JSON object for initiating settings. I can't see the added value of 
this setup so far.

I don't understand the purpose of this component, and I do not understand why 
it was committed without getting consensus from the community. This is actually 
also true of the pricat component which was committed without consulting with 
the community.

My recommendation is to remove both components from the repository, and discuss 
their merits with the community first, and if enough people show interest and 
approval then we include the code.

On Thu, Oct 12, 2017 at 1:11 PM, Michael Brohl <michael.br...@ecomify.de> wrote:
> Hi Jinghai,
>
> first of all thanks for your contribution. I appreciate your work, 
> even if I do not agree with the process (see Jira issue).
>
> So please understand my critical questions as an attempt to assure a 
> good process and quality for the project and not a refusal of your 
> work or this plugin in general.
>
> For a proper proposal, please provide more informations on the 
> solution and why it is useful for the project. You can see the 
> community as a customer and you have to convince us that the solution 
> is worth being introduced to OFBiz and being maintained further. In 
> the past, we had several half-baked additions to the codebase which were 
> committed and not maintained anymore.
>
> I would like to avoid this and the best way (IMO) is to be more 
> restrictive when introducing new code to the project.
>
> For this plugin, at first glance, I'm missing the following 
> informations and quality aspects:
>
> - the big picture: the motivation and use cases for this plugin and 
> OFBiz integration
> - a documentation (brief descriptions of Redis et al or just links to 
> these projects are not a documentation)
> - why you have chosen Redis and the Redisson client and not some other
> - a sample integration into OFBiz (to prove it is working and to show 
> how it is used)
> - tests
> - source code documentation
>
> This is just a shot from my first impressions, others may  follow.
>
> Looking forward to a good collaboration on this.
>
> Thanks,
>
> Michael
>
>
> Am 12.10.17 um 03:38 schrieb Shi Jinghai:
>
>> Hi community,
>>
>> There's a patch on Redis plugin in
>> https://issues.apache.org/jira/browse/OFBIZ-9829.
>>
>> Redis is key-value in-memory database widely used in Ecommerce and CRM.
>>
>> Michael asked me to discuss whether it's necessary to include it in 
>> OFBiz codebase. If not, I'll revert it.
>>
>> Thanks for your feedback,
>>
>> Shi Jinghai
>>
>>
>
>


[Proposal] Add a Redis plugin to codebase (OFBIZ-9829)

2017-10-11 Thread Shi Jinghai
Hi community,

There's a patch on Redis plugin in 
https://issues.apache.org/jira/browse/OFBIZ-9829.

Redis is key-value in-memory database widely used in Ecommerce and CRM.

Michael asked me to discuss whether it's necessary to include it in OFBiz 
codebase. If not, I'll revert it.

Thanks for your feedback,

Shi Jinghai



Re: [DISCUSSION] migrate mini lang to Java and/or groovy

2017-05-19 Thread Shi Jinghai
Groovy +1.

I think mini lang make ofbiz special in apache projects, it give a space to 
business consultants to do more. I'm not sure whether groovy is as simple as 
mini lang for the consultants, it's 'change and play', this is similar to mini 
lang.

My 2 cents,

Shi Jinghai

-邮件原件-
发件人: Michael Brohl [mailto:michael.br...@ecomify.de] 
发送时间: 2017年5月19日 18:39
收件人: dev@ofbiz.apache.org
主题: [DISCUSSION] migrate mini lang to Java and/or groovy

Hi All,

according to the discussion in [1] and the Jira issue [2] we decided to 
deprecate mini lang and migrate it to Java and/or Groovy code.

To help contributors finding the right approach for the migration, we 
should define which mini lang code should be migrated to Java code, 
groovy or some DSL (which has to be further developed).

I'd propose to generally migrate services, events and tests to Java code 
to begin with.


There was also a proposal by Paul Foxworthy [3] to have an automatic 
conversion between mini lang and groovy DSL. Maybe we can extend this to 
generate Java code also?

Any ideas and approach to do this?


Happy to hear your opinions,

best regards,

Michael Brohl
ecomify GmbH
www.ecomify.de


[1] 
https://lists.apache.org/thread.html/253b41060a295b8ab68bc78763cc129fc74b712cf776f8716022097f@%3Cdev.ofbiz.apache.org%3E

[2] https://issues.apache.org/jira/browse/OFBIZ-9350

[3] 
https://lists.apache.org/thread.html/6ce592d253c102e50f25f5f2095dab1e9b7c54e48260b9e6d1cda9e1@%3Cdev.ofbiz.apache.org%3E





Re: Lucene and Solr loggin

2017-05-19 Thread Shi Jinghai
Hi Jacques,

In ${ofbiz.home}/build.gradle, adding solr.log.dir and solr.log.level can 
remove this error message, i.e.:
def jvmArguments = ['-Xms128M', '-Xmx1024M',
'-Dsolr.log.dir=runtime/logs',
'-Dsolr.log.level=INFO']

I tried define jvmArguments in ${ofbiz.home}/plugins/solr/build.gradle, it 
doesn't work.

Kind Regards,

Shi Jinghai

-邮件原件-
发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com] 
发送时间: 2017年5月19日 17:55
收件人: dev@ofbiz.apache.org
主题: Lucene and Solr loggin

Hi,

I noticed this error in trunk demo error.log

2017-05-16 03:05:38,898 |0.0.0.0-startStop-1 |StartupLoggingUtils   |E| 
Missing Java Option solr.log.dir. Logging may be missing or incomplete.

It's thrown by 
https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/servlet/StartupLoggingUtils.java

I can't see nothing at https://localhost:8443/solr/#/~logging

Is that really an issue in our case?  It seems there is not much we can do 
about it.

Thanks

Jacques



Re: New ASF Members from OFBiz Community

2017-05-02 Thread Shi Jinghai
Congratulations to Scott and Nicolas!

-邮件原件-
发件人: Sharan Foga [mailto:sharan.f...@gmail.com] 
发送时间: 2017年5月1日 22:57
收件人: dev
主题: Re: New ASF Members from OFBiz Community

Congratulations Nicolas!

I'd also like to congratulate Scott too as I haven't seen an  announcement on 
this list for him.  It is great to see so many of our committers being invited 
to become  ASF members.

Thanks
Sharan



On 1 May 2017 12:22 pm, "Jacques Le Roux" 
wrote:

Hi All,

Nicolas Malin is our last new ASF member, congratulations Nicolas.

We have now 12 ASF members among our committers with new 7 ASF members this
year: Anil, Ashish, Bilgin, Michael, Nicolas, Scott and Taher!

I have updated the PMC page regarding ASF members, please check that all is 
alright.

Thanks

Jacques




Le 08/04/2017 à 11:13, Taher Alkhateeb a écrit :

> Thank you everyone for your kind and welcoming words.
>
> Having Michael, Ashish, Anil, Bilgin and myself being elected as ASF 
> members is not only an honor but a testament to the strength of our 
> community and the significance of OFBiz within the Apache eco-system.
>
> I highly encourage everyone to take a more active role in our 
> community. If you have an appetite for learning, enjoy coding, and 
> like to help others then you can make a big dent in this project and 
> people would really appreciate your work.
>
> Congratulations to all of you and thank you again.
>
> On Thu, Apr 6, 2017 at 11:22 AM, Julien NICOLAS 
>  >
> wrote:
>
> Very good news !
>>
>> Congrats Taher and Michael !
>>
>> Julien.
>>
>>
>>
>> On 03/04/2017 11:06, Sharan Foga wrote:
>>
>> Hi Everyone
>>>
>>> Please join me in congratulating Michael Brohl and Taher Alkhateeb 
>>> as being invited to become members of the Apache Software Foundation.
>>>
>>> Congratulations Michael and Taher!
>>>
>>> Thanks
>>> Sharan
>>>
>>>
>>>
>>>


Re: [Discussion] Allocating a maven repository for OFBiz plugins

2017-04-10 Thread Shi Jinghai
Hi Taher,

I think we should use the ASF existing repository. JCenter, central maven 
repository and others have proxy/cache to ASF repository.

Cheers,

Shi Jinghai

-邮件原件-
发件人: Taher Alkhateeb [mailto:slidingfilame...@gmail.com] 
发送时间: 2017年4月10日 23:43
收件人: OFBIZ Development Mailing List
主题: [Discussion] Allocating a maven repository for OFBiz plugins

Hello Everyone,

The last piece of the puzzle to complete the plugin system for OFBiz is to have 
a maven repository to which we can publish the released plugins.

I'm not sure what is the best approach to proceed and so opening this thread 
for ideas. I think due to legal concerns we cannot publish on JCenter.

So the question now is how, and where to create this repository? Should we 
utilize some ASF existing repository? Create a new one? If create a new one, 
which engine to use?

Appreciate your input and thoughts.

Cheers,

Taher Alkhateeb


Re: New ASF Members from OFBiz Community

2017-04-05 Thread Shi Jinghai
Amazing! Congratulations!

-邮件原件-
发件人: Sharan Foga [mailto:sha...@apache.org] 
发送时间: 2017年4月5日 3:02
收件人: dev@ofbiz.apache.org
主题: Re: New ASF Members from OFBiz Community

Hi Everyone

Wow – we have even more good news! Another three people from our community 
have been invited to become members of the Apache Software Foundation. They are 
Anil Patel, Ashish Vijaywargiya and Bilgin Ibryam

Many congratulations Anil, Ashish and Bilgin !!!

Thanks
Sharan

On 2017-04-03 11:06 (+0200), "Sharan Foga" wrote: 
> Hi Everyone
> 
> Please join me in congratulating Michael Brohl and Taher Alkhateeb as being 
> invited to become members of the Apache Software Foundation.
> 
> Congratulations Michael and Taher!
> 
> Thanks
> Sharan
> 
> 


Re: [SKYPE CALL] Mentoring Support for New and Existing Committers

2017-03-20 Thread Shi Jinghai
Sorry, I'm afraid I'm wrong, I cannot add a NER component to OFBiz, as the 
license of NER is GPL v2+, which is not compatible with our Apache License V2, 
see:
http://www.apache.org/licenses/GPL-compatibility.html

-邮件原件-
发件人: Shi Jinghai [mailto:huaru...@hotmail.com] 
发送时间: 2017年3月21日 9:14
收件人: dev@ofbiz.apache.org
主题: Re: [SKYPE CALL] Mentoring Support for New and Existing Committers

+1 if we can join the google summer of code. I asked my niece to build a NER 
component last summer before her graduate school, she did it in one month. So I 
think we can make some efforts by the summer-code way in OFBiz clouding and AI 
areas.

BTW, I'll submit the NER component in OFBIZ-7954 later.

Shi Jinghai

-邮件原件-
发件人: Sharan Foga [mailto:sha...@apache.org] 
发送时间: 2017年3月21日 1:19
收件人: dev@ofbiz.apache.org
主题: Re: [SKYPE CALL] Mentoring Support for New and Existing Committers

Hi Everyone

I'm posting a reminder to see if anyone else would like to participate in this 
call.

At this stage we have 6 attendees of which 4 are mentors. Based on the 
locations (Europe, Kuwait and India) we have a good range of potential meeting 
times. 

I'd like to really encourage people to participate to find out how having a 
mentor could really help (Why not think of it as our own OFBiz Summer of Code 
:-) and a chance to do something that will benefit the project and also help 
you learn something new.

Perhaps you want to take on a particular task or area but are unsure where to 
start? Perhaps you would like to get started writing or converting some of our 
plug-ins? What about doing some simple cleanup and refactoring? Having someone 
to speak to can help you to get started on whatever it is you want to do.

Anyway I'll leave this open for a few more days and then will look at 
scheduling a call for next week.

Thanks
Sharan

On 2017-03-13 15:01 (+0100), "Sharan Foga"<sha...@apache.org> wrote: 
> Hi Everyone
> 
> I'm bringing up a topic that has been raised in the past regarding committer 
> mentoring. [1][2][3]. 
>  
> As  project we don't have any on-boarding process to help new committers or 
> support existing ones. Sometimes people assume that by the time you become a 
> committer then you should know how everything works! (and that isn't always 
> the case. )
> 
> In the past year with the re-factoring, the framework, plugins, gradle etc we 
> have a lot of changes happening and people may be a little overwhelmed about 
> how they can continue to contribute. Getting feedback and sharing knowledge 
> helps make people more confident in their way of working and contributions, 
> and the end result is better code which is a great thing for the project.
> 
> So I would  like invite all of our committers (and also any interested 
> contributors) to a Skype call to about mentoring and the support that you can 
> get from our more experienced project committers. The call will be 
> approximately 1 hour and will include an opportunity to ask questions. 
> 
> If you'd like to attend then please add your details, location and timezone 
> to the table at the bottom of the following wiki page so that I can find a 
> suitable time for everyone.
> 
> https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Mentors
> 
> I really think that mentoring will help empower committers more, standardise 
> work and coding practices and generally improve our working relationships. 
> 
> As always, feedback welcome and please don't forget to add your name if you'd 
> like to attend.
> 
> Thanks
> Sharan
> 
> [1]  https://s.apache.org/FzI0
> [2]  https://s.apache.org/60t1
> [3]  https://s.apache.org/GWtv
> 


Re: [SKYPE CALL] Mentoring Support for New and Existing Committers

2017-03-20 Thread Shi Jinghai
+1 if we can join the google summer of code. I asked my niece to build a NER 
component last summer before her graduate school, she did it in one month. So I 
think we can make some efforts by the summer-code way in OFBiz clouding and AI 
areas.

BTW, I'll submit the NER component in OFBIZ-7954 later.

Shi Jinghai

-邮件原件-
发件人: Sharan Foga [mailto:sha...@apache.org] 
发送时间: 2017年3月21日 1:19
收件人: dev@ofbiz.apache.org
主题: Re: [SKYPE CALL] Mentoring Support for New and Existing Committers

Hi Everyone

I'm posting a reminder to see if anyone else would like to participate in this 
call.

At this stage we have 6 attendees of which 4 are mentors. Based on the 
locations (Europe, Kuwait and India) we have a good range of potential meeting 
times. 

I'd like to really encourage people to participate to find out how having a 
mentor could really help (Why not think of it as our own OFBiz Summer of Code 
:-) and a chance to do something that will benefit the project and also help 
you learn something new.

Perhaps you want to take on a particular task or area but are unsure where to 
start? Perhaps you would like to get started writing or converting some of our 
plug-ins? What about doing some simple cleanup and refactoring? Having someone 
to speak to can help you to get started on whatever it is you want to do.

Anyway I'll leave this open for a few more days and then will look at 
scheduling a call for next week.

Thanks
Sharan

On 2017-03-13 15:01 (+0100), "Sharan Foga"<sha...@apache.org> wrote: 
> Hi Everyone
> 
> I'm bringing up a topic that has been raised in the past regarding committer 
> mentoring. [1][2][3]. 
>  
> As  project we don't have any on-boarding process to help new committers or 
> support existing ones. Sometimes people assume that by the time you become a 
> committer then you should know how everything works! (and that isn't always 
> the case. )
> 
> In the past year with the re-factoring, the framework, plugins, gradle etc we 
> have a lot of changes happening and people may be a little overwhelmed about 
> how they can continue to contribute. Getting feedback and sharing knowledge 
> helps make people more confident in their way of working and contributions, 
> and the end result is better code which is a great thing for the project.
> 
> So I would  like invite all of our committers (and also any interested 
> contributors) to a Skype call to about mentoring and the support that you can 
> get from our more experienced project committers. The call will be 
> approximately 1 hour and will include an opportunity to ask questions. 
> 
> If you'd like to attend then please add your details, location and timezone 
> to the table at the bottom of the following wiki page so that I can find a 
> suitable time for everyone.
> 
> https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Mentors
> 
> I really think that mentoring will help empower committers more, standardise 
> work and coding practices and generally improve our working relationships. 
> 
> As always, feedback welcome and please don't forget to add your name if you'd 
> like to attend.
> 
> Thanks
> Sharan
> 
> [1]  https://s.apache.org/FzI0
> [2]  https://s.apache.org/60t1
> [3]  https://s.apache.org/GWtv
> 


Re: Plugins: skipped obstructing working copy (error message)

2017-03-15 Thread Shi Jinghai
From my view, gradle is a simplified maven, is it possible to use 
version/snapshot way to bring the plugins in?

-邮件原件-
发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com] 
发送时间: 2017年3月15日 14:13
收件人: dev@ofbiz.apache.org
主题: Re: Plugins: skipped obstructing working copy (error message)

What I fear (still not looked into it) is that Taher did it that way because he 
(rightly) wanted to have the same structure than before, ie the possibility to 
commit a change in a plugin from the root of the project.

So I fear that another solution will impose to have as much as working copies 
as plugins. Then you have to commit by plugin. It's not a big deal for one 
change but multiples in different plugins become a pain. I mentioned that 
earlier.

Jacques


Le 15/03/2017 à 06:15, Deepak Dixit a écrit :
> We need to enhance pullAllPluginsSource task, after running this you 
> will not able to commit or run any svn command on plugins, as it do 
> checkout of plugins/trunk and copy its folder into plugins.
>
>
> Thanks & Regards
> --
> Deepak Dixit
> www.hotwaxsystems.com
>
> On Wed, Mar 15, 2017 at 12:18 AM, Jacques Le Roux < 
> jacques.le.r...@les7arts.com> wrote:
>
>> That would be better indeed, I did not look a it yet.
>>
>> Jacques
>>
>>
>>
>> Le 14/03/2017 à 19:04, Deepak Dixit a écrit :
>>
>>> I think we can improve gradle task and instead of deleting plugins 
>>> it will its delete sub-folder.
>>> I am sure gradle should have ability to delete sub-folder. :)
>>>
>>> If we delete README.txt then it will not be available in git as git 
>>> does not support empty folder.
>>>
>>>
>>>
>>> Thanks & Regards
>>> --
>>> Deepak Dixit
>>> www.hotwaxsystems.com
>>>
>>> On Tue, Mar 14, 2017 at 6:46 PM, Jacques Le Roux < 
>>> jacques.le.r...@les7arts.com> wrote:
>>>
>>> Hi,
 I just crossed an issue while updating my ofbiz-framework working 
 copy after having used pullAllPluginsSource. I get an error message 
 "Skipped obstructing working copy".

 This is because we have already a plugins folder in the 
 ofbiz-framework/trunk branch and when we use pullAllPluginsSource 
 we replace it by a new one (plugins folder) and the main .svn gets 
 confused (in root)

 I think we can live w/o the README.txt in the plugins folder and 
 the folder altogether and document it another way if needed (in the 
 main README.MD?), it will fix this problem.

 Opinions?

 Jacques



>



Re: Welcome James Yong as a new committer

2017-03-14 Thread Shi Jinghai
Welcome James!

-邮件原件-
发件人: Jacopo Cappellato [mailto:jacopo.cappell...@hotwaxsystems.com] 
发送时间: 2017年3月14日 16:57
收件人: dev@ofbiz.apache.org
主题: Welcome James Yong as a new committer

The OFBiz PMC has invited James Yong to become a new committer and we are happy 
to announce that he has accepted.

James has been involved in OFBiz for years providing patches, reporting bugs, 
discussing issues and also providing help and advice to others on the mailing 
lists.
James has a nice positive attitude and is constructive and community oriented 
and has been active on both the development and user mailing lists responding 
to some quite technical functional questions.

Please join me in welcoming and congratulating James.

Thanks

Jacopo


Re: [SKYPE CALL] Mentoring Support for New and Existing Committers

2017-03-14 Thread Shi Jinghai
Thank you Jacques! Love you.

-邮件原件-
发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com] 
发送时间: 2017年3月14日 16:10
收件人: dev@ofbiz.apache.org
主题: Re: [SKYPE CALL] Mentoring Support for New and Existing Committers

You are most welcome Jinghai

Jacques


Le 14/03/2017 à 08:42, Shi Jinghai a écrit :
> Ha, thanks Sharan, it's the first time I read OFBiz Mentors page.
>
> I have added Jacques as my mentor, may I? :)
>
>
>
> -邮件原件-
> 发件人: Sharan Foga [mailto:sha...@apache.org]
> 发送时间: 2017年3月13日 22:01
> 收件人: dev@ofbiz.apache.org
> 主题: [SKYPE CALL] Mentoring Support for New and Existing Committers
>
> Hi Everyone
>
> I'm bringing up a topic that has been raised in the past regarding committer 
> mentoring. [1][2][3].
>   
> As  project we don't have any on-boarding process to help new committers or 
> support existing ones. Sometimes people assume that by the time you become a 
> committer then you should know how everything works! (and that isn't always 
> the case. )
>
> In the past year with the re-factoring, the framework, plugins, gradle etc we 
> have a lot of changes happening and people may be a little overwhelmed about 
> how they can continue to contribute. Getting feedback and sharing knowledge 
> helps make people more confident in their way of working and contributions, 
> and the end result is better code which is a great thing for the project.
>
> So I would  like invite all of our committers (and also any interested 
> contributors) to a Skype call to about mentoring and the support that you can 
> get from our more experienced project committers. The call will be 
> approximately 1 hour and will include an opportunity to ask questions.
>
> If you'd like to attend then please add your details, location and timezone 
> to the table at the bottom of the following wiki page so that I can find a 
> suitable time for everyone.
>
> https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Mentors
>
> I really think that mentoring will help empower committers more, standardise 
> work and coding practices and generally improve our working relationships.
>
> As always, feedback welcome and please don't forget to add your name if you'd 
> like to attend.
>
> Thanks
> Sharan
>
> [1]  https://s.apache.org/FzI0
> [2]  https://s.apache.org/60t1
> [3]  https://s.apache.org/GWtv
>
>



Re: [SKYPE CALL] Mentoring Support for New and Existing Committers

2017-03-14 Thread Shi Jinghai
Ha, thanks Sharan, it's the first time I read OFBiz Mentors page.

I have added Jacques as my mentor, may I? :)



-邮件原件-
发件人: Sharan Foga [mailto:sha...@apache.org] 
发送时间: 2017年3月13日 22:01
收件人: dev@ofbiz.apache.org
主题: [SKYPE CALL] Mentoring Support for New and Existing Committers

Hi Everyone

I'm bringing up a topic that has been raised in the past regarding committer 
mentoring. [1][2][3]. 
 
As  project we don't have any on-boarding process to help new committers or 
support existing ones. Sometimes people assume that by the time you become a 
committer then you should know how everything works! (and that isn't always the 
case. )

In the past year with the re-factoring, the framework, plugins, gradle etc we 
have a lot of changes happening and people may be a little overwhelmed about 
how they can continue to contribute. Getting feedback and sharing knowledge 
helps make people more confident in their way of working and contributions, and 
the end result is better code which is a great thing for the project.

So I would  like invite all of our committers (and also any interested 
contributors) to a Skype call to about mentoring and the support that you can 
get from our more experienced project committers. The call will be 
approximately 1 hour and will include an opportunity to ask questions. 

If you'd like to attend then please add your details, location and timezone to 
the table at the bottom of the following wiki page so that I can find a 
suitable time for everyone.

https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Mentors

I really think that mentoring will help empower committers more, standardise 
work and coding practices and generally improve our working relationships. 

As always, feedback welcome and please don't forget to add your name if you'd 
like to attend.

Thanks
Sharan

[1]  https://s.apache.org/FzI0
[2]  https://s.apache.org/60t1
[3]  https://s.apache.org/GWtv


Re: Welcome Deepak Dixit as a new PMC member

2017-02-26 Thread Shi Jinghai
Congratulations Deepak!


-邮件原件-
发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com] 
发送时间: 2017年2月24日 21:08
收件人: dev@ofbiz.apache.org
主题: Welcome Deepak Dixit as a new PMC member

The OFBiz PMC has invited Deepak Dixit to become a new member of the committee; 
and the committee members are happy to announce that he has accepted.

Deepak has been involved in OFBiz for a long time now, and is a respected 
committer for 2 years.

We are sure Deepak will help us to take good decisions in favour of a bright 
future for OFBiz!

Please join me in welcoming and congratulating Deepak.

Thanks

Jacques
PS: Deepak, I let you change your status on the wiki PMC page :)



Re: [PROPOSAL] deprecate mini lang

2017-02-20 Thread Shi Jinghai
+1.


-邮件原件-
发件人: Michael Brohl [mailto:michael.br...@ecomify.de] 
发送时间: 2017年2月18日 17:17
收件人: dev@ofbiz.apache.org
主题: [PROPOSAL] deprecate mini lang

Hi everyone,

we are currently working hard to make OFBiz a modern, quality, robust 
and easy to use framework.
There are several ongoing initiatives like refactoring the core, UX, 
changing the build and plugin system and cleaning up the javadocs, only 
to mention a few.

In mini lang I see another part of our project which needs a 
refactoring/change. Here are some reasons:

- Programming in XML is hard to deal with when it comes to refactoring.

- The "code" cannot be debugged and is hard to review and maintain.

- It is slower because of the overhead of parsing and processing XML 
documents

- It is highly verbose, even so more than Java!

- It is difficult to reason about because everything appears as a string 
(variables, maps, objects, etc ...) which makes it very difficult to 
know where something was declared or modified

- It is highly error prone and brittle (again due to string declarations)

- It is not a full programming language (unlike groovy, or any other 
language that supports a DSL). Thus it has many limitations that forces 
the developer to write many more lines of code to achieve the same result.

- The code is not reusable (limitation of the DSL)

- The code is not composable (limitation of the DSL)

- Minilang depends on a lot of Java constructs (implementations, not 
interfaces) that require refactoring, making any improvements to the 
core API more challenging

- Minilang is used inconsistently (different DSL in widgets, services 
and entities). Hence, we need to keep only a minimal DSL to declare 
things only.


We already have Java based implementations for services and events and 
there are ideas to implement a Groovy DSL which can be used as easy (or 
easier) as mini lang and does not have the above mentioned flaws.

I therefore like to propose to deprecate the mini lang implementation 
which means:

1. there will be no new implementations based on mini lang accepted to 
go into the code base.

2. mini lang and mini lang code will be maintained with bug and security 
fixes for backwards compatibility and to support existing adopters 
relying on mini lang.
There will be no new features though.

3. we will continously replace the mini lang implementations with Java 
and/or Groovy code. This will be another good opportunity for 
contributors to engage in the project.


This will certainly be a longer process and we will not stop support for 
mini lang but I think we should avoid to add more mini lang 
implementations to the project.

What do you think?

Regards,

Michael





Re: Welcome Swapnil Shah as a New Committer!

2017-02-14 Thread Shi Jinghai
Hi Swapnil,

Welcome aboard and congratulations!

-邮件原件-
发件人: Sharan Foga [mailto:sha...@apache.org] 
发送时间: 2017年2月14日 19:00
收件人: dev@ofbiz.apache.org
主题: Welcome Swapnil Shah as a New Committer!

The OFBiz PMC has invited Swapnil Shah to become a new committer and are happy 
to announce that he has accepted.

Swapnil has been involved in OFBiz for a few years and has been active on both 
the development and user mailing lists responding to some quite technical 
functional questions.

Some of the key factors considered for inviting him were as follows:

- He has very good functional knowledge about OFBiz and this is a valuable 
skill that is useful to developers and users
- He is polite, positive, friendly and collaborative when dealing the community 
discussions on the mailings lists or Jira 
- He has raised Jiras, performed testing on patches and new other functionality
- The PMC would like to see a wide range of people from the community 
(developers and non-developers) recognised for their contributions to the 
project.

Please join me in welcoming and congratulating Swapnil.

Thanks
Sharan


Re: Using OFBiz as an Online Store for ASF Swag ?

2017-02-08 Thread Shi Jinghai
Great idea, Sharan.

I want to buy a T-Shirt of Miami Apachecon. I'm afraid I won't be there :).

-邮件原件-
发件人: Sharan Foga [mailto:sha...@apache.org] 
发送时间: 2017年2月8日 18:50
收件人: dev@ofbiz.apache.org
主题: Using OFBiz as an Online Store for ASF Swag ?

Hi All

I'm posting this message here as a potential idea for OFBiz to help out the 
ASF. I'm not sure if it will go anywhere but here goes. 

At the moment I help to manage the stock of ASF branded merchandise for 
conferences such as Apachecon and FOSDEM for Europe. 

During FOSDEM although we were giving stuff away for free, we did have limited 
stock of some items and we actually had quite a few people interested in buying 
ASF branded stuff so I was thinking about the possibility of using OFBiz to 
setup an ASF online store. 

This is only the start of an idea and I would need to discuss it with 
marketing, branding and community development to understand if it is even 
possible and if there are any restrictions etc and how it could work.

Thanks
Sharan.



Re: buildbot failure in on ofbiz-trunk

2017-01-24 Thread Shi Jinghai
Hmm, I read the log and found some errors. I don't know how to resolve these 
problems.

This error is the first one and I guess it causes other errors:
Jan 25, 2017 3:14:06 AM org.apache.coyote.AbstractProtocol init
SEVERE: Failed to initialize end point associated with ProtocolHandler 
["http-nio-8080"]
java.net.BindException: Address already in use

I need Jacques's help ... HELP ...

-邮件原件-
发件人: build...@apache.org [mailto:build...@apache.org] 
发送时间: 2017年1月25日 11:18
收件人: dev@ofbiz.apache.org
主题: buildbot failure in on ofbiz-trunk

The Buildbot has detected a new failure on builder ofbiz-trunk while building . 
Full details are available at:
https://ci.apache.org/builders/ofbiz-trunk/builds/1861

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-ofbiz-commit' 
triggered this build Build Source Stamp: [branch ofbiz/trunk] 1780133
Blamelist: shijh

BUILD FAILED: failed shell_1

Sincerely,
 -The Buildbot





Re: Use ecomseo on demo rather than ecommerce

2017-01-24 Thread Shi Jinghai
+1.

SEO is very important for ecommerce websites. When I implemented it, Jonathan 
Schikowski offered me many principles of SEO, it's not a function only, it's 
more a protocol OFBiz talks with a search engine.

I think setting ecomseo as default entrance of ecommerce will more users know 
OFBiz has SEO OOTB, and we are easy to get more inputs on how to improve it.

-邮件原件-
发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com] 
发送时间: 2017年1月25日 1:57
收件人: dev@ofbiz.apache.org
主题: Re: Use ecomseo on demo rather than ecommerce

I'm all for that. Using ecomseo instead of ecommerce, I mean. But when I 
proposed so, Anil refused and I went with this solution. For details see 
https://s.apache.org/UVqw

Actually as a diff between the 2 web.xml files shows there are also a bunch of 
other changes with the new filters and servlets, but yes that's pretty much it.

Sincerely, it was "some" work to come to this accommodation as OFBIZ-5312 
history shows. From the ilscipio team which Paul represent, Jinghai and I. I 
also thanks Sebastian, Ingo and Josip, who helped in initial tests.

Jacques


Le 22/01/2017 à 23:03, Scott Gray a écrit :
> If there was a change to be made, it should have been to work on 
> moving ecomseo into ecommerce.  There's not really any good reason for 
> both of them to exist when the only differences between the webapps 
> are the web.xml files.
>
> Regards
> Scott
>
> On 23 January 2017 at 10:44, Jacques Le Roux 
> 
> wrote:
>
>> OK, I'll answer your questions step by step. I just need time...
>>
>> Jacques
>>
>>
>> Le 22/01/2017 à 22:01, Scott Gray a écrit :
>>
>>> 1. Ask for input
>>> 2. Get no responses except a -1
>>> 3. Wait for a few months
>>> 4. Proceed anyway without further discussion
>>>
>>> In future it might be quicker to just skip step 1.
>>>
>>> Regards
>>> Scott
>>>
>>> On 23 January 2017 at 02:06, Jacques Le Roux < 
>>> jacques.le.r...@les7arts.com>
>>> wrote:
>>>
>>> Done, I have added links for developers
 Jacques



 Le 18/01/2017 à 09:45, Jacques Le Roux a écrit :

 I have done the change for R16.11.
> BTW, trunk demo has no official link, should we not add one (not
> official?) somewhere in the site or the wiki?
>
> Jacques
>
>
> Le 22/09/2016 à 14:07, Jacques Le Roux a écrit :
>
> Le 22/09/2016 à 13:22, Scott Gray a écrit :
>> This mostly to somehow battle test it, even if I know it works 
>> well
>>> So does it need battle testing or does it work well?
>>>
>>> It works well for me.
>> Have you deployed it to any production instances?
>>> Not directly, that's why I want it as default OFBiz demo
>> Has anyone else?
>>> At least
>> https://www.buchhandel.de/
>> https://oem.ofbizci.net/oci-2
>> I guess you can find more starting from  OFBIZ-5312
>>
>> Jacques
>>
>>
>> Regards
>>> Scott
>>>
>>> On 19 September 2016 at 01:27, Jacques Le Roux < 
>>> jacques.le.r...@les7arts.com
>>>
>>> wrote:
 Hi,

 Maybe you don't know about or did not try it, but we have 
 ecomseo a clone of the ecommerce component tailored for SEO

 https://cwiki.apache.org/confluence/display/OFBIZ/Search+
 Engine+Optimisation,+SEO+in+ecommerce

 I propose to use it as the default ecommerce demo. This mostly 
 to somehow battle test it, even if I know it works well.

 As it's based on ecommerce, users should not experience a big 
 changes, apart the changed URLs

 What do you think?

 Jacques







Re: Proposal to create a separate svn repository for the OFBiz official plugins

2017-01-11 Thread Shi Jinghai
+1 to the svn folder structure.

On the plugin publish and install, could we consider publish a zip file to 
maven repository as well as the jars? In production environment, unzip the zip 
file under plugins and then it can work, or even better, don't unzip it, let it 
work similar to an android apk file.


-邮件原件-
发件人: Taher Alkhateeb [mailto:slidingfilame...@gmail.com] 
发送时间: 2017年1月11日 23:02
收件人: dev@ofbiz.apache.org
主题: Proposal to create a separate svn repository for the OFBiz official plugins

Hello Folks

This is a proposal to the community to restructure our SVN repository. 
We do this by separating "official" plugins from the core OFBiz framework and 
to provide build script tasks to easily download and install these plugins. The 
details of this proposal are as follows:

1- Relocate OFBiz from http://svn.apache.org/repos/asf/ofbiz/ to 
http://svn.apache.org/repos/asf/ofbiz/ofbiz (with all trunk, branches and tags 
underneath as is)
2- Create a new tree under
http://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins to house all plugins
3- Remove /plugins/component-load.xml (any component in /plugins will load 
automatically if it is enabled in ofbiz-component.xml)
4- Create a gradle task with the below syntax. This task downloads a plugin 
from subversion and places it in /plugins and runs any install logic that it 
may have
   Syntax: pullPluginSource -PpluginId=
   Example: pullPluginSource -PpluginId=birt
5- Refactor the build scripts to cater for all the above
6- Update README.md to reflect all the above

So for example, under this proposal, trunk is located in:
http://svn.apache.org/repos/asf/ofbiz/ofbiz/trunk

And the birt component is located in:
http://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk/birt

This would allow us to have in the future the ability to provide releases not 
only for the framework but the plugins as well as two separate products.

What do you think?

Cheers,

Taher Alkhateeb



Re: Proposal to rename specialpurpose to plugins

2017-01-03 Thread Shi Jinghai
I will try to exclude some useless dependencies in solr lib later.

BTW, is there any tool to find dependencies conflicts in gradle?

-邮件原件-
发件人: Taher Alkhateeb [mailto:slidingfilame...@gmail.com] 
发送时间: 2017年1月3日 13:57
收件人: OFBIZ Development Mailing List
主题: Re: Proposal to rename specialpurpose to plugins

Hi Scott and All,

Recalling earlier discussions, one of the important reasons for creating the 
plug-in manager is to remove non-core components (perhaps to a separate
repo) from OFBiz while having the ability to maintain them easily (i.e. the 
build system takes care of downloading and incorporating into the code base).

So I think what this means is whether you rename or not most of the 
specialpurpose documentation will be irrelevant anyway if we apply this 
strategy.

Of course the reason for this direction is to maintain a lightweight core.
If you just look at the "birt" and "solr" components for example you will be 
see a massive amount of lib dependencies and some entanglements with core.

On Jan 2, 2017 11:42 PM, "Scott Gray"  wrote:

> Ok thanks, it just wasn't clear to me.
>
> My only concern with renaming it just for the sake of renaming it is 
> that we have to make sure our documentation reflects the change and we 
> have to be aware that anyone searching our email archives is going to 
> be confused about constant references to a folder that doesn't exist.
>
> I'm a +0, I don't want to get in the way of change but at the same 
> time I'm not sure the benefits outweigh the potential confusion.
>
> Regards
> Scott
>
> On 3 January 2017 at 09:11, Taher Alkhateeb 
> 
> wrote:
>
> > Hi Scott,
> >
> > I don't know, it depends on what people prefer. We can either delete 
> > the component-load.xml in /plugins and remove hot-deploy, or keep 
> > the component-load.xml and hot-deploy. I lean slightly towards the 
> > former but no strong opinion.
> >
> > I think one thing at a time though. The focus now is to rename and
> prepare
> > a mechanism for handling plugins. Perhaps we can start aanother 
> > thread to discuss the next steps moving forward.
> >
> > Cheers,
> >
> > Taher Alkhateeb
> >
> > On Jan 2, 2017 11:02 PM, "Scott Gray" 
> > wrote:
> >
> > > What's the plan for the hot-deploy folder?  Remove it?
> > >
> > > Regards
> > > Scott
> > >
> > > On 3 January 2017 at 08:26, gil portenseigne <
> > gil.portensei...@nereide.fr>
> > > wrote:
> > >
> > > > +1
> > > >
> > > > Gil
> > > >
> > > >
> > > >
> > > > On 02/01/2017 17:45, Taher Alkhateeb wrote:
> > > >
> > > >> Hello Everyone,
> > > >>
> > > >> In reference to earlier discussions and threads on the above
> subject,
> > I
> > > am
> > > >> hereby proposing renaming the directory "specialpurpose" to
> > "plugins". I
> > > >> have patch ready with all tests passing.
> > > >>
> > > >> Ref discussion:
> > > >> https://lists.apache.org/thread.html/9bb4fba6ec56bd52a5bc55e
> > > >> 44ba1672f088ec33eeb8a1af4d16fd6d2@%3Cdev.ofbiz.apache.org%3E
> > > >>
> > > >> Cheers,
> > > >>
> > > >> Taher Alkhateeb
> > > >>
> > > >>
> > > >
> > >
> >
>


Re: Proposal to rename specialpurpose to plugins

2017-01-03 Thread Shi Jinghai
+1.

Personally, I support the efforts to slim down OFBiz. I think lightweight will 
give us more flexibility.

-邮件原件-
发件人: Taher Alkhateeb [mailto:slidingfilame...@gmail.com] 
发送时间: 2017年1月3日 0:45
收件人: OFBIZ Development Mailing List
主题: Proposal to rename specialpurpose to plugins

Hello Everyone,

In reference to earlier discussions and threads on the above subject, I am 
hereby proposing renaming the directory "specialpurpose" to "plugins". I have 
patch ready with all tests passing.

Ref discussion:
https://lists.apache.org/thread.html/9bb4fba6ec56bd52a5bc55e44ba1672f088ec33eeb8a1af4d16fd6d2@%3Cdev.ofbiz.apache.org%3E

Cheers,

Taher Alkhateeb


Re: svn commit: r1770621 [1/5] - in /ofbiz/trunk/specialpurpose/pricat: ./ config/ data/ entitydef/ groovyScripts/ groovyScripts/pricat/ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/

2016-12-07 Thread Shi Jinghai
Love you Jacques.

I removed the duplicated labels and committed (rev. 1773058).

Shi Jinghai


-邮件原件-
发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com] 
发送时间: 2016年12月7日 17:16
收件人: dev@ofbiz.apache.org
主题: Re: svn commit: r1770621 [1/5] - in /ofbiz/trunk/specialpurpose/pricat: ./ 
config/ data/ entitydef/ groovyScripts/ groovyScripts/pricat/ src/ src/main/ 
src/main/java/ src/main/java/org/ src/main/java/org/apache/ 
src/main/java/org/apache/ofbiz/ src/main...

Thanks Jinghai,

I just noticed these labels are duplicated

ExcelTableNoRow
ExcelTableNoRow
ExcelTableColumnNumberNotMatch
ExcelTableColumnNumberNotMatch
ExcelTableColumnNotMatch
ExcelTableColumnNotMatch
ExcelParsingRow
ExcelParsingRow

Jacques


Le 05/12/2016 à 16:34, Shi Jinghai a écrit :
> Thank you Jacques!
>
> I committed a fix to the 2 bugs in rev. 1772689.
>
> Kind Regards,
>
> Shi Jinghai
>
>
> -邮件原件-
> 发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com]
> 发送时间: 2016年12月5日 18:22
> 收件人: dev@ofbiz.apache.org
> 主题: Re: svn commit: r1770621 [1/5] - in /ofbiz/trunk/specialpurpose/pricat: 
> ./ config/ data/ entitydef/ groovyScripts/ groovyScripts/pricat/ src/ 
> src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ 
> src/main/java/org/apache/ofbiz/ src/main...
>
> Hi Shi,
>
> I just noticed EXCELIMPORT_USERLOGIN is 3 chars too long, EXCELIMPORT_USERLG 
> would work
>
> Also there is a RelationNameNotUnique in same place. You should use titles 
> (look for "title" in
> https://cwiki.apache.org/confluence/display/OFBIZ/Entity+Engine+Guide)
>
> like in
>
>  rel-entity-name="GlAccount">
>rel-field-name="glAccountId"/>
> 
>  rel-entity-name="GlAccount">
>   
> 
>
> 2016-12-05 10:57:12,910 |delegator-startup-1 |GenericDelegator  
> |W| =-=-=-=-= Found 2 warnings when checking the entity definitions:
> 2016-12-05 10:57:12,910 |delegator-startup-1 |GenericDelegator  
> |W| [RelFKNameGT18] The foreign key named EXCELIMPORT_USERLOGIN
> (length:21) was greater than 18 characters in length for relation UserLogin 
> of entity ExcelImportHistory.
> 2016-12-05 10:57:12,910 |delegator-startup-1 |GenericDelegator  
> |W| [RelationNameNotUnique] Relation Enumeration of entity
> ExcelImportHistory is not unique for that entity.
>
> Thanks
>
> Jacques
>
>
> Le 21/11/2016 à 09:07, sh...@apache.org a écrit :
>> Author: shijh
>> Date: Mon Nov 21 08:07:57 2016
>> New Revision: 1770621
>>
>> URL: http://svn.apache.org/viewvc?rev=1770621=rev
>> Log:
>> OFBIZ-9123 Add a PriCat component under specialpurpose
>>
>> Added:
>>   ofbiz/trunk/specialpurpose/pricat/
>>   ofbiz/trunk/specialpurpose/pricat/build.gradle
>>   ofbiz/trunk/specialpurpose/pricat/config/
>>   ofbiz/trunk/specialpurpose/pricat/config/PricatUiLabels.xml
>>   ofbiz/trunk/specialpurpose/pricat/config/pricat.properties
>>   ofbiz/trunk/specialpurpose/pricat/data/
>>   ofbiz/trunk/specialpurpose/pricat/data/PricatData.xml
>>   ofbiz/trunk/specialpurpose/pricat/entitydef/
>>   ofbiz/trunk/specialpurpose/pricat/entitydef/entitymodel.xml
>>   ofbiz/trunk/specialpurpose/pricat/groovyScripts/
>>   ofbiz/trunk/specialpurpose/pricat/groovyScripts/pricat/
>>   
>> ofbiz/trunk/specialpurpose/pricat/groovyScripts/pricat/FindMyExcelImport.groovy
>>   
>> ofbiz/trunk/specialpurpose/pricat/groovyScripts/pricat/FindMyExcelImportLog.groovy
>>   ofbiz/trunk/specialpurpose/pricat/ofbiz-component.xml
>>   ofbiz/trunk/specialpurpose/pricat/src/
>>   ofbiz/trunk/specialpurpose/pricat/src/main/
>>   ofbiz/trunk/specialpurpose/pricat/src/main/java/
>>   ofbiz/trunk/specialpurpose/pricat/src/main/java/org/
>>   ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/
>>   ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/
>>   
>> ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/htmlreport/
>>   
>> ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/htmlreport/AbstractHtmlReport.java
>>   
>> ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/htmlreport/AbstractReport.java
>>   
>> ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/htmlreport/AbstractReportThread.java
>>   
>> ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java
>>   
>> ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/htmlreport/Interf

Re: svn commit: r1770621 [1/5] - in /ofbiz/trunk/specialpurpose/pricat: ./ config/ data/ entitydef/ groovyScripts/ groovyScripts/pricat/ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/

2016-12-05 Thread Shi Jinghai
Thank you Jacques!

I committed a fix to the 2 bugs in rev. 1772689.

Kind Regards,

Shi Jinghai


-邮件原件-
发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com] 
发送时间: 2016年12月5日 18:22
收件人: dev@ofbiz.apache.org
主题: Re: svn commit: r1770621 [1/5] - in /ofbiz/trunk/specialpurpose/pricat: ./ 
config/ data/ entitydef/ groovyScripts/ groovyScripts/pricat/ src/ src/main/ 
src/main/java/ src/main/java/org/ src/main/java/org/apache/ 
src/main/java/org/apache/ofbiz/ src/main...

Hi Shi,

I just noticed EXCELIMPORT_USERLOGIN is 3 chars too long, EXCELIMPORT_USERLG 
would work

Also there is a RelationNameNotUnique in same place. You should use titles 
(look for "title" in 
https://cwiki.apache.org/confluence/display/OFBIZ/Entity+Engine+Guide)

like in

   
 
   
   
 
   

2016-12-05 10:57:12,910 |delegator-startup-1 |GenericDelegator  |W| 
=-=-=-=-= Found 2 warnings when checking the entity definitions:
2016-12-05 10:57:12,910 |delegator-startup-1 |GenericDelegator  |W| 
[RelFKNameGT18] The foreign key named EXCELIMPORT_USERLOGIN 
(length:21) was greater than 18 characters in length for relation UserLogin of 
entity ExcelImportHistory.
2016-12-05 10:57:12,910 |delegator-startup-1 |GenericDelegator  |W| 
[RelationNameNotUnique] Relation Enumeration of entity 
ExcelImportHistory is not unique for that entity.

Thanks

Jacques


Le 21/11/2016 à 09:07, sh...@apache.org a écrit :
> Author: shijh
> Date: Mon Nov 21 08:07:57 2016
> New Revision: 1770621
>
> URL: http://svn.apache.org/viewvc?rev=1770621=rev
> Log:
> OFBIZ-9123 Add a PriCat component under specialpurpose
>
> Added:
>  ofbiz/trunk/specialpurpose/pricat/
>  ofbiz/trunk/specialpurpose/pricat/build.gradle
>  ofbiz/trunk/specialpurpose/pricat/config/
>  ofbiz/trunk/specialpurpose/pricat/config/PricatUiLabels.xml
>  ofbiz/trunk/specialpurpose/pricat/config/pricat.properties
>  ofbiz/trunk/specialpurpose/pricat/data/
>  ofbiz/trunk/specialpurpose/pricat/data/PricatData.xml
>  ofbiz/trunk/specialpurpose/pricat/entitydef/
>  ofbiz/trunk/specialpurpose/pricat/entitydef/entitymodel.xml
>  ofbiz/trunk/specialpurpose/pricat/groovyScripts/
>  ofbiz/trunk/specialpurpose/pricat/groovyScripts/pricat/
>  
> ofbiz/trunk/specialpurpose/pricat/groovyScripts/pricat/FindMyExcelImport.groovy
>  
> ofbiz/trunk/specialpurpose/pricat/groovyScripts/pricat/FindMyExcelImportLog.groovy
>  ofbiz/trunk/specialpurpose/pricat/ofbiz-component.xml
>  ofbiz/trunk/specialpurpose/pricat/src/
>  ofbiz/trunk/specialpurpose/pricat/src/main/
>  ofbiz/trunk/specialpurpose/pricat/src/main/java/
>  ofbiz/trunk/specialpurpose/pricat/src/main/java/org/
>  ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/
>  ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/
>  
> ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/htmlreport/
>  
> ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/htmlreport/AbstractHtmlReport.java
>  
> ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/htmlreport/AbstractReport.java
>  
> ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/htmlreport/AbstractReportThread.java
>  
> ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java
>  
> ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/htmlreport/InterfaceReport.java
>  
> ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/htmlreport/InterfaceReportThread.java
>  
> ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/htmlreport/sample/
>  
> ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/htmlreport/sample/SampleHtmlReport.java
>  
> ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/htmlreport/sample/SampleHtmlThread.java
>  
> ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/htmlreport/util/
>  
> ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/htmlreport/util/ReportEncoder.java
>  
> ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/htmlreport/util/ReportStringUtil.java
>  ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/pricat/
>  
> ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/pricat/AbstractPricatParser.java
>  
> ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/pricat/InterfacePricatParser.java
>  
> ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/pricat/PricatEvents.java
>  
> ofbiz/trunk/specialpurpose/pricat/src/main/java/org/apache/ofbiz/pricat/PricatParseExcelHtmlReport.java
>  

Re: Replace password encryption SHA-1 by SHA-512

2016-12-05 Thread Shi Jinghai
Hi Jacques,

Personally I'd prefer PBKDF2 rather than Argon, because the encrypt of PBKDF2 
is done by JDK, I don't know whether Argon has been supported by JDK.

Kind Regards,

Shi Jinghai

-邮件原件-
发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com] 
发送时间: 2016年12月5日 22:24
收件人: dev@ofbiz.apache.org
抄送: gregory draperi
主题: Replace password encryption SHA-1 by SHA-512

Hi,

At https://issues.apache.org/jira/browse/OFBIZ-8537 Junyuan has contributed a 
new PBDKF2_SHA* one way encryption for password

At http://svn.apache.org/viewvc?rev=1772589=rev Jinghai has committed it, 
I made few remarks on this commit, one of this comment was also discussed in 
the Jira by Pierre and Michael. It's about using PBDKF2 OOTB.

After reading https://cryptosense.com/parameter-choice-for-pbkdf2/ I think we 
should replace our current SHA1 default implementation by SHA-512 and increase 
PBKDF2_ITERATIONS to 10 000

We should also provide new PBDKF2_SHA1 password data.

As suggested by the article above, another step would be to use Argon 
https://password-hashing.net/

What do you think?

Jacques



Re: svn commit: r1772589 - in /ofbiz/trunk/framework: base/src/main/java/org/apache/ofbiz/base/crypto/HashCrypt.java security/config/security.properties security/data/PasswordSecurityDemoData.xml secu

2016-12-05 Thread Shi Jinghai
Thank you Nicolas! Agree better to use StringBuilder here.

Cheers,

-邮件原件-
发件人: Nicolas Malin [mailto:nicolas.ma...@nereide.fr] 
发送时间: 2016年12月5日 16:44
收件人: dev@ofbiz.apache.org
主题: Re: svn commit: r1772589 - in /ofbiz/trunk/framework: 
base/src/main/java/org/apache/ofbiz/base/crypto/HashCrypt.java 
security/config/security.properties security/data/PasswordSecurityDemoData.xml 
security/entitydef/entitymodel.xml

hello Shi

I think it's better to use a StringBuilder to build this.

Cheers,
Nicolas
Le 05/12/2016 à 02:32, sh...@apache.org a écrit :
> +return pbkdf2Type + "$" + PBKDF2_ITERATIONS + "$" + salt + "$" + 
> new String(hash);



Re: [DISCUSSION] Improving the OFBiz User Interface

2016-11-30 Thread Shi Jinghai
Well done Gaurav!

-邮件原件-
发件人: Gaurav Saini [mailto:gauravsain...@gmail.com] 
发送时间: 2016年12月1日 3:07
收件人: dev@ofbiz.apache.org
主题: Re: [DISCUSSION] Improving the OFBiz User Interface

Hello Everyone,

Looks like I am jumping a bit late here. But as Julien said I am really 
interested on working on the UI side of the project. I am still looking deep 
into the ofbiz structure and understand how Julien is proposing to do UI 
customisation so I can help and make OFBiz look good :)

For starting what I am able to understand and quickly start is prepare a theme 
for the e-commerce component that is responsive in nature and with good UI/UX 
components. So, anyone starting with ofbiz can directly use the theme with 
minor changes according to need.

Just to mention, I have updated my angular code to github which i presented in 
presentation at ApacheCON. I have already posting link on hipchat, if somebody 
interested can look into it. I was interested in using angular as all together 
different single page app outside ofbiz because it helped me do good amount of 
UI customisation and on the other hand for small modules or some specific 
requirement it was really light-weight to use at client's end.
https://github.com/gauravsaini03/ofbiz-angular

Thanks
Gaurav


On Wed, Nov 30, 2016 at 6:54 PM, Julien NICOLAS 
wrote:

> Yes, I agree, let's make it simple for the POC.
>
>
>
> On 30/11/2016 11:07, Jacopo Cappellato wrote:
>
>> Amazing discussion and initiative.
>> ​My only recommendation at the moment is to try to plan very short 
>> (in scope and in time) development cycles (requirements gathering and 
>> discussion, design, implementation, review) so that each cycle could 
>> focus on a specific experiment/proposal (e.g. a given ui technology) 
>> and could deliver a proof of concept to the community (e.g. as a new 
>> component) for further discussion and work.
>>
>> In this way we will be able to quickly implement and compare 
>> different solutions/technologies and will have a chance to take a 
>> more informed decision.
>>
>> Jacopo
>>
>>
>


--
Regards,
*Gaurav Saini*


Re: [DISCUSSION] Defining an OFBiz Project Strategy

2016-11-30 Thread Shi Jinghai
+1 to use repo.maven.apache.org if possible.

-邮件原件-
发件人: Jacopo Cappellato [mailto:jacopo.cappell...@hotwaxsystems.com] 
发送时间: 2016年11月30日 17:54
收件人: dev@ofbiz.apache.org
主题: Re: [DISCUSSION] Defining an OFBiz Project Strategy

On Wed, Nov 30, 2016 at 10:40 AM, Sharan Foga  wrote:

> [...] I wouldn't be happy for the community to have to rely on service 
> providers to provide what should be standard functions / components or 
> plug-ins.
>
> So I would be in favour of something like Jacques is proposing that we 
> have an official project repo for plug-ins.
>

We could look at the feasibility (from an infra and a legal perspective) of 
publishing our plugins to:
http://repo.maven.apache.org/maven2

Jacopo


Re: [DISCUSSION] Defining an OFBiz Project Strategy

2016-11-29 Thread Shi Jinghai
Well done Olivier!

Personally, I think we should consider Hadoop in OFBiz roadmap. In the past 10 
years, I have to agree, Hadoop is the most important progress, and it's from 
Apache.

-邮件原件-
发件人: Olivier Heintz [mailto:holivier.li...@ofbizextra.org] 
发送时间: 2016年11月30日 1:33
收件人: dev@ofbiz.apache.org
主题: Re: [DISCUSSION] Defining an OFBiz Project Strategy

Answers are in-line

Le 28/11/2016 à 11:08, Sharan Foga a écrit :
> Hi Everyone
> 
> One of the topics that came up during the brainstorming in Seville was that 
> the project desperately needs a clear strategy and roadmap. 
>



> 
> So to get the discussion started: 
> 
> 1. Do people agree that the project needs to focus on driving adoption?
+10
but who are ours target :
  1) ERP services company (consultant or/and technical employees with ERP 
knowledge)
  2) or IT services company ( SME )
  3) or end user (manager who need a ERP)
  or both ;-)

( it's ordered in my point of view )

> 2. Do people think that the UI is one of the key things that stops this ? 
> (If, not then please include what do you think is)
+10
but maybe the OOTB UI is not the same than the more professional business 
application plugins.
First should be more fashionable that the second which could be more sober and 
practical (maybe only a theme difference)

> 3. What goals could we set?
Taher start to answer, I will complete...

> 4. Are people interested in working in workgroups, to focus on specific areas 
> (or goals)?
My "contribution areas" are
- UI scenario Test
- documentation (for consultant or/and technical  with ERP knowledge )
- using plugin manager to create small function plugin
- saying if it's usable by a functional consultant ;-)

> 
> (I know there are some ideas/work around the UI going on, but I will post the 
> Seville details and notes about that in separate discussion thread.)
> 
> Thanks
> Sharan
> 
> 


Re: Commit template, more flexibility [was Re: Put "Reverts" in the commit template?]

2016-09-22 Thread Shi Jinghai
Ha, English, my favorite part. When I was 10, I learned my first 2 sentences of 
English:
1. Long life Chairman Mao!
2. Good morning comrade ... Gray

We are a worldwide community, please keep communication as simple as possible.

Good morning comrade everybody,

Shi Jinghai

-邮件原件-
发件人: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com] 
发送时间: 2016年9月22日 23:07
收件人: dev@ofbiz.apache.org
主题: Re: Commit template, more flexibility [was Re: Put "Reverts" in the commit 
template?]

Scott,

Reading your message I guess you did not read my previous explanation on why I 
prefer to use present instead of past. You may find more details in digging in 
previous emails.

But long story short, I'm French so I can't compete in English with someone 
like you for who English is the mother tongue.

The reason I use present is because I got this habit while working with Rupert 
Howell. You know, the guy who wrote the first OFBiz book. I don't reveal 
anything saying he is from Southampton (at least he lives there). I was then 
used to use past also in commit messages. A habit I got while seeing others 
committing in OFBiz. But when I saw Rupert  using present, it immediately made 
sense to me: at the moment you commit, you are doing an action. So I should use 
present, I'm doing the commit, it's not yet done.

I don't know if Rupert will read or appreciate this message, but it's the truth!

Anyway I believe it's a moot point, and we should have the freedom to write as 
we prefer, like it's done in a successful project like GitHub...

Jacques


Le 22/09/2016 à 14:52, Scott Gray a écrit :
> I can't believe you're being so stubborn about something so minor 
> Jacques, it seems like very strange behavior to me.  For what it's 
> worth as a native English speaker, reading a commit message written in 
> present-tense feels very strange to me.  I'm looking at a history and 
> reading something as though it is current, it doesn't feel logical.
>
> Regards
> Scott
>
> On 22 September 2016 at 19:36, Jacques Le Roux 
> <jacques.le.r...@les7arts.com
>> wrote:
>> Jacopo,
>>
>> I saw you answered on Confluence where I 1st asked 
>> https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+
>> commit+message+template?focusedCommentId=65871637#comment-65871637
>>
>> Now, I understand that we need to pick a word, but why not being more 
>> flexible, similarly at what does GitHub 
>> https://help.github.com/articl es/closing-issues-via-commit-messages/ ?
>>
>> I already suggested in previous threads that I could help if the 
>> process Michael uses to create the blog monthly report needs to be adapted.
>> In relation, I also created in the "Wiki page for the "monthly Jira 
>> issues list" creation in the blog" thread, without any answers so far 
>> :/
>>
>> Thanks
>>
>> Jacques
>>
>>
>> Le 22/09/2016 à 08:45, Jacques Le Roux a écrit :
>>
>>> Hi Jacopo,
>>>
>>> What is the logical behind this? It's not the first time I ask and 
>>> I'd really like to have a clarification.
>>>
>>> We have "Fix for" and "Documentation". Why not "Fixed" and "Documented"?
>>>
>>> Thanks
>>>
>>> Jacques
>>>
>>> Le 21/09/2016 à 19:09, Jacopo Cappellato a écrit :
>>>
>>>> I have changed it to "Reverted" for consistency reasons.
>>>>
>>>> Jacopo
>>>>
>>>>
>>>>
>>>> On Wed, Sep 21, 2016 at 7:01 PM, Jacques Le Roux < 
>>>> jacques.le.r...@les7arts.com> wrote:
>>>>
>>>> Done
>>>>> Jacques
>>>>>
>>>>>
>>>>> Le 18/09/2016 à 11:19, Jacques Le Roux a écrit :
>>>>>
>>>>> Hi,
>>>>>> In some cases we need to revert a commit done for a Jira after we 
>>>>>> discover it causes an issue. We have not yet other means that 
>>>>>> using the fix word.
>>>>>> I suggest we put in the "Reverts" (or "Revert for" or "Reverted" 
>>>>>> as it please you) word in the commit template for this reason.
>>>>>> Because it's a different thing than really fixing the initial 
>>>>>> issue reported in the Jira but it's sill related to it
>>>>>>
>>>>>> What do you think?
>>>>>>
>>>>>> Jacques
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>



Re: Ideas about OFBiz servlet filters

2016-09-19 Thread Shi Jinghai
Hi Jacopo,

Happy all work well!

I made a minor change on SeoContextFilter, moved several variables from doGet 
method to class private ones and initialized in init method (rev. 1761514).

Cheers,

Shi Jinghai

-邮件原件-
发件人: Jacopo Cappellato [mailto:jacopo.cappell...@hotwaxsystems.com] 
发送时间: 2016年9月19日 14:38
收件人: dev@ofbiz.apache.org
主题: Re: Ideas about OFBiz servlet filters

Hi Jinghai,

during the weekend I committed a series of changes to leverage the new 
ControlFilter (and simplify the ContextFilter and other filters) in all the 
OFBiz applications.
It would be great if you (and anyone else) could help reviewing my work and 
testing the applications.
Feel free to continue the cleanup/refactoring in the SEO filter (or any other 
filter): I just performed the most obvious ones.

Thank you,

Jacopo

On Sat, Sep 17, 2016 at 5:00 PM, Shi Jinghai <huaru...@hotmail.com> wrote:

> Thanks Jacopo!
>
> I'll try to change the SEO filter next Monday.
>
>
> -邮件原件-
> 发件人: Jacopo Cappellato [mailto:jacopo.cappell...@hotwaxsystems.com]
> 发送时间: 2016年9月17日 22:25
> 收件人: dev@ofbiz.apache.org
> 主题: Re: Ideas about OFBiz servlet filters
>
> Hi Jinghai,
>
> please see inline:
>
> On Sat, Sep 17, 2016 at 3:16 PM, Shi Jinghai <huaru...@hotmail.com> wrote:
>
> > Hi Jacopo,
> >
> > Thanks for your message!
> >
> > The new ControlFilter works well as expected.
> >
> >
> I am glad it worked well; hopefully in the weekend I am going to 
> remove the
> (now) duplicated logic from the ContextFilter (and other filters), 
> similarly to what you did with the Solr filter here, and chain this 
> filter in all the other web.xml.
>
>
> > I checked in a new OFBizSolrContextFilter in rev. 1761214 to follow 
> > up this change, the web.xml is changed as well.
> >
> > Personally, I feel the name ControlFilter and ContextFilter are a 
> > bit strange, see web.xml:
> > 
> > ControlFilter
> > /*
> > 
> >
> > 
> > ContextFilter
> > /control/*
> > 
> >
> > Should we exchange their names? :)
> >
>
> Well, while in the above example it may look a bit strange, I think 
> that the names are still appropriate:
> * ControlFilter performs some "controller" tasks (some of them with 
> the help of the ControlServlet)
> * ContextFilter prepares the contexts (session, request) with the 
> objects expected by the framework and application code
>
>
> > There is a servletContext attribute stored in request, I'm not sure 
> > whether it should be removed or set in ControlFilter.
> >
>
> servletContext is already set by the ContextFilter, so I don't think 
> it is required in the ControlFilter; what do you think?
>
> Thanks,
>
> Jacopo
>
>
> >
> > Anyway, please do leave a message here if you have further changes 
> > on the filters.
> >
> > Kind Regards,
> >
> > Shi Jinghai
> >
> >
> > -邮件原件-
> > 发件人: Jacopo Cappellato [mailto:jacopo.cappell...@hotwaxsystems.com]
> > 发送时间: 2016年9月14日 23:34
> > 收件人: dev@ofbiz.apache.org
> > 主题: Re: Ideas about OFBiz servlet filters
> >
> > In rev. 1760725 I have committed the new ControlFilter that is 
> > designed to be chained with (before or after) ContextFilter and 
> > other
> filters.
> > Please review it and let me know what you think.
> > My next step is to remove the duplicated logic from ContextFilter 
> > and update all the applications' web.xml files with this new filter.
> >
> > Thank you,
> >
> > Jacopo
> >
> > On Tue, Sep 13, 2016 at 11:03 AM, Shi Jinghai <huaru...@hotmail.com>
> > wrote:
> >
> > > Hi Jacopo,
> > >
> > > Thanks for your consideration!
> > >
> > > I like the name ControlFilter. On the sequence of the filters, 
> > > personally I think it's a policy for entrance. If put the 
> > > ControlFilter 1st, it's a strict control. If put it last, it's a 
> > > loose
> > control. Anyway, we need it.
> > >
> > > When you complete, I will try to change SEO and solr filters to 
> > > follow your update.
> > >
> > > Kind Regards,
> > >
> > > Shi Jinghai
> > >
> > >
> > > -邮件原件-
> > > 发件人: Jacopo Cappellato 
> > > [mailto:jacopo.cappell...@hotwaxsystems.com]
> > > 发送时间: 2016年9月13日 16:30
> > > 收件人: dev@ofbiz.apache.org
> > > 主题: Re: Ideas about OFBiz servlet filters
> > >
> > > Thank you Jinghai,
> > >
> > > 

Re: Ideas about OFBiz servlet filters

2016-09-17 Thread Shi Jinghai
Thanks Jacopo!

I'll try to change the SEO filter next Monday.


-邮件原件-
发件人: Jacopo Cappellato [mailto:jacopo.cappell...@hotwaxsystems.com] 
发送时间: 2016年9月17日 22:25
收件人: dev@ofbiz.apache.org
主题: Re: Ideas about OFBiz servlet filters

Hi Jinghai,

please see inline:

On Sat, Sep 17, 2016 at 3:16 PM, Shi Jinghai <huaru...@hotmail.com> wrote:

> Hi Jacopo,
>
> Thanks for your message!
>
> The new ControlFilter works well as expected.
>
>
I am glad it worked well; hopefully in the weekend I am going to remove the
(now) duplicated logic from the ContextFilter (and other filters), similarly to 
what you did with the Solr filter here, and chain this filter in all the other 
web.xml.


> I checked in a new OFBizSolrContextFilter in rev. 1761214 to follow up 
> this change, the web.xml is changed as well.
>
> Personally, I feel the name ControlFilter and ContextFilter are a bit 
> strange, see web.xml:
> 
> ControlFilter
> /*
> 
>
> 
> ContextFilter
> /control/*
> 
>
> Should we exchange their names? :)
>

Well, while in the above example it may look a bit strange, I think that the 
names are still appropriate:
* ControlFilter performs some "controller" tasks (some of them with the help of 
the ControlServlet)
* ContextFilter prepares the contexts (session, request) with the objects 
expected by the framework and application code


> There is a servletContext attribute stored in request, I'm not sure 
> whether it should be removed or set in ControlFilter.
>

servletContext is already set by the ContextFilter, so I don't think it is 
required in the ControlFilter; what do you think?

Thanks,

Jacopo


>
> Anyway, please do leave a message here if you have further changes on 
> the filters.
>
> Kind Regards,
>
> Shi Jinghai
>
>
> -邮件原件-
> 发件人: Jacopo Cappellato [mailto:jacopo.cappell...@hotwaxsystems.com]
> 发送时间: 2016年9月14日 23:34
> 收件人: dev@ofbiz.apache.org
> 主题: Re: Ideas about OFBiz servlet filters
>
> In rev. 1760725 I have committed the new ControlFilter that is 
> designed to be chained with (before or after) ContextFilter and other filters.
> Please review it and let me know what you think.
> My next step is to remove the duplicated logic from ContextFilter and 
> update all the applications' web.xml files with this new filter.
>
> Thank you,
>
> Jacopo
>
> On Tue, Sep 13, 2016 at 11:03 AM, Shi Jinghai <huaru...@hotmail.com>
> wrote:
>
> > Hi Jacopo,
> >
> > Thanks for your consideration!
> >
> > I like the name ControlFilter. On the sequence of the filters, 
> > personally I think it's a policy for entrance. If put the 
> > ControlFilter 1st, it's a strict control. If put it last, it's a 
> > loose
> control. Anyway, we need it.
> >
> > When you complete, I will try to change SEO and solr filters to 
> > follow your update.
> >
> > Kind Regards,
> >
> > Shi Jinghai
> >
> >
> > -邮件原件-
> > 发件人: Jacopo Cappellato [mailto:jacopo.cappell...@hotwaxsystems.com]
> > 发送时间: 2016年9月13日 16:30
> > 收件人: dev@ofbiz.apache.org
> > 主题: Re: Ideas about OFBiz servlet filters
> >
> > Thank you Jinghai,
> >
> > I agree we should separate the concerns and split the ContextFilter 
> > into two filters; I am going to work on this and I am planning to 
> > separate the "controller" related concerns (like allowPaths and 
> > redirectPath functions) into a new filter named ControlFilter.
> > But, shouldn't the ControlFilter be executed before the ContextFilter?
> > Will it conflict with the behavior of the CatalogUrlFilter and other 
> > filters?
> >
> > Jacopo
> >
> > On Sun, Sep 11, 2016 at 8:13 AM, Shi Jinghai <huaru...@hotmail.com>
> wrote:
> >
> > > Great, Jacopo!
> > >
> > > I think it would be better to separate the allowPaths and 
> > > redirectPath functions to a new filter. If ContextFilter be the 
> > > 1st filter, the new filter will be the last I guess. Between them,
> CatalogUrlFilter and etc.
> > > will be there.
> > >
> > > Kind Regards,
> > >
> > > Shi Jinghai
> > >
> > > -邮件原件-
> > > 发件人: Jacopo Cappellato 
> > > [mailto:jacopo.cappell...@hotwaxsystems.com]
> > > 发送时间: 2016年9月9日 16:07
> > > 收件人: dev@ofbiz.apache.org
> > > 主题: Ideas about OFBiz servlet filters
> > >
> > > A web application, in order to leverage the OFBiz framework, 
> > > requires that a series of objects are in its contexts (servlet 
> > > conte

Re: Ideas about OFBiz servlet filters

2016-09-17 Thread Shi Jinghai
Hi Jacopo,

Thanks for your message! 

The new ControlFilter works well as expected.

I checked in a new OFBizSolrContextFilter in rev. 1761214 to follow up this 
change, the web.xml is changed as well.

Personally, I feel the name ControlFilter and ContextFilter are a bit strange, 
see web.xml:

ControlFilter
/*



ContextFilter
/control/*


Should we exchange their names? :)

There is a servletContext attribute stored in request, I'm not sure whether it 
should be removed or set in ControlFilter.

Anyway, please do leave a message here if you have further changes on the 
filters.

Kind Regards,

Shi Jinghai


-邮件原件-
发件人: Jacopo Cappellato [mailto:jacopo.cappell...@hotwaxsystems.com] 
发送时间: 2016年9月14日 23:34
收件人: dev@ofbiz.apache.org
主题: Re: Ideas about OFBiz servlet filters

In rev. 1760725 I have committed the new ControlFilter that is designed to be 
chained with (before or after) ContextFilter and other filters.
Please review it and let me know what you think.
My next step is to remove the duplicated logic from ContextFilter and update 
all the applications' web.xml files with this new filter.

Thank you,

Jacopo

On Tue, Sep 13, 2016 at 11:03 AM, Shi Jinghai <huaru...@hotmail.com> wrote:

> Hi Jacopo,
>
> Thanks for your consideration!
>
> I like the name ControlFilter. On the sequence of the filters, 
> personally I think it's a policy for entrance. If put the 
> ControlFilter 1st, it's a strict control. If put it last, it's a loose 
> control. Anyway, we need it.
>
> When you complete, I will try to change SEO and solr filters to follow 
> your update.
>
> Kind Regards,
>
> Shi Jinghai
>
>
> -邮件原件-
> 发件人: Jacopo Cappellato [mailto:jacopo.cappell...@hotwaxsystems.com]
> 发送时间: 2016年9月13日 16:30
> 收件人: dev@ofbiz.apache.org
> 主题: Re: Ideas about OFBiz servlet filters
>
> Thank you Jinghai,
>
> I agree we should separate the concerns and split the ContextFilter 
> into two filters; I am going to work on this and I am planning to 
> separate the "controller" related concerns (like allowPaths and 
> redirectPath functions) into a new filter named ControlFilter.
> But, shouldn't the ControlFilter be executed before the ContextFilter?
> Will it conflict with the behavior of the CatalogUrlFilter and other 
> filters?
>
> Jacopo
>
> On Sun, Sep 11, 2016 at 8:13 AM, Shi Jinghai <huaru...@hotmail.com> wrote:
>
> > Great, Jacopo!
> >
> > I think it would be better to separate the allowPaths and 
> > redirectPath functions to a new filter. If ContextFilter be the 1st 
> > filter, the new filter will be the last I guess. Between them, 
> > CatalogUrlFilter and etc.
> > will be there.
> >
> > Kind Regards,
> >
> > Shi Jinghai
> >
> > -邮件原件-
> > 发件人: Jacopo Cappellato [mailto:jacopo.cappell...@hotwaxsystems.com]
> > 发送时间: 2016年9月9日 16:07
> > 收件人: dev@ofbiz.apache.org
> > 主题: Ideas about OFBiz servlet filters
> >
> > A web application, in order to leverage the OFBiz framework, 
> > requires that a series of objects are in its contexts (servlet 
> > context, session and
> > request) such as "delegator", "delegatorName", "dispatcher", "security"
> > etc. etc...
> > This setup is performed by the logic contained in the servlet filter 
> > implemented by the following class:
> >
> > org.apache.ofbiz.webapp.control.ContextFilter
> >
> > The execution of this logic is required for the application to run 
> > properly.
> > However, this filter is deployed in most but not all the web 
> > application in the OFBiz codebase: there are few exceptions due to 
> > the fact that a few web applications require the execution of other 
> > filters
> (e.g.
> > CatalogUrlFilter, etc...).
> >
> > Unfortunately the way these filters have been implemented have 
> > issues
> > including:
> > * some of them extend the ContextFilter and override its behavior by 
> > copying some logic and adding new one; in these cases the 
> > ContextFilter is also deployed but after the execution of the 
> > extended filter
> > * some of them have been copied from ContextFilter and then adapted, 
> > introducing a lot of redundant code difficult to maintain; in these 
> > cases the ContextFilter is not deployed
> >
> > There is now a chance for the community to help cleaning up these 
> > classes and I am proposing the following guidelines:
> >
> > 1) servlet filters should be chained (rather than extended or
> > replaced)
> > 2) ContextFilter should always be used and should always be the 
&g

Re: Ideas about OFBiz servlet filters

2016-09-13 Thread Shi Jinghai
Hi Jacopo,

Thanks for your consideration!

I like the name ControlFilter. On the sequence of the filters, personally I 
think it's a policy for entrance. If put the ControlFilter 1st, it's a strict 
control. If put it last, it's a loose control. Anyway, we need it.

When you complete, I will try to change SEO and solr filters to follow your 
update.

Kind Regards,

Shi Jinghai


-邮件原件-
发件人: Jacopo Cappellato [mailto:jacopo.cappell...@hotwaxsystems.com] 
发送时间: 2016年9月13日 16:30
收件人: dev@ofbiz.apache.org
主题: Re: Ideas about OFBiz servlet filters

Thank you Jinghai,

I agree we should separate the concerns and split the ContextFilter into two 
filters; I am going to work on this and I am planning to separate the 
"controller" related concerns (like allowPaths and redirectPath functions) into 
a new filter named ControlFilter.
But, shouldn't the ControlFilter be executed before the ContextFilter? Will it 
conflict with the behavior of the CatalogUrlFilter and other filters?

Jacopo

On Sun, Sep 11, 2016 at 8:13 AM, Shi Jinghai <huaru...@hotmail.com> wrote:

> Great, Jacopo!
>
> I think it would be better to separate the allowPaths and redirectPath 
> functions to a new filter. If ContextFilter be the 1st filter, the new 
> filter will be the last I guess. Between them, CatalogUrlFilter and etc.
> will be there.
>
> Kind Regards,
>
> Shi Jinghai
>
> -邮件原件-
> 发件人: Jacopo Cappellato [mailto:jacopo.cappell...@hotwaxsystems.com]
> 发送时间: 2016年9月9日 16:07
> 收件人: dev@ofbiz.apache.org
> 主题: Ideas about OFBiz servlet filters
>
> A web application, in order to leverage the OFBiz framework, requires 
> that a series of objects are in its contexts (servlet context, session 
> and
> request) such as "delegator", "delegatorName", "dispatcher", "security"
> etc. etc...
> This setup is performed by the logic contained in the servlet filter 
> implemented by the following class:
>
> org.apache.ofbiz.webapp.control.ContextFilter
>
> The execution of this logic is required for the application to run 
> properly.
> However, this filter is deployed in most but not all the web 
> application in the OFBiz codebase: there are few exceptions due to the 
> fact that a few web applications require the execution of other filters (e.g.
> CatalogUrlFilter, etc...).
>
> Unfortunately the way these filters have been implemented have issues
> including:
> * some of them extend the ContextFilter and override its behavior by 
> copying some logic and adding new one; in these cases the 
> ContextFilter is also deployed but after the execution of the extended 
> filter
> * some of them have been copied from ContextFilter and then adapted, 
> introducing a lot of redundant code difficult to maintain; in these 
> cases the ContextFilter is not deployed
>
> There is now a chance for the community to help cleaning up these 
> classes and I am proposing the following guidelines:
>
> 1) servlet filters should be chained (rather than extended or 
> replaced)
> 2) ContextFilter should always be used and should always be the first
> (OFBiz) filter in the chain
> 3) if some of the behavior/logic of ContextFilter conflicts with the 
> ones of other filters, then ContextFilter should be enhanced to 
> prevent that (e.g. we can improve the code, move some of its logic in 
> a separate filter that can be executed after etc...)
> 4) the other filters should work well after the ContextFilter and add 
> behavior rather than overriding behavior or duplicating behavior
>
> As a beneficial side effect of this effort, we will get a cleaner 
> picture (documented by the logic of ContextFilter) of all the context 
> objects required by OFBiz web applications.
>
> I hope it helps
>
> Jacopo
>


Re: Ideas about OFBiz servlet filters

2016-09-11 Thread Shi Jinghai
Great, Jacopo!

I think it would be better to separate the allowPaths and redirectPath 
functions to a new filter. If ContextFilter be the 1st filter, the new filter 
will be the last I guess. Between them, CatalogUrlFilter and etc. will be there.

Kind Regards,

Shi Jinghai

-邮件原件-
发件人: Jacopo Cappellato [mailto:jacopo.cappell...@hotwaxsystems.com] 
发送时间: 2016年9月9日 16:07
收件人: dev@ofbiz.apache.org
主题: Ideas about OFBiz servlet filters

A web application, in order to leverage the OFBiz framework, requires that a 
series of objects are in its contexts (servlet context, session and
request) such as "delegator", "delegatorName", "dispatcher", "security"
etc. etc...
This setup is performed by the logic contained in the servlet filter 
implemented by the following class:

org.apache.ofbiz.webapp.control.ContextFilter

The execution of this logic is required for the application to run properly.
However, this filter is deployed in most but not all the web application in the 
OFBiz codebase: there are few exceptions due to the fact that a few web 
applications require the execution of other filters (e.g. CatalogUrlFilter, 
etc...).

Unfortunately the way these filters have been implemented have issues
including:
* some of them extend the ContextFilter and override its behavior by copying 
some logic and adding new one; in these cases the ContextFilter is also 
deployed but after the execution of the extended filter
* some of them have been copied from ContextFilter and then adapted, 
introducing a lot of redundant code difficult to maintain; in these cases the 
ContextFilter is not deployed

There is now a chance for the community to help cleaning up these classes and I 
am proposing the following guidelines:

1) servlet filters should be chained (rather than extended or replaced)
2) ContextFilter should always be used and should always be the first
(OFBiz) filter in the chain
3) if some of the behavior/logic of ContextFilter conflicts with the ones of 
other filters, then ContextFilter should be enhanced to prevent that (e.g. we 
can improve the code, move some of its logic in a separate filter that can be 
executed after etc...)
4) the other filters should work well after the ContextFilter and add behavior 
rather than overriding behavior or duplicating behavior

As a beneficial side effect of this effort, we will get a cleaner picture 
(documented by the logic of ContextFilter) of all the context objects required 
by OFBiz web applications.

I hope it helps

Jacopo


Re: svn commit: r1700119 [1/26] - in /ofbiz/trunk: ./ runtime/indexes/ specialpurpose/ specialpurpose/solr/ specialpurpose/solr/conf/ specialpurpose/solr/config/ specialpurpose/solr/entitydef/ special

2016-09-08 Thread Shi Jinghai
I agree completely. I'll work on them this weekend.

-邮件原件-
发件人: Jacopo Cappellato [mailto:jacopo.cappell...@hotwaxsystems.com] 
发送时间: 2016年9月8日 21:14
收件人: dev@ofbiz.apache.org
主题: Re: svn commit: r1700119 [1/26] - in /ofbiz/trunk: ./ runtime/indexes/ 
specialpurpose/ specialpurpose/solr/ specialpurpose/solr/conf/ 
specialpurpose/solr/config/ specialpurpose/solr/entitydef/ 
specialpurpose/solr/lib/ specialpurpose/solr/lib/compile/ s...

On Tue, Sep 6, 2016 at 12:10 PM, Shi Jinghai <huaru...@hotmail.com> wrote:

> Hi Jacopo,
>
> I cleaned OFBizSolrContextFilter.java and submitted in rev. 1759401.
> Please check if it's required to do a further refactoring.
>
> Kind Regards,
>
> Shi Jinghai
>
>
Thank you, Jinghai.
I still see a lot of code that is duplicated.
Also, I don't think it is a good idea to have a servlet filter that initializes 
another filter within its init method:

contextFilter = new ContextFilter();
contextFilter.init(config);

The initialization of filters should be left to the servlet container (e.g. 
Tomcat) based on the configuration in web.xml.

As regards the duplication of code, it affects unfortunately several other 
filters in OFBiz, like SeoContextFilter, CatalogUrlSeoFilter etc... I think 
that all these classes need a serious cleanup.

I will start a separate thread to discuss this topic.

Kind regards,

Jacopo


Re: svn commit: r1700119 [1/26] - in /ofbiz/trunk: ./ runtime/indexes/ specialpurpose/ specialpurpose/solr/ specialpurpose/solr/conf/ specialpurpose/solr/config/ specialpurpose/solr/entitydef/ special

2016-09-06 Thread Shi Jinghai
Hi Jacopo,

I cleaned OFBizSolrContextFilter.java and submitted in rev. 1759401. Please 
check if it's required to do a further refactoring.

Kind Regards,

Shi Jinghai

-邮件原件-
发件人: Shi Jinghai [mailto:huaru...@hotmail.com] 
发送时间: 2016年9月6日 13:43
收件人: dev@ofbiz.apache.org
主题: Re: svn commit: r1700119 [1/26] - in /ofbiz/trunk: ./ runtime/indexes/ 
specialpurpose/ specialpurpose/solr/ specialpurpose/solr/conf/ 
specialpurpose/solr/config/ specialpurpose/solr/entitydef/ 
specialpurpose/solr/lib/ specialpurpose/solr/lib/compile/ s...

Hi Jacopo,

Let me clean the OFBizSolrContextFilter now.

Kind Regards,

Shi Jinghai


-邮件原件-
发件人: Jacopo Cappellato [mailto:jacopo.cappell...@hotwaxsystems.com] 
发送时间: 2016年9月5日 22:20
收件人: dev@ofbiz.apache.org
主题: Re: svn commit: r1700119 [1/26] - in /ofbiz/trunk: ./ runtime/indexes/ 
specialpurpose/ specialpurpose/solr/ specialpurpose/solr/conf/ 
specialpurpose/solr/config/ specialpurpose/solr/entitydef/ 
specialpurpose/solr/lib/ specialpurpose/solr/lib/compile/ s...

Hi Jinghai,

I have noticed that when you have committed the Solr component you have created 
a class named OFBizSolrContextFilter.java that is mostly the copy of 
ContextFilter: as a consequence the logic implemented in its utility methods 
has been duplicated.
I didn't check, but it is possible that other code in this commit is affected 
by the same anti pattern.
This is making the maintenance of the code more difficult: for example, I am in 
the process of cleaning/refactoring the code in ContextFilter and I am not sure 
how to deal with the same copy of it in OFBizSolrContextFilter.

Is there anything you can do to fix this?

Thank you,

Jacopo


On Sun, Aug 30, 2015 at 3:27 PM, <sh...@apache.org> wrote:

> Author: shijh
> Date: Sun Aug 30 13:27:07 2015
> New Revision: 1700119
>
> URL: http://svn.apache.org/r1700119
> Log:
> OFBIZ-5042 Apache Solr Implementation.
> 1. Put the patch into trunk.
> 2. Added access control to solr /admin/ pages.
> 3. Upgraded solr to 4.9.0 to match Lucene version in trunk.
> 4. Removed solr.solr.home, used
> SolrResourceLoader loader = new SolrResourceLoader("
> specialpurpose/solr/conf");
> instead.
>
> Added:
> ...

   ofbiz/trunk/specialpurpose/solr/src/org/ofbiz/solr/
> webapp/OFBizSolrContextFilter.java   (with props)
>


Re: svn commit: r1700119 [1/26] - in /ofbiz/trunk: ./ runtime/indexes/ specialpurpose/ specialpurpose/solr/ specialpurpose/solr/conf/ specialpurpose/solr/config/ specialpurpose/solr/entitydef/ special

2016-09-05 Thread Shi Jinghai
Hi Jacopo,

Let me clean the OFBizSolrContextFilter now.

Kind Regards,

Shi Jinghai


-邮件原件-
发件人: Jacopo Cappellato [mailto:jacopo.cappell...@hotwaxsystems.com] 
发送时间: 2016年9月5日 22:20
收件人: dev@ofbiz.apache.org
主题: Re: svn commit: r1700119 [1/26] - in /ofbiz/trunk: ./ runtime/indexes/ 
specialpurpose/ specialpurpose/solr/ specialpurpose/solr/conf/ 
specialpurpose/solr/config/ specialpurpose/solr/entitydef/ 
specialpurpose/solr/lib/ specialpurpose/solr/lib/compile/ s...

Hi Jinghai,

I have noticed that when you have committed the Solr component you have created 
a class named OFBizSolrContextFilter.java that is mostly the copy of 
ContextFilter: as a consequence the logic implemented in its utility methods 
has been duplicated.
I didn't check, but it is possible that other code in this commit is affected 
by the same anti pattern.
This is making the maintenance of the code more difficult: for example, I am in 
the process of cleaning/refactoring the code in ContextFilter and I am not sure 
how to deal with the same copy of it in OFBizSolrContextFilter.

Is there anything you can do to fix this?

Thank you,

Jacopo


On Sun, Aug 30, 2015 at 3:27 PM, <sh...@apache.org> wrote:

> Author: shijh
> Date: Sun Aug 30 13:27:07 2015
> New Revision: 1700119
>
> URL: http://svn.apache.org/r1700119
> Log:
> OFBIZ-5042 Apache Solr Implementation.
> 1. Put the patch into trunk.
> 2. Added access control to solr /admin/ pages.
> 3. Upgraded solr to 4.9.0 to match Lucene version in trunk.
> 4. Removed solr.solr.home, used
> SolrResourceLoader loader = new SolrResourceLoader("
> specialpurpose/solr/conf");
> instead.
>
> Added:
> ...

   ofbiz/trunk/specialpurpose/solr/src/org/ofbiz/solr/
> webapp/OFBizSolrContextFilter.java   (with props)
>


Re: svn commit: r1759155 - /ofbiz/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java

2016-09-04 Thread Shi Jinghai
Hi Taher,

Yes, it's for OFBIZ-8137.

Good questions on why adding a dot. Honest, I don't think it's in our entity 
name conventions, maybe it's safe to use it here.

Kind Regards,

Shi Jinghai


-邮件原件-
发件人: Taher Alkhateeb [mailto:slidingfilame...@gmail.com] 
发送时间: 2016年9月4日 17:15
收件人: OFBIZ Development Mailing List
主题: Re: svn commit: r1759155 - 
/ofbiz/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java

Hi Shi,

I can see this is related to OFBIZ-8137 right?

Anyway, are you sure this is the correct fix? The original condition says if 
the table name does not start with the schema name, then append the schema 
name. This is used because Postgres 7.3 did not include the schema name. Your 
fix is to add the schema name followed by "dot" right? What if the table name 
contains the schema name followed by a dot (it is a legal
character) then you are back to the same issue no?

Maybe I missed something that you caught while debugging, but just wanted to 
highlight because the fix seems a bit odd.

Taher Alkhateeb

On Sun, Sep 4, 2016 at 11:57 AM, <sh...@apache.org> wrote:

> Author: shijh
> Date: Sun Sep  4 08:57:44 2016
> New Revision: 1759155
>
> URL: http://svn.apache.org/viewvc?rev=1759155=rev
> Log:
> OFBIZ-8137 Entityname starts with schema name causes error in 
> PostgreSQL
>
> Modified:
> ofbiz/trunk/framework/entity/src/main/java/org/apache/
> ofbiz/entity/jdbc/DatabaseUtil.java
>
> Modified: ofbiz/trunk/framework/entity/src/main/java/org/apache/
> ofbiz/entity/jdbc/DatabaseUtil.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/
> src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java?rev=17591
> 55&
> r1=1759154=1759155=diff
> 
> ==
> --- ofbiz/trunk/framework/entity/src/main/java/org/apache/
> ofbiz/entity/jdbc/DatabaseUtil.java (original)
> +++ ofbiz/trunk/framework/entity/src/main/java/org/apache/
> ofbiz/entity/jdbc/DatabaseUtil.java Sun Sep  4 08:57:44 2016 @@ 
> -1001,7 +1001,7 @@ public class DatabaseUtil {
>  String tableName = tableSet.getString("TABLE_NAME");
>  // for those databases which do not return the 
> schema name with the table name (pgsql 7.3)
>  boolean appendSchemaName = false;
> -if (tableName != null && lookupSchemaName != null &&
> !tableName.startsWith(lookupSchemaName)) {
> +if (tableName != null && lookupSchemaName != null 
> + &&
> !tableName.startsWith(lookupSchemaName + "\\.")) {
>  appendSchemaName = true;
>  }
>  if (needsUpperCase && tableName != null) { @@ 
> -3042,7 +3042,7 @@ public class DatabaseUtil {
>  String tableName = rawTableName;
>  // for those databases which do not return the schema 
> name with the table name (pgsql 7.3)
>  boolean appendSchemaName = false;
> -if (tableName != null && lookupSchemaName != null &&
> !tableName.startsWith(lookupSchemaName)) {
> +if (tableName != null && lookupSchemaName != null &&
> !tableName.startsWith(lookupSchemaName + "\\.")) {
>  appendSchemaName = true;
>  }
>  if (needsUpperCase && tableName != null) {
>
>
>


Re: Michael Brohl joins OFBiz PMC

2016-09-04 Thread Shi Jinghai
Congratulations Michael

-邮件原件-
发件人: Sharan Foga [mailto:sharan.f...@gmail.com] 
发送时间: 2016年9月2日 18:37
收件人: dev@ofbiz.apache.org
主题: Michael Brohl joins OFBiz PMC

Hi Everyone

Please join me in welcoming Michael Brohl as our newest member of the OFBiz PMC.

Congratulations Michael and welcome! :-)

Thanks
Sharan


  1   2   3   4   >