[jboss-user] [jBPM] - Re: Custom JuelScriptEngine
Marcos Sousa
do-not-reply at jboss.com
Sun Jul 7 17:04:33 EDT 2013
Marcos Sousa [https://community.jboss.org/people/marcos.sousa] created the discussion
"Re: Custom JuelScriptEngine"
To view the discussion, visit: https://community.jboss.org/message/826763#826763
--------------------------------------------------------------
An way that looked to fit to me is:
public ScriptEngine getScriptEngine() {
if (queue.isEmpty()) {
ScriptEngine scriptEngine = new Juel4AppnameScriptEngine(this);
try {
queue.put(scriptEngine);
} catch (InterruptedException e) {
e.printStackTrace();
}
return scriptEngine;
} else {
while (!queue.isEmpty()) {
try {
Thread.sleep(1 * 100L);
} catch (Exception e) {
e.printStackTrace();
}
}
ScriptEngine scriptEngine = new Juel4AppnameScriptEngine(this);
try {
queue.put(scriptEngine);
} catch (InterruptedException e) {
e.printStackTrace();
}
return scriptEngine;
}
}
Then in Juel4AppnameScriptEngine I use "Juel4ImpressionScriptEngineFactory.queue.poll();" before return eval method.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/826763#826763]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130707/92eda8a5/attachment.html
More information about the jboss-user
mailing list