You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Padraic Hannon (JIRA)" <ji...@apache.org> on 2007/11/26 19:58:42 UTC

[jira] Created: (SLING-110) Update Script System to be JSR-223 Compatible

Update Script System to be JSR-223 Compatible 
----------------------------------------------

                 Key: SLING-110
                 URL: https://issues.apache.org/jira/browse/SLING-110
             Project: Sling
          Issue Type: Improvement
          Components: microsling, Scripting
    Affects Versions: 2.0.0
            Reporter: Padraic Hannon


Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


Re: [jira] Commented: (SLING-110) Update Script System to be JSR-223Compatible

Posted by pi...@wasabicowboy.com.
Ok, I understand now :)

Thanks!
Paddy
Sent via BlackBerry from T-Mobile

-----Original Message-----
From: "Felix Meschberger (JIRA)" <ji...@apache.org>

Date: Tue, 4 Dec 2007 01:15:43 
To:sling-dev@incubator.apache.org
Subject: [jira] Commented: (SLING-110) Update Script System to be JSR-223
 Compatible



    [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548184 ] 

Felix Meschberger commented on SLING-110:
-----------------------------------------

> * Drop dependency on BSF in the API
> ** Does this mean that you want to remove the ScriptEngineManager
>    instance from the ScriptResolver classes?

I do not want to drop the BSF dependency completely - in fact this whole issue is about using BSF :-)

I just do not want the Sling API (in the api project) to have a BSF or Java Scripting dependency. I think it is not required in the Sling API to have such a dependency as the ScriptResolver returns a Script and the Script has an eval method.

The implementation of these interfaces will certainly require Java Scripting (BSF 3 that is) for the implementation. But from the point of view of the Sling API, this is an implementation detail.


> * Rename ScriptBindings to SlingBindings and extend HashMap<String, Object> 
>         instead of implementing Java Scripting Bindings.
> ** I do not understand why we do not want have the binding class implement the
>          scripting bindings interface? 

If SlingBindings would implement the BIndings interface, this would be the only reference to Java Scripting in the Sling API. As I intend to have Java Scripting dependency to be an implementation detail, I think, the SlingBindings, should not use Java Scripting API.

> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>         Attachments: bsf.patch, SLING-110_api.patch
>
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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

[jira] Issue Comment Edited: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Padraic Hannon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548023 ] 

hannonpi edited comment on SLING-110 at 12/3/07 2:38 PM:
---------------------------------------------------------------

A few questions/comments:

* Drop dependency on BSF in the API 
** Does this mean that you want to remove the ScriptEngineManager instance from the ScriptResolver classes?
* Rename ScriptBindings to SlingBindings and extend HashMap<String, Object> instead of implementing Java Scripting Bindings. 
** I do not understand why we do not want have the binding class implement the scripting bindings interface?
* Remove getReader method from SlingScript interface, as it is not externally used 
** Makes sense

      was (Author: hannonpi):
    A few questions:

1) Why not have bindings implement the scripting bindings interface?
2) 
  
> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>         Attachments: bsf.patch, SLING-110_api.patch
>
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


[jira] Issue Comment Edited: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Padraic Hannon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545667 ] 

hannonpi edited comment on SLING-110 at 11/26/07 5:18 PM:
----------------------------------------------------------------

Updated to remove SlingScriptEninge interface. Note the patch was created at the root level of the sling project.

      was (Author: hannonpi):
    Updated to remove SlingScriptEninge interface
  
> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>         Attachments: bsf.patch
>
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


[jira] Updated: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated SLING-110:
------------------------------------

    Attachment: SLING-110_api.patch

Slightly revised API changes:

   - Drop dependency on BSF in the API
   - Rename ScriptBindings to SlingBindings and extend HashMap<String, Object>
      instead of implementing Java Scripting Bindings.
   - Remove getReader method from SlingScript interface, as it is not externally used

The reason for dropping the BSF (actually Java Scripting) dependency is, that I consider this an implementation detail and not part of the API.

> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>         Attachments: bsf.patch, SLING-110_api.patch
>
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


[jira] Updated: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Padraic Hannon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Padraic Hannon updated SLING-110:
---------------------------------

    Attachment:     (was: bsf.patch)

> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>         Attachments: bsf.patch
>
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


[jira] Updated: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Padraic Hannon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Padraic Hannon updated SLING-110:
---------------------------------

    Attachment:     (was: bsf.patch)

> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


[jira] Commented: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548160 ] 

Felix Meschberger commented on SLING-110:
-----------------------------------------

> I think in my last patch I missed updating the DefaultSlingScriptResolver class

No problem. If we have the microsling resolver, we can always derive the other one.

> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>         Attachments: bsf.patch, SLING-110_api.patch
>
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


[jira] Commented: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Padraic Hannon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546379 ] 

Padraic Hannon commented on SLING-110:
--------------------------------------

Sure
--------------------------
Not sent from my iPhone



> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>         Attachments: bsf.patch
>
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


[jira] Commented: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Padraic Hannon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548023 ] 

