[jira] [Commented] (CLK-306) Replacing OGNL with MVEL
[
https://issues.apache.org/jira/browse/CLK-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13799429#comment-13799429
]
Gilberto C Andrade commented on CLK-306:
I've found the problem, I think:
{code:title=PropertyServicePerformanceTest.java|borderStyle=solid}
public void test_MVELService() throws Exception {
PropertyService ps = new MVELPropertyService();
for (int i = 0; i < 100; i++) {
Thread testThread = new Thread(new TestRunner(ps, i ==
49));
testThread.start();
}
Thread.sleep(1);
}
public void test_OGNLService() throws Exception {
readDuration.set(0);
writeDuration.set(0);
PropertyService ps = new OGNLPropertyService();
for (int i = 0; i < 50; i++) {
Thread testThread = new Thread(new TestRunner(ps, i ==
49));
testThread.start();
}
Thread.sleep(1);
}
{code}
The for loop in the MVEL test has 100 as limit while in the OGNL has only 50.
And this complex code to test the performance has some problem: if you run it
twice it will invert the winner.
> Replacing OGNL with MVEL
>
>
> Key: CLK-306
> URL: https://issues.apache.org/jira/browse/CLK-306
> Project: Click
> Issue Type: New Feature
> Components: core
>Affects Versions: 1.4
> Environment: Target Click 1.5
>Reporter: Bob Schellink
>Assignee: Malcolm Edgar
> Fix For: 2.4.0-RC1
>
> Attachments:
> ASF.LICENSE.NOT.GRANTED--expression-language-performance.rar,
> ASF.LICENSE.NOT.GRANTED--expression-language-performance.zip, mvel.zip,
> patch.diff
>
>
> I have been following both OGNL and MVEL (another expression language)
> development the last couple of months. If we are going to make changes to
> this here are some things you might find interesting:
> * OGNL 2.7.1 which is included in tapestry 4.1, now sports byte code
> enhancement. This was added by one of the tapestry authors to make OGNL much
> faster than its reflection mode. However in my testing 2.7.1 threw exceptions
> every now and then. So still buggy.
> * MVEL (http://mvel.codehaus.org/) seems like a good replacement for OGNL. It
> has good docs and is actively developed. They even fixed a bug I logged! Like
> OGNL, MVEL also runs in two modes, either reflection or byte compiled. Unlike
> OGNL, MVEL's reflection mode is faster than Click's reflection mode.
> I am no expert on this but according to the article below (from MVEL's
> author), byte code enhancement have some problems in that generated classes
> accumulate in java's perm space and will only be removed when their
> classloader is removed.
> http://artexpressive.blogspot.com/2007/07/mvel-by-numbers-real-story.html
> So MVEL in reflection mode looks like an ideal solution here. The power of
> OGNL with the performance of Click reflection.
> Table columns can again take advantage of expressions. For example to
> aggregate a total for the row -> new Column("price * tax");
--
This message was sent by Atlassian JIRA
(v6.1#6144)
[jira] [Commented] (CLK-306) Replacing OGNL with MVEL
[
https://issues.apache.org/jira/browse/CLK-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13635400#comment-13635400
]
Gilberto C Andrade commented on CLK-306:
I thought MVEL would be more performatic!
But:
[CODE]
gilberto.andrade@A37710:~/bin/click-trunk$ uname -a
Linux A37710.ADMINISTRACAO 3.7.10-1.1-desktop #1 SMP PREEMPT Thu Feb 28
15:06:29 UTC 2013 (82d3f21) x86_64 x86_64 x86_64 GNU/Linux
gilberto.andrade@A37710:~/bin/click-trunk$ javac -version
javac 1.7.0_17
gilberto.andrade@A37710:~/bin/click-trunk$ javac -version
gilberto.andrade@A37710:~/bin/click-trunk$ cat
framework/classes/TEST-org.apache.click.service.PropertyServicePerformanceTest.txt
Testsuite: org.apache.click.service.PropertyServicePerformanceTest
Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 20,103 sec
- Standard Error -
OGNLPropertyService cumulative read test in 59599 ms
OGNLPropertyService cumulative write test in 27741 ms
MVELPropertyService cumulative read test in 97231 ms
MVELPropertyService cumulative write test in 27145 ms
- ---
Testcase: test_OGNLService took 10,017 sec
Testcase: test_MVELService took 10,079 sec
[/CODE]
Bob, would you mind to make your test again?
regards
> Replacing OGNL with MVEL
>
>
> Key: CLK-306
> URL: https://issues.apache.org/jira/browse/CLK-306
> Project: Click
> Issue Type: New Feature
> Components: core
>Affects Versions: 1.4
> Environment: Target Click 1.5
>Reporter: Bob Schellink
>Assignee: Malcolm Edgar
> Fix For: 2.4.0-RC1
>
> Attachments:
> ASF.LICENSE.NOT.GRANTED--expression-language-performance.rar,
> ASF.LICENSE.NOT.GRANTED--expression-language-performance.zip, mvel.zip,
> patch.diff
>
>
> I have been following both OGNL and MVEL (another expression language)
> development the last couple of months. If we are going to make changes to
> this here are some things you might find interesting:
> * OGNL 2.7.1 which is included in tapestry 4.1, now sports byte code
> enhancement. This was added by one of the tapestry authors to make OGNL much
> faster than its reflection mode. However in my testing 2.7.1 threw exceptions
> every now and then. So still buggy.
> * MVEL (http://mvel.codehaus.org/) seems like a good replacement for OGNL. It
> has good docs and is actively developed. They even fixed a bug I logged! Like
> OGNL, MVEL also runs in two modes, either reflection or byte compiled. Unlike
> OGNL, MVEL's reflection mode is faster than Click's reflection mode.
> I am no expert on this but according to the article below (from MVEL's
> author), byte code enhancement have some problems in that generated classes
> accumulate in java's perm space and will only be removed when their
> classloader is removed.
> http://artexpressive.blogspot.com/2007/07/mvel-by-numbers-real-story.html
> So MVEL in reflection mode looks like an ideal solution here. The power of
> OGNL with the performance of Click reflection.
> Table columns can again take advantage of expressions. For example to
> aggregate a total for the row -> new Column("price * tax");
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CLK-306) Replacing OGNL with MVEL
[
https://issues.apache.org/jira/browse/CLK-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13582017#comment-13582017
]
jack hexy commented on CLK-306:
---
hi,make an effort,I wish you succeed and enjoy in it,with best regards!
> Replacing OGNL with MVEL
>
>
> Key: CLK-306
> URL: https://issues.apache.org/jira/browse/CLK-306
> Project: Click
> Issue Type: New Feature
> Components: core
>Affects Versions: 1.4
> Environment: Target Click 1.5
>Reporter: Bob Schellink
>Assignee: Malcolm Edgar
> Fix For: 2.4.0-RC1
>
> Attachments:
> ASF.LICENSE.NOT.GRANTED--expression-language-performance.rar,
> ASF.LICENSE.NOT.GRANTED--expression-language-performance.zip, mvel.zip
>
>
> I have been following both OGNL and MVEL (another expression language)
> development the last couple of months. If we are going to make changes to
> this here are some things you might find interesting:
> * OGNL 2.7.1 which is included in tapestry 4.1, now sports byte code
> enhancement. This was added by one of the tapestry authors to make OGNL much
> faster than its reflection mode. However in my testing 2.7.1 threw exceptions
> every now and then. So still buggy.
> * MVEL (http://mvel.codehaus.org/) seems like a good replacement for OGNL. It
> has good docs and is actively developed. They even fixed a bug I logged! Like
> OGNL, MVEL also runs in two modes, either reflection or byte compiled. Unlike
> OGNL, MVEL's reflection mode is faster than Click's reflection mode.
> I am no expert on this but according to the article below (from MVEL's
> author), byte code enhancement have some problems in that generated classes
> accumulate in java's perm space and will only be removed when their
> classloader is removed.
> http://artexpressive.blogspot.com/2007/07/mvel-by-numbers-real-story.html
> So MVEL in reflection mode looks like an ideal solution here. The power of
> OGNL with the performance of Click reflection.
> Table columns can again take advantage of expressions. For example to
> aggregate a total for the row -> new Column("price * tax");
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CLK-306) Replacing OGNL with MVEL
[
https://issues.apache.org/jira/browse/CLK-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13248006#comment-13248006
]
Malcolm Edgar commented on CLK-306:
---
I think the solution to this is to introduce a pluggable PropertyService. I
will work on this unless anyone thinks otherwise, in terms of the default
service I think for the next release we should probably default to OGNL and in
a following release we can change this to MVEL once we get some more experience.
> Replacing OGNL with MVEL
>
>
> Key: CLK-306
> URL: https://issues.apache.org/jira/browse/CLK-306
> Project: Click
> Issue Type: New Feature
> Components: core
>Affects Versions: 1.4
> Environment: Target Click 1.5
>Reporter: Bob Schellink
>Assignee: Bob Schellink
> Fix For: 2.3.1
>
> Attachments: expression-language-performance.rar,
> expression-language-performance.zip, mvel.zip
>
>
> I have been following both OGNL and MVEL (another expression language)
> development the last couple of months. If we are going to make changes to
> this here are some things you might find interesting:
> * OGNL 2.7.1 which is included in tapestry 4.1, now sports byte code
> enhancement. This was added by one of the tapestry authors to make OGNL much
> faster than its reflection mode. However in my testing 2.7.1 threw exceptions
> every now and then. So still buggy.
> * MVEL (http://mvel.codehaus.org/) seems like a good replacement for OGNL. It
> has good docs and is actively developed. They even fixed a bug I logged! Like
> OGNL, MVEL also runs in two modes, either reflection or byte compiled. Unlike
> OGNL, MVEL's reflection mode is faster than Click's reflection mode.
> I am no expert on this but according to the article below (from MVEL's
> author), byte code enhancement have some problems in that generated classes
> accumulate in java's perm space and will only be removed when their
> classloader is removed.
> http://artexpressive.blogspot.com/2007/07/mvel-by-numbers-real-story.html
> So MVEL in reflection mode looks like an ideal solution here. The power of
> OGNL with the performance of Click reflection.
> Table columns can again take advantage of expressions. For example to
> aggregate a total for the row -> new Column("price * tax");
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CLK-306) Replacing OGNL with MVEL
[
https://issues.apache.org/jira/browse/CLK-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13247054#comment-13247054
]
Bob Schellink commented on CLK-306:
---
Yep that would make the test pass, however the test is about ensuring that the
binding occurs on private variables. OGNL supports this feature, MVEL does not
which is why we cannot simply replace OGNL with MVEL as it could break existing
applications.
> Replacing OGNL with MVEL
>
>
> Key: CLK-306
> URL: https://issues.apache.org/jira/browse/CLK-306
> Project: Click
> Issue Type: New Feature
> Components: core
>Affects Versions: 1.4
> Environment: Target Click 1.5
>Reporter: Bob Schellink
>Assignee: Bob Schellink
> Fix For: 2.3.1
>
> Attachments: expression-language-performance.rar,
> expression-language-performance.zip, mvel.zip
>
>
> I have been following both OGNL and MVEL (another expression language)
> development the last couple of months. If we are going to make changes to
> this here are some things you might find interesting:
> * OGNL 2.7.1 which is included in tapestry 4.1, now sports byte code
> enhancement. This was added by one of the tapestry authors to make OGNL much
> faster than its reflection mode. However in my testing 2.7.1 threw exceptions
> every now and then. So still buggy.
> * MVEL (http://mvel.codehaus.org/) seems like a good replacement for OGNL. It
> has good docs and is actively developed. They even fixed a bug I logged! Like
> OGNL, MVEL also runs in two modes, either reflection or byte compiled. Unlike
> OGNL, MVEL's reflection mode is faster than Click's reflection mode.
> I am no expert on this but according to the article below (from MVEL's
> author), byte code enhancement have some problems in that generated classes
> accumulate in java's perm space and will only be removed when their
> classloader is removed.
> http://artexpressive.blogspot.com/2007/07/mvel-by-numbers-real-story.html
> So MVEL in reflection mode looks like an ideal solution here. The power of
> OGNL with the performance of Click reflection.
> Table columns can again take advantage of expressions. For example to
> aggregate a total for the row -> new Column("price * tax");
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CLK-306) Replacing OGNL with MVEL
[
https://issues.apache.org/jira/browse/CLK-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216316#comment-13216316
]
Andrew Fink commented on CLK-306:
-
Malcolm Edgar wrote:
I think there are a couple of options here:
1. Rollback the changes to use OGNL,
2. Replace OGNL with MVEL, and stop supporting access to private variables
(could break a fair bit of code)
3. Have a pluggable PropertyService with OGNL and MVEL implementations (what
should be the default?)
Of these options I would prefer #3.
===
Pluggable PropertyService is very good idea! One can implement then Spring's
SpEL implementation too.
> Replacing OGNL with MVEL
>
>
> Key: CLK-306
> URL: https://issues.apache.org/jira/browse/CLK-306
> Project: Click
> Issue Type: New Feature
> Components: core
>Affects Versions: 1.4
> Environment: Target Click 1.5
>Reporter: Bob Schellink
>Assignee: Bob Schellink
> Fix For: 2.3.1
>
> Attachments: expression-language-performance.rar,
> expression-language-performance.zip
>
>
> I have been following both OGNL and MVEL (another expression language)
> development the last couple of months. If we are going to make changes to
> this here are some things you might find interesting:
> * OGNL 2.7.1 which is included in tapestry 4.1, now sports byte code
> enhancement. This was added by one of the tapestry authors to make OGNL much
> faster than its reflection mode. However in my testing 2.7.1 threw exceptions
> every now and then. So still buggy.
> * MVEL (http://mvel.codehaus.org/) seems like a good replacement for OGNL. It
> has good docs and is actively developed. They even fixed a bug I logged! Like
> OGNL, MVEL also runs in two modes, either reflection or byte compiled. Unlike
> OGNL, MVEL's reflection mode is faster than Click's reflection mode.
> I am no expert on this but according to the article below (from MVEL's
> author), byte code enhancement have some problems in that generated classes
> accumulate in java's perm space and will only be removed when their
> classloader is removed.
> http://artexpressive.blogspot.com/2007/07/mvel-by-numbers-real-story.html
> So MVEL in reflection mode looks like an ideal solution here. The power of
> OGNL with the performance of Click reflection.
> Table columns can again take advantage of expressions. For example to
> aggregate a total for the row -> new Column("price * tax");
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CLK-306) Replacing OGNL with MVEL
[
https://issues.apache.org/jira/browse/CLK-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13207652#comment-13207652
]
Gilberto C Andrade commented on CLK-306:
Have you seen that if you remove @Bindable annotation the test runs without
MVEL exception as well. I think the @Bindable annotation is the problem.
> Replacing OGNL with MVEL
>
>
> Key: CLK-306
> URL: https://issues.apache.org/jira/browse/CLK-306
> Project: Click
> Issue Type: New Feature
> Components: core
>Affects Versions: 1.4
> Environment: Target Click 1.5
>Reporter: Bob Schellink
>Assignee: Bob Schellink
> Fix For: 2.3.1
>
> Attachments: expression-language-performance.rar,
> expression-language-performance.zip
>
>
> I have been following both OGNL and MVEL (another expression language)
> development the last couple of months. If we are going to make changes to
> this here are some things you might find interesting:
> * OGNL 2.7.1 which is included in tapestry 4.1, now sports byte code
> enhancement. This was added by one of the tapestry authors to make OGNL much
> faster than its reflection mode. However in my testing 2.7.1 threw exceptions
> every now and then. So still buggy.
> * MVEL (http://mvel.codehaus.org/) seems like a good replacement for OGNL. It
> has good docs and is actively developed. They even fixed a bug I logged! Like
> OGNL, MVEL also runs in two modes, either reflection or byte compiled. Unlike
> OGNL, MVEL's reflection mode is faster than Click's reflection mode.
> I am no expert on this but according to the article below (from MVEL's
> author), byte code enhancement have some problems in that generated classes
> accumulate in java's perm space and will only be removed when their
> classloader is removed.
> http://artexpressive.blogspot.com/2007/07/mvel-by-numbers-real-story.html
> So MVEL in reflection mode looks like an ideal solution here. The power of
> OGNL with the performance of Click reflection.
> Table columns can again take advantage of expressions. For example to
> aggregate a total for the row -> new Column("price * tax");
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: [jira] [Commented] (CLK-306) Replacing OGNL with MVEL
I think there are a couple of options here: 1. Rollback the changes to use OGNL, 2. Replace OGNL with MVEL, and stop supporting access to private variables (could break a fair bit of code) 3. Have a pluggable PropertyService with OGNL and MVEL implementations (what should be the default?) Of these options I would prefer #3. regards Malcolm Edgar On Tue, Feb 14, 2012 at 4:41 PM, Bob Schellink wrote: > The point of the test is to ensure that private variables can be accessed. > MVEL doesn't seem to support access to private variables, hence we will > likely have to rollback to OGNL. > > regards > > Bob > > > On Mon, Feb 13, 2012 at 9:46 PM, Gilberto C Andrade (Commented) (JIRA) < > [email protected]> wrote: > >> >>[ >> https://issues.apache.org/jira/browse/CLK-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13207130#comment-13207130] >> >> Gilberto C Andrade commented on CLK-306: >> >> >> Digging a little in the issue, I've found the class[1] that make MVEL >> complain about permission as you can see in the log: >> >> [junit] at >> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:906) >>[junit] Caused by: [Error: could not access property (bool) in: >> java.lang.String] >>[junit] [Near : {... bool }] >>[junit] ^ >>[junit] [Line: 1, Column: 1] >>[junit] at >> org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeSetAccessor(ReflectiveAccessorOptimizer.java:312) >>[junit] at >> org.mvel2.optimizers.dynamic.DynamicOptimizer.optimizeSetAccessor(DynamicOptimizer.java:78) >>[junit] at >> org.mvel2.compiler.CompiledAccExpression.setValue(CompiledAccExpression.java:54) >>[junit] at >> org.mvel2.ast.DeepAssignmentNode.getReducedValueAccelerated(DeepAssignmentNode.java:91) >>[junit] at >> org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:42) >>[junit] at org.mvel2.MVEL.executeExpression(MVEL.java:969) >> >> >> >> If you change the access modifier of all fields(in the >> RequestBindingPage.java class) from private to public the test will pass. >> >> Thanks and good work, >> >> Gilberto >> >> [1] >> http://svn.apache.org/viewvc/click/trunk/click/framework/test/org/apache/click/pages/RequestBindingPage.java?revision=991908&view=markup >> >> >> > Replacing OGNL with MVEL >> > >> > >> > Key: CLK-306 >> > URL: https://issues.apache.org/jira/browse/CLK-306 >> > Project: Click >> > Issue Type: New Feature >> > Components: core >> >Affects Versions: 1.4 >> > Environment: Target Click 1.5 >> >Reporter: Bob Schellink >> >Assignee: Bob Schellink >> > Fix For: 2.3.1 >> > >> > Attachments: expression-language-performance.rar, >> expression-language-performance.zip >> > >> > >> > I have been following both OGNL and MVEL (another expression language) >> development the last couple of months. If we are going to make changes to >> this here are some things you might find interesting: >> > * OGNL 2.7.1 which is included in tapestry 4.1, now sports byte code >> enhancement. This was added by one of the tapestry authors to make OGNL >> much faster than its reflection mode. However in my testing 2.7.1 threw >> exceptions every now and then. So still buggy. >> > * MVEL (http://mvel.codehaus.org/) seems like a good replacement for >> OGNL. It has good docs and is actively developed. They even fixed a bug I >> logged! Like OGNL, MVEL also runs in two modes, either reflection or byte >> compiled. Unlike OGNL, MVEL's reflection mode is faster than Click's >> reflection mode. >> > I am no expert on this but according to the article below (from MVEL's >> author), byte code enhancement have some problems in that generated classes >> accumulate in java's perm space and will only be removed when their >> classloader is removed. >> > >> http://artexpressive.blogspot.com/2007/07/mvel-by-numbers-real-story.html >> > So MVEL in reflection mode looks like an ideal solution here. The power >> of OGNL with the performance of Click reflection. >> > Table columns can again take advantage of expressions. For example to >> aggregate a total for the row -> new Column("price * tax"); >> >> -- >> This message is automatically generated by JIRA. >> If you think it was sent incorrectly, please contact your JIRA >> administrators: >> https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa >> For more information on JIRA, see: http://www.atlassian.com/software/jira >> >> >> >
Re: [jira] [Commented] (CLK-306) Replacing OGNL with MVEL
The point of the test is to ensure that private variables can be accessed. MVEL doesn't seem to support access to private variables, hence we will likely have to rollback to OGNL. regards Bob On Mon, Feb 13, 2012 at 9:46 PM, Gilberto C Andrade (Commented) (JIRA) < [email protected]> wrote: > >[ > https://issues.apache.org/jira/browse/CLK-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13207130#comment-13207130] > > Gilberto C Andrade commented on CLK-306: > > > Digging a little in the issue, I've found the class[1] that make MVEL > complain about permission as you can see in the log: > > [junit] at > org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:906) >[junit] Caused by: [Error: could not access property (bool) in: > java.lang.String] >[junit] [Near : {... bool }] >[junit] ^ >[junit] [Line: 1, Column: 1] >[junit] at > org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeSetAccessor(ReflectiveAccessorOptimizer.java:312) >[junit] at > org.mvel2.optimizers.dynamic.DynamicOptimizer.optimizeSetAccessor(DynamicOptimizer.java:78) >[junit] at > org.mvel2.compiler.CompiledAccExpression.setValue(CompiledAccExpression.java:54) >[junit] at > org.mvel2.ast.DeepAssignmentNode.getReducedValueAccelerated(DeepAssignmentNode.java:91) >[junit] at > org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:42) >[junit] at org.mvel2.MVEL.executeExpression(MVEL.java:969) > > > > If you change the access modifier of all fields(in the > RequestBindingPage.java class) from private to public the test will pass. > > Thanks and good work, > > Gilberto > > [1] > http://svn.apache.org/viewvc/click/trunk/click/framework/test/org/apache/click/pages/RequestBindingPage.java?revision=991908&view=markup > > > > Replacing OGNL with MVEL > > > > > > Key: CLK-306 > > URL: https://issues.apache.org/jira/browse/CLK-306 > > Project: Click > > Issue Type: New Feature > > Components: core > >Affects Versions: 1.4 > > Environment: Target Click 1.5 > >Reporter: Bob Schellink > >Assignee: Bob Schellink > > Fix For: 2.3.1 > > > > Attachments: expression-language-performance.rar, > expression-language-performance.zip > > > > > > I have been following both OGNL and MVEL (another expression language) > development the last couple of months. If we are going to make changes to > this here are some things you might find interesting: > > * OGNL 2.7.1 which is included in tapestry 4.1, now sports byte code > enhancement. This was added by one of the tapestry authors to make OGNL > much faster than its reflection mode. However in my testing 2.7.1 threw > exceptions every now and then. So still buggy. > > * MVEL (http://mvel.codehaus.org/) seems like a good replacement for > OGNL. It has good docs and is actively developed. They even fixed a bug I > logged! Like OGNL, MVEL also runs in two modes, either reflection or byte > compiled. Unlike OGNL, MVEL's reflection mode is faster than Click's > reflection mode. > > I am no expert on this but according to the article below (from MVEL's > author), byte code enhancement have some problems in that generated classes > accumulate in java's perm space and will only be removed when their > classloader is removed. > > > http://artexpressive.blogspot.com/2007/07/mvel-by-numbers-real-story.html > > So MVEL in reflection mode looks like an ideal solution here. The power > of OGNL with the performance of Click reflection. > > Table columns can again take advantage of expressions. For example to > aggregate a total for the row -> new Column("price * tax"); > > -- > This message is automatically generated by JIRA. > If you think it was sent incorrectly, please contact your JIRA > administrators: > https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa > For more information on JIRA, see: http://www.atlassian.com/software/jira > > >
[jira] [Commented] (CLK-306) Replacing OGNL with MVEL
[
https://issues.apache.org/jira/browse/CLK-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13207130#comment-13207130
]
Gilberto C Andrade commented on CLK-306:
Digging a little in the issue, I've found the class[1] that make MVEL complain
about permission as you can see in the log:
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:906)
[junit] Caused by: [Error: could not access property (bool) in:
java.lang.String]
[junit] [Near : {... bool }]
[junit] ^
[junit] [Line: 1, Column: 1]
[junit] at
org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeSetAccessor(ReflectiveAccessorOptimizer.java:312)
[junit] at
org.mvel2.optimizers.dynamic.DynamicOptimizer.optimizeSetAccessor(DynamicOptimizer.java:78)
[junit] at
org.mvel2.compiler.CompiledAccExpression.setValue(CompiledAccExpression.java:54)
[junit] at
org.mvel2.ast.DeepAssignmentNode.getReducedValueAccelerated(DeepAssignmentNode.java:91)
[junit] at
org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:42)
[junit] at org.mvel2.MVEL.executeExpression(MVEL.java:969)
If you change the access modifier of all fields(in the RequestBindingPage.java
class) from private to public the test will pass.
Thanks and good work,
Gilberto
[1]
http://svn.apache.org/viewvc/click/trunk/click/framework/test/org/apache/click/pages/RequestBindingPage.java?revision=991908&view=markup
> Replacing OGNL with MVEL
>
>
> Key: CLK-306
> URL: https://issues.apache.org/jira/browse/CLK-306
> Project: Click
> Issue Type: New Feature
> Components: core
>Affects Versions: 1.4
> Environment: Target Click 1.5
>Reporter: Bob Schellink
>Assignee: Bob Schellink
> Fix For: 2.3.1
>
> Attachments: expression-language-performance.rar,
> expression-language-performance.zip
>
>
> I have been following both OGNL and MVEL (another expression language)
> development the last couple of months. If we are going to make changes to
> this here are some things you might find interesting:
> * OGNL 2.7.1 which is included in tapestry 4.1, now sports byte code
> enhancement. This was added by one of the tapestry authors to make OGNL much
> faster than its reflection mode. However in my testing 2.7.1 threw exceptions
> every now and then. So still buggy.
> * MVEL (http://mvel.codehaus.org/) seems like a good replacement for OGNL. It
> has good docs and is actively developed. They even fixed a bug I logged! Like
> OGNL, MVEL also runs in two modes, either reflection or byte compiled. Unlike
> OGNL, MVEL's reflection mode is faster than Click's reflection mode.
> I am no expert on this but according to the article below (from MVEL's
> author), byte code enhancement have some problems in that generated classes
> accumulate in java's perm space and will only be removed when their
> classloader is removed.
> http://artexpressive.blogspot.com/2007/07/mvel-by-numbers-real-story.html
> So MVEL in reflection mode looks like an ideal solution here. The power of
> OGNL with the performance of Click reflection.
> Table columns can again take advantage of expressions. For example to
> aggregate a total for the row -> new Column("price * tax");
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CLK-306) Replacing OGNL with MVEL
[
https://issues.apache.org/jira/browse/CLK-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13150260#comment-13150260
]
Andrew Fink commented on CLK-306:
-
+100
Also MVEL template engine can be used for internal/components templates, so
velocity (and many it's dependencies) can be removed from distribution.
> Replacing OGNL with MVEL
>
>
> Key: CLK-306
> URL: https://issues.apache.org/jira/browse/CLK-306
> Project: Click
> Issue Type: New Feature
> Components: core
>Affects Versions: 1.4
> Environment: Target Click 1.5
>Reporter: Bob Schellink
>Assignee: Bob Schellink
> Fix For: 2.3.1
>
> Attachments: expression-language-performance.rar,
> expression-language-performance.zip
>
>
> I have been following both OGNL and MVEL (another expression language)
> development the last couple of months. If we are going to make changes to
> this here are some things you might find interesting:
> * OGNL 2.7.1 which is included in tapestry 4.1, now sports byte code
> enhancement. This was added by one of the tapestry authors to make OGNL much
> faster than its reflection mode. However in my testing 2.7.1 threw exceptions
> every now and then. So still buggy.
> * MVEL (http://mvel.codehaus.org/) seems like a good replacement for OGNL. It
> has good docs and is actively developed. They even fixed a bug I logged! Like
> OGNL, MVEL also runs in two modes, either reflection or byte compiled. Unlike
> OGNL, MVEL's reflection mode is faster than Click's reflection mode.
> I am no expert on this but according to the article below (from MVEL's
> author), byte code enhancement have some problems in that generated classes
> accumulate in java's perm space and will only be removed when their
> classloader is removed.
> http://artexpressive.blogspot.com/2007/07/mvel-by-numbers-real-story.html
> So MVEL in reflection mode looks like an ideal solution here. The power of
> OGNL with the performance of Click reflection.
> Table columns can again take advantage of expressions. For example to
> aggregate a total for the row -> new Column("price * tax");
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CLK-306) Replacing OGNL with MVEL
[
https://issues.apache.org/jira/browse/CLK-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13143933#comment-13143933
]
Malcolm Edgar commented on CLK-306:
---
Currently failing unit test:
PageTest.testRequestParameterBinding() when trying to convert a "true" string
value to a Page boolean property.
May need to register a type converter:
http://mvel.codehaus.org/Type+Converters
DataConversion.addConversionHandler(Boolean.class, new CustomConverter());
> Replacing OGNL with MVEL
>
>
> Key: CLK-306
> URL: https://issues.apache.org/jira/browse/CLK-306
> Project: Click
> Issue Type: New Feature
> Components: core
>Affects Versions: 1.4
> Environment: Target Click 1.5
>Reporter: Bob Schellink
>Assignee: Bob Schellink
> Fix For: 2.3.1
>
> Attachments: expression-language-performance.rar,
> expression-language-performance.zip
>
>
> I have been following both OGNL and MVEL (another expression language)
> development the last couple of months. If we are going to make changes to
> this here are some things you might find interesting:
> * OGNL 2.7.1 which is included in tapestry 4.1, now sports byte code
> enhancement. This was added by one of the tapestry authors to make OGNL much
> faster than its reflection mode. However in my testing 2.7.1 threw exceptions
> every now and then. So still buggy.
> * MVEL (http://mvel.codehaus.org/) seems like a good replacement for OGNL. It
> has good docs and is actively developed. They even fixed a bug I logged! Like
> OGNL, MVEL also runs in two modes, either reflection or byte compiled. Unlike
> OGNL, MVEL's reflection mode is faster than Click's reflection mode.
> I am no expert on this but according to the article below (from MVEL's
> author), byte code enhancement have some problems in that generated classes
> accumulate in java's perm space and will only be removed when their
> classloader is removed.
> http://artexpressive.blogspot.com/2007/07/mvel-by-numbers-real-story.html
> So MVEL in reflection mode looks like an ideal solution here. The power of
> OGNL with the performance of Click reflection.
> Table columns can again take advantage of expressions. For example to
> aggregate a total for the row -> new Column("price * tax");
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
