commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Biestro (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (JEXL-94) Allow stateful namespaces (ns:function)
Date Mon, 14 Dec 2009 17:43:18 GMT

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

Henri Biestro resolved JEXL-94.
-------------------------------

    Resolution: Fixed

URL: http://svn.apache.org/viewvc?rev=890409&view=rev
Log:
fixed JEXL-94; modified test accordingly. Also fixed a bug in
MethodKey#isApplicable that surfaced through test.

Modified:
    commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/Interpreter.java
    commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/JexlEngine.java
    commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/internal/introspection/MethodKey.java
    commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/MethodTest.java


> Allow stateful namespaces (ns:function) 
> ----------------------------------------
>
>                 Key: JEXL-94
>                 URL: https://issues.apache.org/jira/browse/JEXL-94
>             Project: Commons JEXL
>          Issue Type: Improvement
>            Reporter: Henri Biestro
>            Assignee: Henri Biestro
>             Fix For: 2.0
>
>
> The current basic behavior of namespaces only allows stateless execution.
> In some cases, this is not convenient enough (SCXML for instance); by having namespaces
instantiated at script/expression evaluation time and passing the JexlContext as their constructor
argument, the namespace can define members that functions (namespace methods) can use. It
makes namespaces almost as potent as regular JexlContext variables, full blown objects.
> Convention will be that a namespace whose value is a class having a constructor that
uses a JexlContext as argument is such a 'stateful' namespace.
> They are instantiated on need and their lifetime spans the evaluation call.
> Experience suggests that the JexlContext should probably be derived to contain the information
necessary to instantiate the namespace without polluting the variable space.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message