Padraic Hannon commented on SLING-110:
--------------------------------------

Looks good, can we get the patch applied? Or does it need more work? Are there other sling apis that need updating for this change?

> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>         Attachments: bsf.patch, SLING-110_api.patch
>
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


[jira] Commented: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548184 ] 

Felix Meschberger commented on SLING-110:
-----------------------------------------

> * Drop dependency on BSF in the API
> ** Does this mean that you want to remove the ScriptEngineManager
>    instance from the ScriptResolver classes?

I do not want to drop the BSF dependency completely - in fact this whole issue is about using BSF :-)

I just do not want the Sling API (in the api project) to have a BSF or Java Scripting dependency. I think it is not required in the Sling API to have such a dependency as the ScriptResolver returns a Script and the Script has an eval method.

The implementation of these interfaces will certainly require Java Scripting (BSF 3 that is) for the implementation. But from the point of view of the Sling API, this is an implementation detail.


> * Rename ScriptBindings to SlingBindings and extend HashMap<String, Object> 
>         instead of implementing Java Scripting Bindings.
> ** I do not understand why we do not want have the binding class implement the
>          scripting bindings interface? 

If SlingBindings would implement the BIndings interface, this would be the only reference to Java Scripting in the Sling API. As I intend to have Java Scripting dependency to be an implementation detail, I think, the SlingBindings, should not use Java Scripting API.

> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>         Attachments: bsf.patch, SLING-110_api.patch
>
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


[jira] Updated: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Padraic Hannon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Padraic Hannon updated SLING-110:
---------------------------------

    Attachment: bsf.patch

Here is a patch, it is a first pass, and I think more refactoring is needed.

> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>         Attachments: bsf.patch
>
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


[jira] Updated: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated SLING-110:
------------------------------------

    Fix Version/s: 2.0.0

> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: API, Engine, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>            Assignee: Felix Meschberger
>             Fix For: 2.0.0
>
>         Attachments: bsf.patch, SLING-110_api.patch, SLING-110_API_2.patch
>
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


[jira] Closed: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger closed SLING-110.
-----------------------------------

    Resolution: Fixed

After having gotten microsling running with Java Scripting API and converting JSP support to Java Scripting API in Rev. 605183, this issue can be closed.

> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: API, microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>            Assignee: Felix Meschberger
>         Attachments: bsf.patch, SLING-110_api.patch, SLING-110_API_2.patch
>
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


[jira] Updated: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Padraic Hannon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Padraic Hannon updated SLING-110:
---------------------------------

    Comment: was deleted

> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>         Attachments: bsf.patch
>
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


[jira] Assigned: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger reassigned SLING-110:
---------------------------------------

    Assignee: Felix Meschberger

> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>            Assignee: Felix Meschberger
>         Attachments: bsf.patch, SLING-110_api.patch
>
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


[jira] Updated: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated SLING-110:
------------------------------------

    Attachment: SLING-110_API_2.patch

Updated Sling API Patch.

> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>            Assignee: Felix Meschberger
>         Attachments: bsf.patch, SLING-110_api.patch, SLING-110_API_2.patch
>
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


[jira] Updated: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Padraic Hannon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Padraic Hannon updated SLING-110:
---------------------------------

    Attachment: bsf.patch

This patch introduces eval(Map) to SlingScript and updates the MicroslingScriptResolver to call eval() on the script. 

Notes:

1) The MicroSlingScriptResolver still calls setEngine() on the script to give it a script engine. 
2) The MicroSlingScript class calls ScriptEngine.eval() takes the output and dumps it to the RESPONSE passed into the eval call via the RESPONSE property.




> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>         Attachments: bsf.patch
>
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


Re: [jira] Commented: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by Felix Meschberger <fm...@gmail.com>.
Hi,

Thanks alot for this. I will shortly look into the patch.

However, here are some first remarks:

Am Montag, den 26.11.2007, 11:00 -0800 schrieb Padraic Hannon (JIRA):
> Padraic Hannon commented on SLING-110:
> --------------------------------------
> 
> Currently I have a version which looks ok using the BSF 3.0-SNAPSHOT.
> However, I still have a custom SlingScriptEngine interface which I would like to get rid of. 

+1

If we are going to using Java Scripting, SlingScriptEngine interface is
not needed anymore and should be dropped.

> Also, I still have SlingScript having a getScriptEngine() method which I would like to remove.

+1

If there is no SlingScriptEngine anymore, there is no getScriptEngine. I
suggest, we add a method eval(Map<String, Object> props) which then
calls into  Java Scripting to evaluate the script and use the props as
bound variables. This way, sling/microsling just calls Script.eval to
call the script.

WDYT ?

>  One thing I do not like about BSF and JSR-223 is that the eval returns an object. I would much
>  rather eval to a writer and not load a string into memory just to flush out the wire.

Java Scripting is generic in that scripts may be used to calculate
results. As such there must be the possibility to return a value.
Generally we might want to ignore this value.

The writer to be used by scripts for sending back the response is
available as the "out" property in props.

