mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V2.0 to HEAD
svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V2.0@5132 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V2.0@5134 . - ScriptLocation#getInputStream - RMI Registry git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5166 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -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
|
||||
|
@@ -55,7 +55,7 @@
|
||||
<bean id="alfrescoMBeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean"/>
|
||||
|
||||
<bean id="registry" class="org.springframework.remoting.rmi.RmiRegistryFactoryBean">
|
||||
<property name="port" value="${avm.jmxrmi.port}"/>
|
||||
<property name="port" value="${avm.remote.port}"/>
|
||||
</bean>
|
||||
|
||||
<!-- MBeanServer Connector (registers itself with custom alfrescoMBeanServer) -->
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
<property name="server" ref="alfrescoMBeanServer"/>
|
||||
<property name="objectName" value="connector:name=rmi"/>
|
||||
<property name="serviceUrl" value="service:jmx:rmi://localhost/jndi/rmi://localhost:${avm.jmxrmi.port}/alfresco/jmxrmi" />
|
||||
<property name="serviceUrl" value="service:jmx:rmi://localhost/jndi/rmi://localhost:${avm.remote.port}/alfresco/jmxrmi" />
|
||||
|
||||
<property name="environment">
|
||||
<map>
|
||||
|
@@ -34,6 +34,19 @@ public class ClasspathScriptLocation implements ScriptLocation
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -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
|
||||
*
|
||||
|
Reference in New Issue
Block a user