mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.0 to HEAD
12200: Fix for ETHREEOH-974 - Large file uploads now correctly streamed through web-tier (replaced Sun HTTPClient impl with Apache impl that fully supports streaming of multi-part form content). - Fix to repository WebScripts framework to not load multi-part form file content into memory (i.e. to fix repo side) - Improvements to web-tier script execution performance as per CHK-5509 and some recent research into runtime compiling of Rhino scripts. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12553 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -73,10 +73,10 @@ public class RhinoScriptProcessor extends BaseProcessor implements ScriptProcess
|
||||
private static final String PATH_CLASSPATH = "classpath:";
|
||||
|
||||
/** Wrap Factory */
|
||||
private static WrapFactory wrapFactory = new RhinoWrapFactory();
|
||||
private static final WrapFactory wrapFactory = new RhinoWrapFactory();
|
||||
|
||||
/** Base Value Converter */
|
||||
private ValueConverter valueConverter = new ValueConverter();
|
||||
private final ValueConverter valueConverter = new ValueConverter();
|
||||
|
||||
/** Store into which to resolve cm:name based script paths */
|
||||
private StoreRef storeRef;
|
||||
@@ -348,7 +348,8 @@ public class RhinoScriptProcessor extends BaseProcessor implements ScriptProcess
|
||||
Context cx = Context.enter();
|
||||
try
|
||||
{
|
||||
// Create a thread-specific scope from one of the shared scopes. See http://www.mozilla.org/rhino/scopes.html
|
||||
// Create a thread-specific scope from one of the shared scopes.
|
||||
// See http://www.mozilla.org/rhino/scopes.html
|
||||
cx.setWrapFactory(wrapFactory);
|
||||
Scriptable sharedScope = secure ? this.nonSecureScope : this.secureScope;
|
||||
Scriptable scope = cx.newObject(sharedScope);
|
||||
@@ -396,7 +397,7 @@ public class RhinoScriptProcessor extends BaseProcessor implements ScriptProcess
|
||||
Throwable err = w.getWrappedException();
|
||||
if (err instanceof RuntimeException)
|
||||
{
|
||||
throw (RuntimeException) err;
|
||||
throw (RuntimeException)err;
|
||||
}
|
||||
throw new AlfrescoRuntimeException(err.getMessage(), err);
|
||||
}
|
||||
@@ -469,8 +470,8 @@ public class RhinoScriptProcessor extends BaseProcessor implements ScriptProcess
|
||||
|
||||
|
||||
/**
|
||||
* Pre initializes two scope objects (one secure and one not) with the standard objects preinitialised. This saves
|
||||
* on very expensive calls to reinitialize a new scope on every web script execution. See
|
||||
* Pre initializes two scope objects (one secure and one not) with the standard objects preinitialised.
|
||||
* This saves on very expensive calls to reinitialize a new scope on every web script execution. See
|
||||
* http://www.mozilla.org/rhino/scopes.html
|
||||
*
|
||||
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
|
||||
@@ -505,7 +506,6 @@ public class RhinoScriptProcessor extends BaseProcessor implements ScriptProcess
|
||||
// allow access to all libraries and objects, including the importer
|
||||
// @see http://www.mozilla.org/rhino/ScriptingJava.html
|
||||
this.nonSecureScope = new ImporterTopLevel(cx);
|
||||
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
Reference in New Issue
Block a user