Hope this helps.

Regards
Felix


[jira] Commented: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Padraic Hannon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545550 ] 

Padraic Hannon commented on SLING-110:
--------------------------------------

Currently I have a version which looks ok using the BSF 3.0-SNAPSHOT. However, I still have a custom SlingScriptEngine interface which I would like to get rid of. Also, I still have SlingScript having a getScriptEngine() method which I would like to remove. One thing I do not like about BSF and JSR-223 is that the eval returns an object. I would much rather eval to a writer and not load a string into memory just to flush out the wire.

> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


[jira] Commented: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Padraic Hannon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546403 ] 

Padraic Hannon commented on SLING-110:
--------------------------------------

Looking at the impl for MicroSlingScript it seems that the reader is fairly complex to create. Is there a use case for the Sling API where an outside party would be interested in getting the script's value as a Reader? It seems you are suggesting not, but I want to make sure.

> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>         Attachments: bsf.patch
>
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


[jira] Updated: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated SLING-110:
------------------------------------

    Component/s: API

This issue also has an influence on the Sling API

> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: API, microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>            Assignee: Felix Meschberger
>         Attachments: bsf.patch, SLING-110_api.patch, SLING-110_API_2.patch
>
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


[jira] Commented: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Padraic Hannon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548029 ] 

Padraic Hannon commented on SLING-110:
--------------------------------------

I think in my last patch I missed updating the DefaultSlingScriptResolver class from the core package. I will hold off on submitting a patch for that until we work through the above.

> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>         Attachments: bsf.patch, SLING-110_api.patch
>
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


[jira] Commented: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546371 ] 

Felix Meschberger commented on SLING-110:
-----------------------------------------

Thanks alot for this patch. I think this is very valuable for both Sling and BSF.

Just one question: Currently the SlingScript interface has three methods getResource(), eval() and getReader(). I think we can probably drop the getReader() method from the interface.

WDYT ?

> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>         Attachments: bsf.patch
>
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


[jira] Updated: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Padraic Hannon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Padraic Hannon updated SLING-110:
---------------------------------

    Attachment: bsf.patch

Updated to remove SlingScriptEninge interface

> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>         Attachments: bsf.patch
>
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


[jira] Commented: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Padraic Hannon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545668 ] 

Padraic Hannon commented on SLING-110:
--------------------------------------

I am still unsure if I like the fact that SlingScript has a getScriptEngine() method, it seems that the script resolver should handle this. However, I am wary of introducing such a change as it feels like a very fundamental change. Also, depending on the progress of BSF I can remove some of our script engines as BSF engines come online.

> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>         Attachments: bsf.patch
>
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


[jira] Issue Comment Edited: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Padraic Hannon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548023 ] 

hannonpi edited comment on SLING-110 at 12/3/07 2:36 PM:
---------------------------------------------------------------

A few questions:

1) Why not have bindings implement the scripting bindings interface?
2) 

      was (Author: hannonpi):
    Looks good, can we get the patch applied? Or does it need more work? Are there other sling apis that need updating for this change?
  
> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>         Attachments: bsf.patch, SLING-110_api.patch
>
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


[jira] Updated: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Padraic Hannon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Padraic Hannon updated SLING-110:
---------------------------------

    Attachment:     (was: bsf.patch)

> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


[jira] Issue Comment Edited: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Padraic Hannon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545668 ] 

hannonpi edited comment on SLING-110 at 11/27/07 4:10 PM:
----------------------------------------------------------------

I am still unsure if I like the fact that SlingScript has a getScriptEngine() method, it seems that the script resolver should handle this. However, I am wary of introducing such a change as it feels like a very fundamental change. Also, depending on the progress of BSF I can remove some of our script engines as BSF engines come online. 

Note: I did update getScriptEngine() to return javax.script.ScriptEngine.

      was (Author: hannonpi):
    I am still unsure if I like the fact that SlingScript has a getScriptEngine() method, it seems that the script resolver should handle this. However, I am wary of introducing such a change as it feels like a very fundamental change. Also, depending on the progress of BSF I can remove some of our script engines as BSF engines come online.
  
> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>         Attachments: bsf.patch
>
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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


[jira] Updated: (SLING-110) Update Script System to be JSR-223 Compatible

Posted by "Padraic Hannon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Padraic Hannon updated SLING-110:
---------------------------------

    Attachment: bsf.patch

This now does (per Felix's suggestion) the following:

*  MicroslingScript's eval method creates a ScriptContext and sets the writer for that context
* The microsling script then calls eval(getScriptReader(), context) on the script engine
* The script engines now return null and write directly to the set writer

> Update Script System to be JSR-223 Compatible 
> ----------------------------------------------
>
>                 Key: SLING-110
>                 URL: https://issues.apache.org/jira/browse/SLING-110
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling, Scripting
>    Affects Versions: 2.0.0
>            Reporter: Padraic Hannon
>         Attachments: bsf.patch
>
>
> Currently sling and microsling use a custom scripting framework. This framework should be updated to be jsr-223 compatible.

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