[
https://jira.jboss.org/jira/browse/JBESB-1918?page=com.atlassian.jira.plu...
]
Kevin Conner commented on JBESB-1918:
-------------------------------------
"Jiri> - BSFManager should be created in intialize(), not process() method (credit
goes to Kevin :-))
Nope. Unfortunately in BSF the BSFManager itself holds references to the declared beans.
In our case, this includes the JBoss ESB "Message" object. In looking at
BSFManager code, it is apparent it is not thread safe. Thus, a new BSFManager must be
created during each process() method. Sorry. "
I have to admit that when I suggested we investigate this it was under the assumption that
BSF would offer some means of precompiling scripts for execution, an assumption that I
thought was reasonable. It appears this is not the case.
BSF does have a compileScript method but this appears to have very limited functionality
(generating java code to call the interpreter's exec method mostly).
I know that JSR 223 defines a Compilable interface (albeit optional) which would allow us
to drop the repeated interpretation of the scripts, is there a reason why BSF was chosen
over JSR 223?
Implementation of ScriptingAction is inefficient and incomplete
---------------------------------------------------------------
Key: JBESB-1918
URL:
https://jira.jboss.org/jira/browse/JBESB-1918
Project: JBoss ESB
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Rosetta
Affects Versions: 4.4
Reporter: Jiri Pechanec
Assignee: Mark Little
Fix For: 4.4 CP1
Attachments: jbossesb-scripting-enhancements.zip, Scripting.odt, Scripting.pdf
The ScriptingAction should be polished for beter perfromance and functionality as Groovy
scripting action
- BSFManager should be created in intialize(), not process() method (credit goes to
Kevin :-))
- The script reload should be supported
- Is it necessary to process BSF config file? Cannot we use getLangFromFilename method?
- It should be probably stated in the docs that for compiled scriping languages it is
not guranteed that the compliation is done only once which can lead to performance
degradation - native action can be preferred in such case
- If the language is not recognized (not in Map) during initialization an exception
should be thrown. Currently it is supposed that the file extension is language name, which
is probably unintentional, and could lead to exception while processing the first message.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira