diff --git a/config/alfresco/alfresco-shared.properties b/config/alfresco/alfresco-shared.properties index 382cc62c17..142fce6173 100644 --- a/config/alfresco/alfresco-shared.properties +++ b/config/alfresco/alfresco-shared.properties @@ -12,7 +12,5 @@ avm.remote.host=localhost # AVMRemote API -avm.remote.port=1313 +avm.remote.port=50500 -# MBeanServer registry port (JMX over RMI) -avm.jmxrmi.port=50500 diff --git a/config/alfresco/core-services-context.xml b/config/alfresco/core-services-context.xml index 3fccc42714..7e48b67fc2 100644 --- a/config/alfresco/core-services-context.xml +++ b/config/alfresco/core-services-context.xml @@ -55,7 +55,7 @@ - + @@ -65,7 +65,7 @@ - + diff --git a/source/java/org/alfresco/repo/jscript/ClasspathScriptLocation.java b/source/java/org/alfresco/repo/jscript/ClasspathScriptLocation.java index d6a007f03a..ce43680cb9 100644 --- a/source/java/org/alfresco/repo/jscript/ClasspathScriptLocation.java +++ b/source/java/org/alfresco/repo/jscript/ClasspathScriptLocation.java @@ -33,6 +33,19 @@ public class ClasspathScriptLocation implements ScriptLocation ParameterCheck.mandatory("Location", location); this.location = location; } + + /** + * @see org.alfresco.service.cmr.repository.ScriptLocation#getInputStream() + */ + public InputStream getInputStream() + { + InputStream stream = getClass().getClassLoader().getResourceAsStream(location); + if (stream == null) + { + throw new AlfrescoRuntimeException("Unable to load classpath resource: " + location); + } + return stream; + } /** * @see org.alfresco.service.cmr.repository.ScriptLocation#getReader() @@ -83,5 +96,4 @@ public class ClasspathScriptLocation implements ScriptLocation { return this.location.toString(); } - } diff --git a/source/java/org/alfresco/service/cmr/repository/ScriptLocation.java b/source/java/org/alfresco/service/cmr/repository/ScriptLocation.java index b1bbe8bb4d..7bde4b3171 100644 --- a/source/java/org/alfresco/service/cmr/repository/ScriptLocation.java +++ b/source/java/org/alfresco/service/cmr/repository/ScriptLocation.java @@ -3,6 +3,7 @@ */ package org.alfresco.service.cmr.repository; +import java.io.InputStream; import java.io.Reader; /** @@ -13,6 +14,13 @@ import java.io.Reader; */ public interface ScriptLocation { + /** + * Returns an input stream to the contents of the script + * + * @return the input stream + */ + InputStream getInputStream(); + /** * Returns a reader to the contents of the script *