[
https://jira.jboss.org/jira/browse/JBESB-1918?page=com.atlassian.jira.plu...
]
David Ward commented on JBESB-1918:
-----------------------------------
I have yet to add documentation to this jira item. I'll have to do that tomorrow
night. I did upload a jbossesb-scripting-enhancements.zip file, however, with the
following contained therein.
ScriptingAction.java:
1. The LANGUAGES map was renamed to EXTN2LANG and various code comments were added to make
it evident what the code was doing to the general reader.
2. Script extensions can now be case insensitive with regards to being mapped back to a
script language.
3. There is now a check to make sure a language is registered during the initialise()
method rather than waiting for it to fail in the process() method.
4. A log4j Logger is now made available to scripts as the variable "logger" (as
were "message", "config", and "payloadProxy"). This is so
scripts have someplace to log to rather than System.out.
5. BSFManager is now cleaned up after via a call to terminate() in a finally block.
ScriptingActionUnitTest.java
6. A new test method "test_unregistered_language()" has been added. This is to
test the new language registration check referred to in #3 above.
test.bsh:
7. The logger is now used as part of unit testing.
GroovyActionProcessor.java
8. A log4j Logger is now made available to groovy scripts as the variable
"logger" just like ScriptingAction.java in #4 above.
scripting_chain
9. A new quickstart was added (.../samples/quickstarts/scripting_chain) which exercises
various scripts of different languages in a chain, each adding a "link" to the
chain by modifying the message's payload as the action pipeline progresses.
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 CP2
Attachments: jbossesb-scripting-enhancements.zip
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