git-svn-id: http://bigbluebutton.googlecode.com/svn/trunk@56 af16638f-c34d-0410-8cfa-b39d5352b314

This commit is contained in:
kajan85 2008-06-20 19:21:36 +00:00
parent b9bbe1081b
commit 960ac95c4e
52 changed files with 5287 additions and 0 deletions

View File

@ -0,0 +1,59 @@
<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<!--
Solaris Service Management Facility for Red5
The idea for this file came from a post by Paul Oswald
URL: http://pauloswald.com/article/29/hudson-solaris-smf-manifest
Modified for use with Red5 by Paul Gregoire (mondain@gmail.com)
More info:
http://www.sun.com/bigadmin/content/selfheal/smf-quickstart.jsp
http://www.sun.com/bigadmin/content/selfheal/sdev_intro.html
-->
<service_bundle type="manifest" name="Red5">
<service name="application/red5" type="service" version="1">
<!-- Initial state of the service is disabled -->
<create_default_instance enabled="false" />
<!-- Only one instance of Red5 should ever run per server -->
<single_instance />
<dependency name="multi-user-server" type="service" grouping="require_all" restart_on="none">
<service_fmri value="svc:/milestone/multi-user" />
</dependency>
<method_context>
<method_credential user='dev' group='teamsdev' />
<method_environment>
<envvar name='PATH' value='/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/local/bin:/usr/local/sbin:/usr/sfw/bin' />
</method_environment>
</method_context>
<!-- Set the RED5_HOME env variable, and run the war file in /apps/red5 -->
<exec_method type="method" name="start"
exec="java -Xmx512m -DRED5_HOME=/apps/red5/ -jar /apps/red5/red5.jar --prefix=/red5"
timeout_seconds="0"/>
<exec_method type="method" name="stop"
exec=":kill -TERM"
timeout_seconds="30"/>
<!-- We are going to be kicking off a single child process so we want Wait mode-->
<property_group name='startd' type='framework'>
<propval name='duration' type='astring' value='child' />
</property_group>
<stability value="Unstable" />
<template>
<common_name>
<loctext xml:lang='C'>Red5 - RIA Server</loctext>
</common_name>
<documentation>
<doc_link name='red5.org' uri='http://osflash.org/red5' />
</documentation>
</template>
</service>
</service_bundle>

View File

@ -0,0 +1,37 @@
# access.properties
# Access control file for Remote JMX API access to MBeanServer resources.
# This file defines the allowed access for different roles.
# The file format for the access file is syntactically the same as the
# Properties file format. The syntax is described in the Javadoc for
# java.util.Properties.load.
# A typical access file has multiple lines, where each line is blank,
# a comment (like this one), or an access control entry.
# An access control entry consists of a role name, and an associated access
# level. The role name is any string that does not itself contain spaces or
# tabs. It corresponds to an entry in the password file. The access level
# is one of the following:
#
# "readonly" grants access to read attributes of MBeans.
# For monitoring, this means that a remote client in this
# role can read measurements but cannot perform any action
# that changes the environment of the running program.
#
# "readwrite" grants access to read and write attributes of MBeans, to
# invoke operations on them, and to create or remove them.
# This access should be only granted to trusted clients,
# since they can potentially interfere with the smooth
# operation of a running program.
# A given role should have at most one entry in this file. If a role has no
# entry, it has no access.
# If multiple entries are found for the same role name, then the last access
# entry is used.
# Access rights granted to the authenticated identity by the RMI connector
# in this example.
#
red5user readwrite

View File

@ -0,0 +1,17 @@
#Filter file
context.config.location=/WEB-INF/red5-*.xml
locator.factory.selector=red5.xml
global.scope=<context-param><param-name>globalScope</param-name><param-value>default</param-value></context-param>
parent.context.key=<context-param><param-name>parentContextKey</param-name><param-value>default.context</param-value></context-param>
context.loader.listener=org.springframework.web.context.ContextLoaderListener
request.context.listener=
gateway.servlet=<servlet><servlet-name>gateway</servlet-name><servlet-class>org.red5.server.net.servlet.AMFGatewayServlet</servlet-class><load-on-startup>1</load-on-startup></servlet>
gateway.servlet.mapping=<servlet-mapping><servlet-name>gateway</servlet-name><url-pattern>/gateway</url-pattern></servlet-mapping>
rtmpt.servlet=
rtmpt.servlet.mappings=

View File

@ -0,0 +1,172 @@
// ============================================================================
// catalina.corepolicy - Security Policy Permissions for Tomcat 5
//
// This file contains a default set of security policies to be enforced (by the
// JVM) when Catalina is executed with the "-security" option. In addition
// to the permissions granted here, the following additional permissions are
// granted to the codebase specific to each web application:
//
// * Read access to the document root directory
//
// $Id: catalina.policy,v 1.13 2005/03/03 23:41:14 remm Exp $
// ============================================================================
// ========== SYSTEM CODE PERMISSIONS =========================================
// These permissions apply to javac
grant codeBase "file:${java.home}/lib/-" {
permission java.security.AllPermission;
};
// These permissions apply to all shared system extensions
grant codeBase "file:${java.home}/jre/lib/ext/-" {
permission java.security.AllPermission;
};
// These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre
grant codeBase "file:${java.home}/../lib/-" {
permission java.security.AllPermission;
};
// These permissions apply to all shared system extensions when
// ${java.home} points at $JAVA_HOME/jre
grant codeBase "file:${java.home}/lib/ext/-" {
permission java.security.AllPermission;
};
// ========== CATALINA CODE PERMISSIONS =======================================
// These permissions apply to the launcher code
grant codeBase "file:${catalina.home}/bin/commons-launcher.jar" {
permission java.security.AllPermission;
};
// These permissions apply to the daemon code
grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" {
permission java.security.AllPermission;
};
// These permissions apply to the commons-logging API
grant codeBase "file:${catalina.home}/bin/commons-logging-api.jar" {
permission java.security.AllPermission;
};
// These permissions apply to the server startup code
grant codeBase "file:${catalina.home}/bin/bootstrap.jar" {
permission java.security.AllPermission;
};
// These permissions apply to the JMX server
grant codeBase "file:${catalina.home}/bin/jmx.jar" {
permission java.security.AllPermission;
};
// These permissions apply to JULI
grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
permission java.security.AllPermission;
};
// These permissions apply to the servlet API classes
// and those that are shared across all class loaders
// located in the "common" directory
grant codeBase "file:${catalina.home}/common/-" {
permission java.security.AllPermission;
};
// These permissions apply to the container's core code, plus any additional
// libraries installed in the "server" directory
grant codeBase "file:${catalina.home}/server/-" {
permission java.security.AllPermission;
};
// The permissions granted to the balancer WEB-INF/classes directory
grant codeBase "file:${catalina.home}/webapps/balancer/WEB-INF/classes/-" {
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.util.digester";
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.util.digester.*";
};
// ========== WEB APPLICATION PERMISSIONS =====================================
// These permissions are granted by default to all web applications
// In addition, a web application will be given a read FilePermission
// and JndiPermission for all files and directories in its document root.
grant {
// Required for JNDI lookup of named JDBC DataSource's and
// javamail named MimePart DataSource used to send mail
permission java.util.PropertyPermission "java.home", "read";
permission java.util.PropertyPermission "java.naming.*", "read";
permission java.util.PropertyPermission "javax.sql.*", "read";
// OS Specific properties to allow read access
permission java.util.PropertyPermission "os.name", "read";
permission java.util.PropertyPermission "os.version", "read";
permission java.util.PropertyPermission "os.arch", "read";
permission java.util.PropertyPermission "file.separator", "read";
permission java.util.PropertyPermission "path.separator", "read";
permission java.util.PropertyPermission "line.separator", "read";
// JVM properties to allow read access
permission java.util.PropertyPermission "java.version", "read";
permission java.util.PropertyPermission "java.vendor", "read";
permission java.util.PropertyPermission "java.vendor.url", "read";
permission java.util.PropertyPermission "java.class.version", "read";
permission java.util.PropertyPermission "java.specification.version", "read";
permission java.util.PropertyPermission "java.specification.vendor", "read";
permission java.util.PropertyPermission "java.specification.name", "read";
permission java.util.PropertyPermission "java.vm.specification.version", "read";
permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
permission java.util.PropertyPermission "java.vm.specification.name", "read";
permission java.util.PropertyPermission "java.vm.version", "read";
permission java.util.PropertyPermission "java.vm.vendor", "read";
permission java.util.PropertyPermission "java.vm.name", "read";
// Required for OpenJMX
permission java.lang.RuntimePermission "getAttribute";
// Allow read of JAXP compliant XML parser debug
permission java.util.PropertyPermission "jaxp.debug", "read";
// Precompiled JSPs need access to this package.
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime";
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime.*";
};
// You can assign additional permissions to particular web applications by
// adding additional "grant" entries here, based on the code base for that
// application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files.
//
// Different permissions can be granted to JSP pages, classes loaded from
// the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/
// directory, or even to individual jar files in the /WEB-INF/lib/ directory.
//
// For instance, assume that the standard "examples" application
// included a JDBC driver that needed to establish a network connection to the
// corresponding database and used the scrape taglib to get the weather from
// the NOAA web server. You might create a "grant" entries like this:
//
// The permissions granted to the context root directory apply to JSP pages.
// grant codeBase "file:${catalina.home}/webapps/examples/-" {
// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
// permission java.net.SocketPermission "*.noaa.gov:80", "connect";
// };
//
// The permissions granted to the context WEB-INF/classes directory
// grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/classes/-" {
// };
//
// The permission granted to your JDBC driver
// grant codeBase "jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/driver.jar!/-" {
// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
// };
// The permission granted to the scrape taglib
// grant codeBase "jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/scrape.jar!/-" {
// permission java.net.SocketPermission "*.noaa.gov:80", "connect";
// };

View File

@ -0,0 +1,288 @@
<ehcache>
<!--
Sets the path to the directory where cache files are created.
If the path is a Java System Property it is replaced by its value in the
running VM.
The following properties are translated:
* user.home - User's home directory
* user.dir - User's current working directory
* java.io.tmpdir - Default temp file path
Subdirectories can be specified below the property e.g. java.io.tmpdir/one
-->
<diskStore path="java.io.tmpdir"/>
<!--
Specifies a CacheManagerEventListenerFactory, be used to create a CacheManagerPeerProvider,
which is notified when Caches are added or removed from the CacheManager.
The attributes of CacheManagerEventListenerFactory are:
* class - a fully qualified factory class name
* properties - comma separated properties having meaning only to the factory.
Sets the fully qualified class name to be registered as the CacheManager event listener.
The events include:
* adding a Cache
* removing a Cache
Callbacks to listener methods are synchronous and unsynchronized. It is the responsibility
of the implementer to safely handle the potential performance and thread safety issues
depending on what their listener is doing.
If no class is specified, no listener is created. There is no default.
<cacheManagerEventListenerFactory class="" properties=""/>
-->
<!--
(Enable for distributed operation)
Specifies a CacheManagerPeerProviderFactory which will be used to create a
CacheManagerPeerProvider, which discovers other CacheManagers in the cluster.
The attributes of cacheManagerPeerProviderFactory are:
* class - a fully qualified factory class name
* properties - comma separated properties having meaning only to the factory.
Ehcache comes with a built-in RMI-based distribution system with two means of discovery of
CacheManager peers participating in the cluster:
* automatic, using a multicast group. This one automatically discovers peers and detects
changes such as peers entering and leaving the group
* manual, using manual rmiURL configuration. A hardcoded list of peers is provided at
configuration time.
Configuring Automatic Discovery:
Automatic discovery is configured as per the following example:
<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=automatic, multicastGroupAddress=230.0.0.1,
multicastGroupPort=4446"/>
Valid properties are:
* peerDiscovery (mandatory) - specify "automatic"
* multicastGroupAddress (mandatory) - specify a valid multicast group address
* multicastGroupPort (mandatory) - specify a dedicated port for the multicast heartbeat
traffic
Configuring Manual Discovery:
Manual discovery is configured as per the following example:
<cacheManagerPeerProviderFactory class=
"net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=manual,
rmiUrls=//server1:40000/sampleCache1|//server2:40000/sampleCache1
| //server1:40000/sampleCache2|//server2:40000/sampleCache2"/>
Valid properties are:
* peerDiscovery (mandatory) - specify "manual"
* rmiUrls (mandatory) - specify a pipe separated list of rmiUrls, in the form
//hostname:port
The hostname is the hostname of the remote CacheManager peer. The port is the listening
port of the RMICacheManagerPeerListener of the remote CacheManager peer.
An alternate CacheManagerPeerProviderFactory can be used for JNDI discovery of other
CacheManagers in the cluster. Only manual discovery is supported.
For cacheManagerPeerProviderFactory specify class
net.sf.ehcache.distribution.JNDIManualRMICacheManagerPeerProviderFactoryerFactory.
Correspondingly for cacheManagerPeerListenerFactory specify class
net.sf.ehcache.distribution.JNDIRMICacheManagerPeerListenerFactoryory.
Configuring JNDI Manual Discovery:
Manual JNDI discovery is configured as per the following example:
<cacheManagerPeerProviderFactory class=
"net.sf.ehcache.distribution.JNDIManualRMICacheManagerPeerProviderFactoryerFactory"
properties="peerDiscovery=manual, stashContexts=true, stashRemoteCachePeers=true,
jndiUrls=t3//server1:40000/sampleCache1|t3//server2:40000/sampleCache1
|t3//server1:40000/sampleCache2|t3//server2:40000/sampleCache2"/>
Valid properties are:
* peerDiscovery (mandatory) - specify "manual"
* stashContexts (optional) - specify "true" or "false". Defaults to true.
java.naming.Context objects are stashed for performance.
* stashRemoteCachePeers (optional) - specify "true" or "false". Defaults to true.
CachePeer objects are stashed for performance.
* jndiUrls (mandatory) - specify a pipe separated list of jndiUrls,
in the form protocol//hostname:port
<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=automatic,
multicastGroupAddress=230.0.0.1,
multicastGroupPort=4446"/>
-->
<!--
(Enable for distributed operation)
Specifies a CacheManagerPeerListenerFactory which will be used to create a
CacheManagerPeerListener, which
listens for messages from cache replicators participating in the cluster.
The attributes of cacheManagerPeerListenerFactory are:
class - a fully qualified factory class name
properties - comma separated properties having meaning only to the factory.
Ehcache comes with a built-in RMI-based distribution system. The listener component is
RMICacheManagerPeerListener which is configured using
RMICacheManagerPeerListenerFactory. It is configured as per the following example:
<cacheManagerPeerListenerFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
properties="hostName=fully_qualified_hostname_or_ip,
port=40001,
socketTimeoutMillis=120000"/>
All properties are optional. They are:
* hostName - the hostName of the host the listener is running on. Specify
where the host is multihomed and you want to control the interface over which cluster
messages are received. Defaults to the host name of the default interface if not
specified.
* port - the port the listener listens on. This defaults to a free port if not specified.
* socketTimeoutMillis - the number of ms client sockets will stay open when sending
messages to the listener. This should be long enough for the slowest message.
If not specified it defaults 120000ms.
An alternate CacheManagerPeerListenerFactory can be also be used for JNDI binding of
listeners for messages from cache replicators participating in the cluster. For
cacheManagerPeerListenerFactory specify
class net.sf.ehcache.distribution.JNDIRMICacheManagerPeerListenerFactory.
Correspondingly for cacheManagerPeerProviderFactory specify class
net.sf.ehcache.distribution.JNDIManualRMICacheManagerPeerProviderFactoryerFactory.
Properties for JNDIRMICacheManagerPeerListenerFactory are the same as
RMICacheManagerPeerListenerFactory.
<cacheManagerPeerListenerFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"/>
-->
<!-- Cache configuration.
The following attributes are required.
name:
Sets the name of the cache. This is used to identify the cache. It must be unique.
maxElementsInMemory:
Sets the maximum number of objects that will be created in memory
eternal:
Sets whether elements are eternal. If eternal, timeouts are ignored and the
element is never expired.
overflowToDisk:
Sets whether elements can overflow to disk when the in-memory cache
has reached the maxInMemory limit.
The following attributes are optional.
timeToIdleSeconds:
Sets the time to idle for an element before it expires.
i.e. The maximum amount of time between accesses before an element expires
Is only used if the element is not eternal.
Optional attribute. A value of 0 means that an Element can idle for infinity.
The default value is 0.
timeToLiveSeconds:
Sets the time to live for an element before it expires.
i.e. The maximum time between creation time and when an element expires.
Is only used if the element is not eternal.
Optional attribute. A value of 0 means that and Element can live for infinity.
The default value is 0.
diskPersistent:
Whether the disk store persists between restarts of the Virtual Machine.
The default value is false.
diskExpiryThreadIntervalSeconds:
The number of seconds between runs of the disk expiry thread. The default value
is 120 seconds.
memoryStoreEvictionPolicy:
Policy would be enforced upon reaching the maxElementsInMemory limit. Default
policy is Least Recently Used (specified as LRU). Other policies available -
First In First Out (specified as FIFO) and Less Frequently Used
(specified as LFU)
Cache elements can also contain sub elements which take the same format of a factory class
and properties. Defined sub-elements are:
* cacheEventListenerFactory - Enables registration of listeners for cache events, such as
put, remove, update, and expire.
* bootstrapCacheLoaderFactory - Specifies a BootstrapCacheLoader, which is called by a
cache on initialisation to prepopulate itself.
Each cache that will be distributed needs to set a cache event listener which replicates
messages to the other CacheManager peers. For the built-in RMI implementation this is done
by adding a cacheEventListenerFactory element of type RMICacheReplicatorFactory to each
distributed cache's configuration as per the following example:
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
properties="replicateAsynchronously=true,
replicatePuts=true,
replicateUpdates=true,
replicateUpdatesViaCopy=true,
replicateRemovals=true "/>
The RMICacheReplicatorFactory recognises the following properties:
* replicatePuts=true|false - whether new elements placed in a cache are
replicated to others. Defaults to true.
* replicateUpdates=true|false - whether new elements which override an
element already existing with the same key are replicated. Defaults to true.
* replicateRemovals=true - whether element removals are replicated. Defaults to true.
* replicateAsynchronously=true | false - whether replications are
asynchronous (true) or synchronous (false). Defaults to true.
* replicateUpdatesViaCopy=true | false - whether the new elements are
copied to other caches (true), or whether a remove message is sent. Defaults to true.
* asynchronousReplicationIntervalMillis=<number of milliseconds> - The asynchronous
replicator runs at a set interval of milliseconds. The default is 1000. The minimum
is 10. This property is only applicable if replicateAsynchronously=true
The RMIBootstrapCacheLoader bootstraps caches in clusters where RMICacheReplicators are
used. It is configured as per the following example:
<bootstrapCacheLoaderFactory
class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"
properties="bootstrapAsynchronously=true, maximumChunkSizeBytes=5000000"/>
The RMIBootstrapCacheLoaderFactory recognises the following optional properties:
* bootstrapAsynchronously=true|false - whether the bootstrap happens in the background
after the cache has started. If false, bootstrapping must complete before the cache is
made available. The default value is true.
* maximumChunkSizeBytes=<integer> - Caches can potentially be very large, larger than the
memory limits of the VM. This property allows the bootstraper to fetched elements in
chunks. The default chunk size is 5000000 (5MB).
-->
<!--
Mandatory Default Cache configuration. These settings will be applied to caches
created programmtically using CacheManager.add(String cacheName)
-->
<defaultCache
maxElementsInMemory="4"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
overflowToDisk="false"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="120"
memoryStoreEvictionPolicy="LFU"
/>
</ehcache>

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:lang="http://www.springframework.org/schema/lang"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd">
<!-- DEFAULT GLOBAL CONTEXT -->
<bean id="global.clientRegistry" class="org.red5.server.ClientRegistry" />
<bean id="global.serviceInvoker" class="org.red5.server.service.ServiceInvoker">
<property name="serviceResolvers">
<list>
<bean id="scopeServiceResolver"
class="org.red5.server.service.ScopeServiceResolver" />
<bean id="handlerServiceResolver"
class="org.red5.server.service.HandlerServiceResolver" />
<bean id="contextServiceResolver"
class="org.red5.server.service.ContextServiceResolver" />
</list>
</property>
</bean>
<bean id="global.mappingStrategy" class="org.red5.server.MappingStrategy" />
<bean id="global.context" class="org.red5.server.Context" autowire="byType" />
<bean id="global.handler" class="org.red5.server.CoreHandler" autowire="byType" />
<bean id="global.scope" class="org.red5.server.GlobalScope" init-method="register">
<property name="server" ref="red5.server" />
<property name="name" value="default" />
<property name="context" ref="global.context" />
<property name="handler" ref="global.handler" />
<property name="persistenceClass">
<value>org.red5.server.persistence.FilePersistence</value>
</property>
</bean>
<bean id="red5.scopeResolver" class="org.red5.server.ScopeResolver">
<property name="globalScope" ref="global.scope" />
</bean>
</beans>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean name="default.context" class="org.springframework.context.support.ClassPathXmlApplicationContext">
<constructor-arg>
<list>
<value>classpath*:applicationContext.xml</value>
<value>classpath*:red5-common.xml</value>
<value>classpath*:red5-core.xml</value>
</list>
</constructor-arg>
</bean>
</beans>

View File

@ -0,0 +1,15 @@
#Filter file
context.config.location=/WEB-INF/applicationContext.xml /WEB-INF/red5-*.xml
locator.factory.selector=applicationContext.xml
global.scope=
parent.context.key=
context.loader.listener=org.springframework.web.context.ContextLoaderListener
request.context.listener=<listener><listener-class>org.springframework.web.context.request.RequestContextListener</listener-class></listener>
gateway.servlet=<servlet><servlet-name>gateway</servlet-name><servlet-class>org.red5.server.net.servlet.AMFGatewayServlet</servlet-class><load-on-startup>1</load-on-startup></servlet>
gateway.servlet.mapping=<servlet-mapping><servlet-name>gateway</servlet-name><url-pattern>/gateway</url-pattern></servlet-mapping>
rtmpt.servlet=<servlet><servlet-name>rtmpt</servlet-name><servlet-class>org.red5.server.net.rtmpt.RTMPTServlet</servlet-class><load-on-startup>2</load-on-startup></servlet>
rtmpt.servlet.mappings=<servlet-mapping><servlet-name>rtmpt</servlet-name><url-pattern>/open/*</url-pattern></servlet-mapping><servlet-mapping><servlet-name>rtmpt</servlet-name><url-pattern>/idle/*</url-pattern></servlet-mapping><servlet-mapping><servlet-name>rtmpt</servlet-name><url-pattern>/send/*</url-pattern></servlet-mapping><servlet-mapping><servlet-name>rtmpt</servlet-name><url-pattern>/close/*</url-pattern></servlet-mapping>

View File

@ -0,0 +1,223 @@
<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:lang="http://www.springframework.org/schema/lang" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd">
<!-- This context is shared between all child contexts. -->
<!-- Server bean -->
<bean id="red5.server" class="org.red5.server.Server"/>
<!-- JMX server -->
<bean id="jmxFactory" class="org.red5.server.jmx.JMXFactory">
<property name="domain" value="org.red5.server"/>
</bean>
<bean id="jmxAgent" class="org.red5.server.jmx.JMXAgent" init-method="init">
<!-- The RMI adapter allows remote connections to the MBeanServer -->
<property name="enableRmiAdapter" value="false" />
<property name="rmiAdapterPort" value="9999"/>
<!-- SSL
To use jmx with ssl you must also supply the location of the keystore and its password
when starting the server with the following JVM options:
-Djavax.net.ssl.keyStore=keystore
-Djavax.net.ssl.keyStorePassword=password
-->
<property name="enableSsl" value="false"/>
<!-- Starts a registry if it doesnt exist -->
<property name="startRegistry" value="true" />
<!-- Authentication -->
<property name="remoteAccessProperties" value="access.properties"/>
<property name="remotePasswordProperties" value="password.properties"/>
<!-- The HTML adapter allows connections to the MBeanServer via a web browser -->
<property name="enableHtmlAdapter" value="false" />
<property name="htmlAdapterPort" value="8082"/>
<!-- Mina offers its own Mbeans so you may integrate them here -->
<property name="enableMinaMonitor" value="true" />
</bean>
<!-- Serializes objects to AMF binary -->
<bean id="serializer" class="org.red5.io.object.Serializer"/>
<!-- Deserializes objects from AMF binary -->
<bean id="deserializer" class="org.red5.io.object.Deserializer"/>
<!-- Deals with StatusObjects representing statuses like FMS NetConnection.Connect.Success status -->
<bean id="statusObjectService" class="org.red5.server.net.rtmp.status.StatusObjectService"
autowire="byType" init-method="initialize"/>
<!-- RTMP codec factory -->
<bean id="rtmpCodecFactory" class="org.red5.server.net.rtmp.codec.RTMPMinaCodecFactory"
autowire="byType" init-method="init">
<property name="minaEncoder">
<bean class="org.red5.server.net.rtmp.codec.RTMPMinaProtocolEncoder">
<property name="serializer"><ref bean="serializer"/></property>
</bean>
</property>
<property name="minaDecoder">
<bean class="org.red5.server.net.rtmp.codec.RTMPMinaProtocolDecoder">
<property name="deserializer"><ref bean="deserializer"/></property>
</bean>
</property>
</bean>
<!-- Remoting calls codec factory -->
<bean id="remotingCodecFactory" class="org.red5.server.net.remoting.codec.RemotingCodecFactory"
autowire="byType" init-method="init"/>
<!-- Video codec factory -->
<bean id="videoCodecFactory" class="org.red5.server.stream.VideoCodecFactory">
<property name="codecs">
<list>
<bean id="screenVideoCodec" class="org.red5.server.stream.codec.ScreenVideo"/>
<!--
<bean id="sorensonVideoCodec" class="org.red5.server.stream.codec.SorensonVideo"/>
-->
</list>
</property>
</bean>
<!-- Streamable file factory -->
<bean id="streamableFileFactory" class="org.red5.io.StreamableFileFactory">
<property name="services">
<list>
<bean id="flvFileService" class="org.red5.io.flv.impl.FLVService">
<property name="generateMetadata" value="true"/>
</bean>
<bean id="mp3FileService" class="org.red5.io.mp3.impl.MP3Service"/>
</list>
</property>
</bean>
<!-- Thread that writes modified objects to disk periodically -->
<bean id="filePersistenceThread" class="org.red5.server.persistence.FilePersistenceThread"/>
<!-- Handles creation / lookup of shared objects -->
<bean id="sharedObjectService" class="org.red5.server.so.SharedObjectService">
<property name="persistenceClassName">
<value>org.red5.server.persistence.FilePersistence</value>
</property>
</bean>
<!-- High level access to streams -->
<bean id="streamService" class="org.red5.server.stream.StreamService"/>
<!-- Hight level access to broadcasted streams -->
<bean id="providerService" class="org.red5.server.stream.ProviderService"/>
<!-- Provides output to consumers -->
<bean id="consumerService" class="org.red5.server.stream.ConsumerService"/>
<!-- Simple bandwidth control -->
<bean id="BWControlService" class="org.red5.server.stream.SimpleBWControlService" init-method="init">
<property name="interval" value="100"/>
<property name="defaultCapacity" value="104857600"/>
<!-- 100MB -->
</bean>
<!-- Dummy bandwidth control that does nothing -->
<!--
<bean id="BWControlService" class="org.red5.server.stream.DummyBWControlService"/> -->
<!-- Scheduling service -->
<bean id="schedulingService" class="org.red5.server.scheduling.QuartzSchedulingService"/>
<!-- Threadpool settings for the remoting clients -->
<bean id="remotingPool" class="org.red5.server.pooling.ThreadPool">
<property name="poolSize" value="8"/>
</bean>
<!-- Use injection to setup thread pool for remoting clients -->
<bean id="remotingClient" class="org.red5.server.net.remoting.RemotingClient">
<property name="threadPool" ref="remotingPool"/>
</bean>
<!--
Now we can load the cache engine, only one may be enabled at a time. If no-caching is required select the
NoCacheImpl. Three other implementations based on EhCache, WhirlyCache, and Red5Cache are also available.
-->
<bean id="object.cache" class="org.red5.server.cache.NoCacheImpl"/>
<!--
<bean id="object.cache" class="org.red5.server.cache.CacheImpl" init-method="init" autowire="byType">
<property name="maxEntries"><value>5</value></property>
</bean>
<bean id="object.cache" class="org.red5.server.cache.WhirlyCacheImpl" init-method="init" autowire="byType">
<property name="maxEntries" value="5" />
<property name="cacheConfig">
<bean class="com.whirlycott.cache.CacheConfiguration">
<property name="name" value="flv.cache" />
<property name="maxSize" value="5" />
<property name="policy"><value>com.whirlycott.cache.policy.LFUMaintenancePolicy</value></property>
<property name="backend"><value>com.whirlycott.cache.impl.FastHashMapImpl</value></property>
</bean>
</property>
</bean>
<bean id="object.cache" class="org.red5.server.cache.EhCacheImpl" init-method="init">
<property name="diskStore" value="java.io.tmpdir" />
<property name="memoryStoreEvictionPolicy" value="LFU" />
<property name="cacheManagerEventListener"><null/></property>
<property name="cacheConfigs">
<list>
<bean class="net.sf.ehcache.config.CacheConfiguration">
<property name="name" value="flv.cache" />
<property name="maxElementsInMemory" value="5" />
<property name="eternal" value="false" />
<property name="timeToIdleSeconds" value="0" />
<property name="timeToLiveSeconds" value="0" />
<property name="overflowToDisk" value="false" />
<property name="diskPersistent" value="false" />
</bean>
</list>
</property>
</bean>
-->
<!--
Cache to use for keyframe metadata.
-->
<bean id="keyframe.cache" class="org.red5.io.FileKeyFrameMetaCache"/>
<!--
Represents FLV files
Use injection to set the cache impl to be used with flvs
-->
<bean id="flv.impl" class="org.red5.io.flv.impl.FLV">
<property name="cache">
<ref bean="object.cache"/>
</property>
</bean>
<!-- Use injection to set the buffer type for reading FLV files -->
<bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject">
<bean class="org.red5.io.flv.impl.FLVReader"/>
</property>
<property name="targetMethod">
<value>setBufferType</value>
</property>
<!-- Three buffer types are available 'auto', 'heap', and 'direct' -->
<property name="arguments" value="auto"/>
</bean>
<!-- Use injection to set the buffer size for reading FLV files -->
<bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject">
<bean class="org.red5.io.flv.impl.FLVReader"/>
</property>
<property name="targetMethod">
<value>setBufferSize</value>
</property>
<!-- Three buffer types are available 'auto', 'heap', and 'direct' -->
<property name="arguments" value="4096"/>
</bean>
<!-- Use injection to set the keyframe cache for FLV files -->
<bean id="flvreader.impl" class="org.red5.io.flv.impl.FLVReader">
<property name="keyFrameCache">
<ref bean="keyframe.cache"/>
</property>
</bean>
<!-- Use injection to set the keyframe cache for MP3 files -->
<bean id="mp3reader.impl" class="org.red5.io.mp3.impl.MP3Reader">
<property name="frameCache">
<ref bean="keyframe.cache"/>
</property>
</bean>
<!-- Executor that will be used to schedule stream playback to keep
the client buffer filled.
-->
<bean id="streamExecutor" class="java.util.concurrent.ScheduledThreadPoolExecutor">
<constructor-arg value="16"/>
<property name="maximumPoolSize" value="64"/>
</bean>
<!-- ClientBroadcastStream and PlaylistSubscriberStream
that will be used by RTMPConnection and maybe other classes.
These beans are lazy-init because most likely server will need
to be up and running before we can get a smart implementation
of these streams
-->
<bean id="playlistSubscriberStream" scope="prototype" lazy-init="true" class="org.red5.server.stream.PlaylistSubscriberStream">
<property name="executor" ref="streamExecutor"/>
<!-- Check for buffer underruns every X ms and generate NetStream.Play.InsufficientBW accordingly.
Set to 0 to disable. Be careful not to set this value too small to avoid network congestion.
-->
<property name="bufferCheckInterval" value="5000"/>
<!-- A NetStream.Play.InsufficientBW message is generated if more than X messages are queued for sending on the connection. -->
<property name="underrunTrigger" value="10"/>
</bean>
<bean id="clientBroadcastStream" scope="prototype" lazy-init="true" class="org.red5.server.stream.ClientBroadcastStream"/>
</beans>

View File

@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:lang="http://www.springframework.org/schema/lang"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd">
<!-- This context holds all the networking: mina -->
<bean id="customEditorConfigurer"
class="org.springframework.beans.factory.config.CustomEditorConfigurer">
<property name="customEditors">
<map>
<entry key="java.net.SocketAddress">
<bean
class="org.apache.mina.integration.spring.InetSocketAddressEditor" />
</entry>
</map>
</property>
</bean>
<!-- RTMP Handler -->
<bean id="rtmpHandler"
class="org.red5.server.net.rtmp.RTMPHandler">
<property name="server" ref="red5.server" />
<property name="statusObjectService" ref="statusObjectService" />
</bean>
<!-- RTMP Mina IO Handler -->
<bean id="rtmpMinaIoHandler"
class="org.red5.server.net.rtmp.RTMPMinaIoHandler">
<property name="handler" ref="rtmpHandler" />
<property name="codecFactory" ref="rtmpCodecFactory" />
</bean>
<!-- RTMP Mina Transport -->
<bean id="rtmpTransport" class="org.red5.server.net.rtmp.RTMPMinaTransport" init-method="start" destroy-method="stop">
<property name="ioHandler" ref="rtmpMinaIoHandler" />
<property name="address" value="${rtmp.host}" />
<property name="port" value="${rtmp.port}" />
<property name="receiveBufferSize" value="${rtmp.receive_buffer_size}" />
<property name="sendBufferSize" value="${rtmp.send_buffer_size}" />
<property name="eventThreadsCore" value="${rtmp.event_threads_core}" />
<property name="eventThreadsMax" value="${rtmp.event_threads_max}" />
<property name="eventThreadsQueue" value="${rtmp.event_threads_queue}" />
<property name="eventThreadsKeepalive" value="${rtmp.event_threads_keepalive}" />
</bean>
<!-- RTMP Mina Connection -->
<bean id="rtmpMinaConnection" scope="prototype"
class="org.red5.server.net.rtmp.RTMPMinaConnection">
<!-- Ping clients every X ms. Set to 0 to disable ghost detection code. -->
<property name="pingInterval" value="${rtmp.ping_interval}" />
<!-- Disconnect client after X ms of not responding. -->
<property name="maxInactivity" value="${rtmp.max_inactivity}" />
<!-- Max. time in milliseconds to wait for a valid handshake. -->
<property name="maxHandshakeTimeout" value="5000" />
</bean>
<!-- RTMPT Handler -->
<bean id="rtmptHandler"
class="org.red5.server.net.rtmpt.RTMPTHandler" autowire="byType">
<property name="codecFactory" ref="rtmpCodecFactory" />
</bean>
<!-- Use injection to store RTMPT handler in servlet -->
<bean id="rtmptServlet"
class="org.red5.server.net.rtmpt.RTMPTServlet">
<property name="handler" ref="rtmptHandler" />
</bean>
<!-- RTMPT Connection -->
<bean id="rtmptConnection" scope="prototype"
class="org.red5.server.net.rtmpt.RTMPTConnection">
<!-- Ping clients every X ms. Set to 0 to disable ghost detection code. -->
<property name="pingInterval" value="${rtmp.ping_interval}" />
<!-- Disconnect client after X ms of not responding. -->
<property name="maxInactivity" value="${rtmp.max_inactivity}" />
<!-- Max. time in milliseconds to wait for a valid handshake. -->
<property name="maxHandshakeTimeout" value="5000" />
</bean>
</beans>

View File

@ -0,0 +1,25 @@
# HTTP
http.host=0.0.0.0
http.port=8080
# RTMP
rtmp.host=0.0.0.0
rtmp.port=1935
rtmp.event_threads_core=16
rtmp.event_threads_max=32
# event threads queue: -1 unbounded, 0 direct (no queue), n bounded queue
rtmp.event_threads_queue=-1
rtmp.event_threads_keepalive=60
rtmp.send_buffer_size=271360
rtmp.receive_buffer_size=65536
rtmp.ping_interval=5000
rtmp.max_inactivity=60000
# RTMPT
rtmpt.host=0.0.0.0
rtmpt.port=8080
rtmpt.ping_interval=5000
rtmpt.max_inactivity=60000
# Debug proxy (needs to be activated in red5-core.xml)
proxy.source_host=127.0.0.1
proxy.source_port=1936
proxy.destination_host=127.0.0.1
proxy.destination_port=1935

View File

@ -0,0 +1,151 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<!-- =============================================================== -->
<!-- Configure the Jetty Server with Spring -->
<!-- This file is the equivalent of jetty.xml, but written in spring -->
<!-- XmlBeanFactory format. -->
<!-- The modules/spring/src/org/mortbay/spring/Main.java may be used -->
<!-- to run this file - or any other spring infrastructure that -->
<!-- accepts uses an XmlBeanFactory -->
<!-- =============================================================== -->
<beans>
<bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
<bean id="sysProps"
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetClass">
<value>java.lang.System</value>
</property>
<property name="targetMethod">
<value>getProperties</value>
</property>
</bean>
<bean id="webappRoot"
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject">
<ref bean="sysProps" />
</property>
<property name="targetMethod">
<value>getProperty</value>
</property>
<property name="arguments">
<list>
<value>red5.webapp.root</value>
</list>
</property>
</bean>
<bean id="httpHost"
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject">
<ref bean="sysProps" />
</property>
<property name="targetMethod">
<value>getProperty</value>
</property>
<property name="arguments">
<list>
<value>http.host</value>
</list>
</property>
</bean>
<bean id="httpPort"
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject">
<ref bean="sysProps" />
</property>
<property name="targetMethod">
<value>getProperty</value>
</property>
<property name="arguments">
<list>
<value>http.port</value>
</list>
</property>
</bean>
<bean id="httpsPort"
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject">
<ref bean="sysProps" />
</property>
<property name="targetMethod">
<value>getProperty</value>
</property>
<property name="arguments">
<list>
<value>https.port</value>
</list>
</property>
</bean>
<bean id="Server" class="org.mortbay.jetty.Server" destroy-method="stop"> <!-- init-method="start" -->
<property name="threadPool">
<bean id="ThreadPool"
class="org.mortbay.thread.BoundedThreadPool">
<property name="minThreads" value="10" />
<property name="lowThreads" value="25" />
<property name="maxThreads" value="100" />
</bean>
</property>
<property name="connectors">
<list>
<bean id="Connector"
class="org.mortbay.jetty.nio.SelectChannelConnector">
<property name="host">
<ref local="httpHost" />
</property>
<property name="port">
<ref local="httpPort" />
</property>
<property name="maxIdleTime" value="30000" />
<property name="acceptors" value="2" />
<property name="confidentialPort">
<ref local="httpsPort" />
</property>
</bean>
<bean id="SSLConnector"
class="org.mortbay.jetty.security.SslSocketConnector">
<property name="port">
<ref local="httpsPort" />
</property>
<property name="maxIdleTime" value="30000" />
<property name="keystore"><value>${red5.config_root}/keystore</value></property>
<property name="password" value="changeme" />
<property name="keyPassword" value="changeme" />
<property name="truststore"><value>${red5.config_root}/keystore</value></property>
<property name="trustPassword" value="changeme" />
</bean>
</list>
</property>
<property name="userRealms">
<list>
<bean
class="org.mortbay.jetty.security.HashUserRealm" depends-on="placeholderConfig">
<property name="name" value="Test Realm" />
<property name="config"><value>${red5.config_root}/realm.properties</value></property>
</bean>
</list>
</property>
<property name="handler">
<bean id="handlers"
class="org.mortbay.jetty.handler.HandlerCollection">
<property name="handlers">
<list>
<bean id="defaultHandler" class="org.mortbay.jetty.handler.DefaultHandler" />
<bean id="requestLog" class="org.mortbay.jetty.handler.RequestLogHandler" />
</list>
</property>
</bean>
</property>
</bean>
</beans>

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,91 @@
log4j.rootCategory=DEBUG, CONSOLE
#Red5
log4j.logger.org.red5.io=INFO
log4j.logger.org.red5.server=INFO
log4j.logger.org.red5.server.Standalone=INFO
log4j.logger.org.red5.server.Client=INFO
log4j.logger.org.red5.server.api.stream.support=INFO
log4j.logger.org.red5.server.jmx=INFO
log4j.logger.org.red5.server.messaging.InMemoryPushPushPipe=INFO
log4j.logger.org.red5.server.net=INFO
log4j.logger.org.red5.server.net.proxy=INFO
log4j.logger.org.red5.server.net.remoting=WARN
log4j.logger.org.red5.server.net.mrtmp=WARN
log4j.logger.org.red5.server.net.mrtmp.codec=WARN
log4j.logger.org.red5.server.net.rtmp.RTMPOriginConnection=WARN
log4j.logger.org.red5.server.net.rtmp=WARN
log4j.logger.org.red5.server.net.rtmp.BaseRTMPHandler=OFF
log4j.logger.org.red5.server.net.rtmp.RTMPMinaIoHandler=OFF
log4j.logger.org.red5.server.net.rtmp.codec=INFO
log4j.logger.org.red5.server.net.rtmp.status=INFO
log4j.logger.org.red5.server.net.rtmp.RTMPMinaTransport=INFO
log4j.logger.org.red5.server.net.rtmpt=WARN
log4j.logger.org.red5.server.net.servlet=WARN
log4j.logger.org.red5.server.net.servlet.RTMPTServlet=WARN
log4j.logger.org.red5.server.persistence=WARN
log4j.logger.org.red5.server.pooling.ThreadObjectFactory=WARN
log4j.logger.org.red5.server.service=INFO
log4j.logger.org.red5.server.so=WARN
log4j.logger.org.red5.server.stream=INFO
log4j.logger.org.red5.server.stream.consumer=WARN
log4j.logger.org.red5.server.script=WARN
# Apache / Other
log4j.logger.org.apache.catalina.authenticator=INFO
log4j.logger.org.apache.catalina.session=INFO
log4j.logger.httpclient=WARN
log4j.logger.org.apache.commons.digester=WARN
log4j.logger.org.apache.jasper=INFO
log4j.logger.org.apache.commons.httpclient=WARN
log4j.logger.org.apache.commons.beanutils=WARN
log4j.logger.org.quartz=WARN
# Spring
log4j.logger.org.springframework=INFO
log4j.logger.org.springframework.beans.factory=INFO
log4j.logger.org.springframework.beans.factory.xml=WARN
log4j.logger.org.springframework.web.context=INFO
log4j.logger.org.springframework.web.context.support=WARN
log4j.logger.org.springframework.ui.context.support=WARN
# Jetty
log4j.logger.org.red5.server.JettyLoader=INFO
log4j.logger.org.red5.server.jetty.Red5WebPropertiesConfiguration=WARN
log4j.logger.org.mortbay=INFO
log4j.logger.org.mortbay.log=INFO
# Tomcat
log4j.logger.org.red5.server.TomcatLoader=INFO
log4j.logger.org.apache.catalina=INFO
log4j.logger.org.apache.catalina.realm=WARN
log4j.logger.org.apache.catalina.session=WARN
log4j.logger.org.apache.commons.modeler=WARN
log4j.logger.org.apache.commons.digester=WARN
# Cache
log4j.logger.org.red5.server.cache=WARN
log4j.logger.net.sf.ehcache=INFO
log4j.logger.com.whirlycott.cache=WARN
log4j.logger.com.whirlycott.cache.policy=WARN
# Mina
log4j.logger.org.apache.mina=WARN
log4j.logger.org.apache.mina.filter=WARN
log4j.logger.org.apache.mina.filter.thread.ThreadPoolFilter=WARN
# Demos
log4j.logger.org.red5.server.webapp.oflaDemo=WARN
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Threshold=DEBUG
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=[%p] %d{ISO8601} %t:( %c.%M ) %m %n
log4j.appender.FLOG=org.apache.log4j.RollingFileAppender
log4j.appender.FLOG.File=red5.log
log4j.appender.FLOG.Threshold=DEBUG
log4j.appender.FLOG.MaxFileSize=20000KB
log4j.appender.FLOG.MaxBackupIndex=1
log4j.appender.FLOG.layout=org.apache.log4j.PatternLayout
log4j.appender.FLOG.layout.ConversionPattern=[%p] %d{ISO8601} %t:( %c{1}.%M ) %m %n
log4j.appender.PROXY=org.apache.log4j.RollingFileAppender
log4j.appender.PROXY.File=proxy.log
log4j.appender.PROXY.Threshold=DEBUG
log4j.appender.PROXY.MaxFileSize=20000KB
log4j.appender.PROXY.MaxBackupIndex=1
log4j.appender.PROXY.layout=org.apache.log4j.PatternLayout
log4j.appender.PROXY.layout.ConversionPattern=[%c{1}] (%d{ISO8601}) %m %n

View File

@ -0,0 +1,230 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<consolePlugin/>
<!-- Appenders http://logback.qos.ch/manual/appenders.html -->
<appender name="CONSOLE"
class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>INFO</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>
%date [%thread] %-5level %logger - %msg%n
</Pattern>
</layout>
</appender>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<File>../log/red5.log</File>
<Append>false</Append>
<Encoding>UTF-8</Encoding>
<BufferedIO>false</BufferedIO>
<ImmediateFlush>true</ImmediateFlush>
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>
%date [%thread] %-5level %logger{35} - %msg%n
</Pattern>
</layout>
</appender>
<appender name="ERRORFILE" class="ch.qos.logback.core.FileAppender">
<File>../log/error.log</File>
<Append>false</Append>
<Encoding>UTF-8</Encoding>
<BufferedIO>false</BufferedIO>
<ImmediateFlush>true</ImmediateFlush>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>WARN</level>
</filter>
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>
%date [%thread] %-5level %logger{35} - %msg%n
</Pattern>
</layout>
</appender>
<root>
<level value="DEBUG" />
<appender-ref ref="CONSOLE" />
<appender-ref ref="FILE" />
<appender-ref ref="ERRORFILE" />
</root>
<!-- Red5 -->
<logger name="org.red5.io">
<level value="DEBUG" />
</logger>
<logger name="org.red5.server">
<level value="WARN" />
</logger>
<logger name="org.red5.server.Client">
<level value="INFO" />
</logger>
<logger name="org.red5.server.jetty">
<level value="INFO" />
</logger>
<logger name="org.red5.server.Standalone">
<level value="INFO" />
</logger>
<logger name="org.red5.server.tomcat">
<level value="INFO" />
</logger>
<logger name="org.red5.server.api.stream.support">
<level value="INFO" />
</logger>
<logger name="org.red5.server.cache">
<level value="WARN" />
</logger>
<logger
name="org.red5.server.jetty.Red5WebPropertiesConfiguration">
<level value="WARN" />
</logger>
<logger name="org.red5.server.jmx">
<level value="INFO" />
</logger>
<logger name="org.red5.server.messaging.InMemoryPushPushPipe">
<level value="INFO" />
</logger>
<logger name="org.red5.server.net">
<level value="INFO" />
</logger>
<logger name="org.red5.server.net.servlet.RTMPTServlet">
<level value="WARN" />
</logger>
<logger name="org.red5.server.net.servlet">
<level value="WARN" />
</logger>
<logger name="org.red5.server.net.proxy">
<level value="INFO" />
</logger>
<logger name="org.red5.server.net.remoting">
<level value="WARN" />
</logger>
<logger name="org.red5.server.net.rtmp">
<level value="WARN" />
</logger>
<logger name="org.red5.server.net.rtmp.RTMPHandler">
<level value="OFF" />
</logger>
<logger name="org.red5.server.net.rtmp.BaseRTMPHandler">
<level value="OFF" />
</logger>
<logger name="org.red5.server.net.rtmp.codec">
<level value="INFO" />
</logger>
<logger name="org.red5.server.net.rtmp.RTMPMinaIoHandler">
<level value="OFF" />
</logger>
<logger name="org.red5.server.net.rtmp.RTMPMinaTransport">
<level value="INFO" />
</logger>
<logger name="org.red5.server.net.rtmp.status">
<level value="INFO" />
</logger>
<logger name="org.red5.server.net.rtmpt">
<level value="WARN" />
</logger>
<logger name="org.red5.server.persistence">
<level value="WARN" />
</logger>
<logger name="org.red5.server.pooling.ThreadObjectFactory">
<level value="WARN" />
</logger>
<logger name="org.red5.server.script">
<level value="WARN" />
</logger>
<logger name="org.red5.server.service">
<level value="INFO" />
</logger>
<logger name="org.red5.server.so">
<level value="WARN" />
</logger>
<logger name="org.red5.server.stream">
<level value="INFO" />
</logger>
<logger name="org.red5.server.stream.consumer">
<level value="WARN" />
</logger>
<logger name="org.red5.server.net.mrtmp">
<level value="WARN" />
</logger>
<logger name="org.red5.server.net.mrtmp.codec">
<level value="WARN" />
</logger>
<!-- Mina -->
<logger name="org.apache.mina">
<level value="WARN" />
</logger>
<logger name="org.apache.mina.filter">
<level value="WARN" />
</logger>
<logger name="org.apache.mina.filter.thread.ThreadPoolFilter">
<level value="WARN" />
</logger>
<!-- Apache commons -->
<logger name="org.apache.commons.modeler">
<level value="WARN" />
</logger>
<logger name="org.apache.commons.beanutils">
<level value="WARN" />
</logger>
<logger name="org.apache.commons.digester">
<level value="WARN" />
</logger>
<logger name="httpclient">
<level value="WARN" />
</logger>
<!-- Apache catalina / tomcat -->
<logger name="org.apache.catalina">
<level value="INFO" />
</logger>
<logger name="org.apache.catalina.authenticator">
<level value="INFO" />
</logger>
<logger name="org.apache.catalina.realm">
<level value="WARN" />
</logger>
<logger name="org.apache.catalina.session">
<level value="WARN" />
</logger>
<logger name="org.apache.jasper">
<level value="INFO" />
</logger>
<!-- Jetty -->
<logger name="org.mortbay">
<level value="WARN" />
</logger>
<logger name="org.mortbay.log">
<level value="INFO" />
</logger>
<!-- Spring -->
<logger name="org.springframework">
<level value="INFO" />
</logger>
<logger name="org.springframework.beans.factory">
<level value="INFO" />
</logger>
<logger name="org.springframework.beans.factory.xml">
<level value="WARN" />
</logger>
<logger name="org.springframework.ui.context.support">
<level value="WARN" />
</logger>
<logger name="org.springframework.web.context">
<level value="INFO" />
</logger>
<logger name="org.springframework.web.context.support">
<level value="WARN" />
</logger>
<logger name="org.quartz">
<level value="WARN" />
</logger>
<!-- Caching -->
<logger name="net.sf.ehcache">
<level value="INFO" />
</logger>
<logger name="com.whirlycott.cache">
<level value="WARN" />
</logger>
<logger name="com.whirlycott.cache.policy">
<level value="WARN" />
</logger>
</configuration>

View File

@ -0,0 +1,33 @@
# password.properties
# Password file for Remote JMX API authentication. This file defines
# the different roles and their passwords.
# The file format for the password file is syntactically the same as
# the Properties file format. The syntax is described in the Javadoc
# for java.util.Properties.load.
# A typical password file has multiple lines, where each line is blank,
# a comment (like this one), or a password entry.
# A password entry consists of a role name and an associated password.
# The role name is any string that does not itself contain spaces or
# tabs. The password is again any string that does not contain spaces
# or tabs. Note that passwords appear in the clear in this file, so it
# is a good idea not to use valuable passwords.
# A given role should have at most one entry in this file. If a role
# has no entry, it has no access.
# If multiple entries are found for the same role name, then the last
# one is used.
# In a typical installation, this file can be read by anybody on the
# local machine, and possibly by people on other machines.
# For security, you should either restrict the access to this file,
# or specify another, less accessible file in the management config
# file as described above.
# Role and password used for authentication by the RMI connector in
# this example.
#
red5user changeme

View File

@ -0,0 +1,14 @@
#
# This file defines users passwords and roles for a HashUserRealm
#
# The format is
# <username>: <password>[,<rolename> ...]
#
# Passwords may be clear text, obfuscated or checksummed. The class
# org.mortbay.util.Password should be used to generate obfuscated
# passwords or password checksums
#
# If DIGEST Authentication is used, the password must be in a recoverable
# format, either plain text or OBF:.
#
admin: admin,admin

View File

@ -0,0 +1,228 @@
<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:lang="http://www.springframework.org/schema/lang" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd">
<bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<!-- This context is shared between all child contexts. -->
<!-- Server bean -->
<bean id="red5.server" class="org.red5.server.Server"/>
<!-- JMX server -->
<bean id="jmxFactory" class="org.red5.server.jmx.JMXFactory">
<property name="domain" value="org.red5.server"/>
</bean>
<bean id="jmxAgent" class="org.red5.server.jmx.JMXAgent" init-method="init">
<!-- The RMI adapter allows remote connections to the MBeanServer -->
<property name="enableRmiAdapter" value="true"/>
<property name="rmiAdapterPort" value="9999"/>
<!-- SSL
To use jmx with ssl you must also supply the location of the keystore and its password
when starting the server with the following JVM options:
-Djavax.net.ssl.keyStore=keystore
-Djavax.net.ssl.keyStorePassword=password
-->
<property name="enableSsl" value="false"/>
<!-- Starts a registry if it doesnt exist -->
<property name="startRegistry" value="true"/>
<!-- Authentication -->
<property name="remoteAccessProperties" value="${red5.config_root}/access.properties"/>
<property name="remotePasswordProperties" value="${red5.config_root}/password.properties"/>
<!-- The HTML adapter allows connections to the MBeanServer via a web browser -->
<property name="enableHtmlAdapter" value="false"/>
<property name="htmlAdapterPort" value="8082"/>
<!-- Mina offers its own Mbeans so you may integrate them here -->
<property name="enableMinaMonitor" value="true"/>
</bean>
<!-- Serializes objects to AMF binary -->
<bean id="serializer" class="org.red5.io.object.Serializer"/>
<!-- Deserializes objects from AMF binary -->
<bean id="deserializer" class="org.red5.io.object.Deserializer"/>
<!-- Deals with StatusObjects representing statuses like FMS NetConnection.Connect.Success status -->
<bean id="statusObjectService" class="org.red5.server.net.rtmp.status.StatusObjectService"
autowire="byType" init-method="initialize"/>
<!-- RTMP codec factory -->
<bean id="rtmpCodecFactory" class="org.red5.server.net.rtmp.codec.RTMPMinaCodecFactory"
autowire="byType" init-method="init">
<property name="minaEncoder">
<bean class="org.red5.server.net.rtmp.codec.RTMPMinaProtocolEncoder">
<property name="serializer">
<ref bean="serializer"/>
</property>
</bean>
</property>
<property name="minaDecoder">
<bean class="org.red5.server.net.rtmp.codec.RTMPMinaProtocolDecoder">
<property name="deserializer">
<ref bean="deserializer"/>
</property>
</bean>
</property>
</bean>
<!-- Remoting calls codec factory -->
<bean id="remotingCodecFactory" class="org.red5.server.net.remoting.codec.RemotingCodecFactory"
autowire="byType" init-method="init"/>
<!-- Video codec factory -->
<bean id="videoCodecFactory" class="org.red5.server.stream.VideoCodecFactory">
<property name="codecs">
<list>
<bean id="screenVideoCodec" class="org.red5.server.stream.codec.ScreenVideo"/>
<!--
<bean id="sorensonVideoCodec" class="org.red5.server.stream.codec.SorensonVideo"/>
-->
</list>
</property>
</bean>
<!-- Streamable file factory -->
<bean id="streamableFileFactory" class="org.red5.io.StreamableFileFactory">
<property name="services">
<list>
<bean id="flvFileService" class="org.red5.io.flv.impl.FLVService">
<property name="generateMetadata" value="true"/>
</bean>
<bean id="mp3FileService" class="org.red5.io.mp3.impl.MP3Service"/>
</list>
</property>
</bean>
<!-- Thread that writes modified objects to disk periodically -->
<bean id="filePersistenceThread" class="org.red5.server.persistence.FilePersistenceThread"/>
<!-- Handles creation / lookup of shared objects -->
<bean id="sharedObjectService" class="org.red5.server.so.SharedObjectService">
<property name="persistenceClassName">
<value>org.red5.server.persistence.FilePersistence</value>
</property>
</bean>
<!-- High level access to streams -->
<bean id="streamService" class="org.red5.server.stream.StreamService"/>
<!-- Hight level access to broadcasted streams -->
<bean id="providerService" class="org.red5.server.stream.ProviderService"/>
<!-- Provides output to consumers -->
<bean id="consumerService" class="org.red5.server.stream.ConsumerService"/>
<!-- Simple bandwidth control -->
<bean id="BWControlService" class="org.red5.server.stream.SimpleBWControlService" init-method="init" destroy-method="shutdown">
<property name="interval" value="100"/>
<property name="defaultCapacity" value="104857600"/>
<!-- 100MB -->
</bean>
<!-- Dummy bandwidth control that does nothing -->
<!--
<bean id="BWControlService" class="org.red5.server.stream.DummyBWControlService"/> -->
<!-- Scheduling service -->
<bean id="schedulingService" class="org.red5.server.scheduling.QuartzSchedulingService"
destroy-method="shutdown"/>
<!-- Threadpool settings for the remoting clients -->
<bean id="remotingPool" class="org.red5.server.pooling.ThreadPool">
<property name="poolSize" value="8"/>
</bean>
<!-- Use injection to setup thread pool for remoting clients -->
<bean id="remotingClient" class="org.red5.server.net.remoting.RemotingClient">
<property name="threadPool" ref="remotingPool"/>
</bean>
<!--
Now we can load the cache engine, only one may be enabled at a time. If no-caching is required select the
NoCacheImpl. Three other implementations based on EhCache, WhirlyCache, and Red5Cache are also available.
-->
<bean id="object.cache" class="org.red5.server.cache.NoCacheImpl"/>
<!--
<bean id="object.cache" class="org.red5.server.cache.CacheImpl" init-method="init" autowire="byType">
<property name="maxEntries"><value>5</value></property>
</bean>
<bean id="object.cache" class="org.red5.server.cache.WhirlyCacheImpl" init-method="init" autowire="byType">
<property name="maxEntries" value="5" />
<property name="cacheConfig">
<bean class="com.whirlycott.cache.CacheConfiguration">
<property name="name" value="flv.cache" />
<property name="maxSize" value="5" />
<property name="policy"><value>com.whirlycott.cache.policy.LFUMaintenancePolicy</value></property>
<property name="backend"><value>com.whirlycott.cache.impl.FastHashMapImpl</value></property>
</bean>
</property>
</bean>
<bean id="object.cache" class="org.red5.server.cache.EhCacheImpl" init-method="init">
<property name="diskStore" value="java.io.tmpdir" />
<property name="memoryStoreEvictionPolicy" value="LFU" />
<property name="cacheManagerEventListener"><null/></property>
<property name="cacheConfigs">
<list>
<bean class="net.sf.ehcache.config.CacheConfiguration">
<property name="name" value="flv.cache" />
<property name="maxElementsInMemory" value="5" />
<property name="eternal" value="false" />
<property name="timeToIdleSeconds" value="0" />
<property name="timeToLiveSeconds" value="0" />
<property name="overflowToDisk" value="false" />
<property name="diskPersistent" value="false" />
</bean>
</list>
</property>
</bean>
-->
<!--
Cache to use for keyframe metadata.
-->
<bean id="keyframe.cache" class="org.red5.io.CachingFileKeyFrameMetaCache">
<property name="maxCacheEntry" value="500" />
</bean>
<!--
Represents FLV files
Use injection to set the cache impl to be used with flvs
-->
<bean id="flv.impl" class="org.red5.io.flv.impl.FLV">
<property name="cache">
<ref bean="object.cache"/>
</property>
</bean>
<!-- Use injection to set the keyframe cache for FLV files -->
<bean id="flvreader.impl" class="org.red5.io.flv.impl.FLVReader">
<property name="keyFrameCache">
<ref bean="keyframe.cache"/>
</property>
</bean>
<!-- Use injection to set the keyframe cache for MP3 files -->
<bean id="mp3reader.impl" class="org.red5.io.mp3.impl.MP3Reader">
<property name="frameCache">
<ref bean="keyframe.cache"/>
</property>
</bean>
<!-- Use injection to set the buffer type for reading FLV files -->
<bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="staticMethod">
<value>org.red5.io.flv.impl.FLVReader.setBufferType</value>
</property>
<!-- Three buffer types are available 'auto', 'heap', and 'direct' -->
<property name="arguments" value="auto"/>
</bean>
<!-- Use injection to set the buffer size for reading FLV files -->
<bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="staticMethod">
<value>org.red5.io.flv.impl.FLVReader.setBufferSize</value>
</property>
<!-- Three buffer types are available 'auto', 'heap', and 'direct' -->
<property name="arguments" value="4096"/>
</bean>
<!-- Executor that will be used to schedule stream playback to keep
the client buffer filled.
-->
<bean id="streamExecutor" class="java.util.concurrent.ScheduledThreadPoolExecutor">
<constructor-arg value="4"/>
<property name="maximumPoolSize" value="32"/>
</bean>
<!-- ClientBroadcastStream and PlaylistSubscriberStream
that will be used by RTMPConnection and maybe other classes.
These beans are lazy-init because most likely server will need
to be up and running before we can get a smart implementation
of these streams
-->
<bean id="playlistSubscriberStream" scope="prototype" lazy-init="true" class="org.red5.server.stream.PlaylistSubscriberStream">
<property name="executor" ref="streamExecutor"/>
<!-- Check for buffer underruns every X ms and generate NetStream.Play.InsufficientBW accordingly.
Set to 0 to disable. Be careful not to set this value too small to avoid network congestion.
-->
<property name="bufferCheckInterval" value="5000"/>
<!-- A NetStream.Play.InsufficientBW message is generated if more than X messages are queued for sending on the connection.
This value will also control the maximum pending messages on the server. To use a smaller value on slow connections
to get smaller delay for downstream server commands.
-->
<property name="underrunTrigger" value="10"/>
</bean>
<bean id="clientBroadcastStream" scope="prototype" lazy-init="true" class="org.red5.server.stream.ClientBroadcastStream"/>
</beans>

View File

@ -0,0 +1,204 @@
<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:lang="http://www.springframework.org/schema/lang"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd">
<!-- This context holds all the networking: mina -->
<bean id="customEditorConfigurer"
class="org.springframework.beans.factory.config.CustomEditorConfigurer">
<property name="customEditors">
<map>
<entry key="java.net.SocketAddress">
<bean
class="org.apache.mina.integration.spring.InetSocketAddressEditor" />
</entry>
</map>
</property>
</bean>
<bean id="placeholderConfig"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:/red5.properties" />
</bean>
<!-- RTMP Handler -->
<bean id="rtmpHandler"
class="org.red5.server.net.rtmp.RTMPHandler">
<property name="server" ref="red5.server" />
<property name="statusObjectService" ref="statusObjectService" />
</bean>
<bean id="rtmpMinaConnManager"
class="org.red5.server.net.rtmp.RTMPConnManager">
</bean>
<!-- RTMP Mina IO Handler -->
<bean id="rtmpMinaIoHandler"
class="org.red5.server.net.rtmp.RTMPMinaIoHandler">
<property name="handler" ref="rtmpHandler" />
<property name="codecFactory" ref="rtmpCodecFactory" />
<property name="rtmpConnManager" ref="rtmpMinaConnManager" />
</bean>
<!-- RTMP Mina Transport -->
<bean id="rtmpTransport" class="org.red5.server.net.rtmp.RTMPMinaTransport" init-method="start" destroy-method="stop">
<property name="ioHandler" ref="rtmpMinaIoHandler" />
<property name="address" value="${rtmp.host}" />
<property name="port" value="${rtmp.port}" />
<property name="receiveBufferSize" value="${rtmp.receive_buffer_size}" />
<property name="sendBufferSize" value="${rtmp.send_buffer_size}" />
<property name="eventThreadsCore" value="${rtmp.event_threads_core}" />
<property name="eventThreadsMax" value="${rtmp.event_threads_max}" />
<property name="eventThreadsQueue" value="${rtmp.event_threads_queue}" />
<property name="eventThreadsKeepalive" value="${rtmp.event_threads_keepalive}" />
<!-- This is the interval at which the sessions are polled for stats. If mina monitoring is not
enabled, polling will not occur. -->
<property name="jmxPollInterval" value="1000" />
<property name="tcpNoDelay" value="${rtmp.tcp_nodelay}" />
</bean>
<!-- RTMP Mina Connection -->
<bean id="rtmpMinaConnection" scope="prototype"
class="org.red5.server.net.rtmp.RTMPMinaConnection">
<!-- Ping clients every X ms. Set to 0 to disable ghost detection code. -->
<property name="pingInterval" value="${rtmp.ping_interval}" />
<!-- Disconnect client after X ms of not responding. -->
<property name="maxInactivity" value="${rtmp.max_inactivity}" />
<!-- Max. time in milliseconds to wait for a valid handshake. -->
<property name="maxHandshakeTimeout" value="5000" />
</bean>
<bean id="rtmptConnManager"
class="org.red5.server.net.rtmp.RTMPConnManager">
</bean>
<!-- RTMPT Handler -->
<bean id="rtmptHandler"
class="org.red5.server.net.rtmpt.RTMPTHandler" autowire="byType">
<property name="codecFactory" ref="rtmpCodecFactory" />
</bean>
<!-- Use injection to store RTMPT handler in servlet -->
<bean id="rtmptServlet"
class="org.red5.server.net.rtmpt.RTMPTServlet">
<property name="handler" ref="rtmptHandler" />
<property name="rtmpConnManager" ref="rtmptConnManager" />
</bean>
<!-- RTMPT Connection -->
<bean id="rtmptConnection" scope="prototype"
class="org.red5.server.net.rtmpt.RTMPTConnection">
<!-- Ping clients every X ms. Set to 0 to disable ghost detection code. -->
<property name="pingInterval" value="${rtmp.ping_interval}" />
<!-- Disconnect client after X ms of not responding. -->
<property name="maxInactivity" value="${rtmp.max_inactivity}" />
<!-- Max. time in milliseconds to wait for a valid handshake. -->
<property name="maxHandshakeTimeout" value="5000" />
</bean>
<!-- Jetty RTMPT Container -->
<bean id="rtmpt.server"
class="org.red5.server.net.rtmpt.RTMPTLoader" init-method="init"
autowire="byType" />
<!-- Tomcat Container -->
<!--
<bean id="rtmpt.server" class="org.red5.server.net.rtmpt.TomcatRTMPTLoader" init-method="init" autowire="byType">
<property name="embedded">
<bean class="org.apache.catalina.startup.Embedded" />
</property>
<property name="engine">
<bean class="org.apache.catalina.core.StandardEngine">
<property name="name" value="rtmptServletHandler" />
<property name="defaultHost" value="localhost" />
</bean>
</property>
<property name="connector">
<bean class="org.apache.catalina.connector.Connector">
<property name="port"><value>8088</value></property>
<property name="enableLookups"><value>false</value></property>
</bean>
</property>
<property name="host">
<bean class="org.apache.catalina.core.StandardHost">
<property name="name" value="localhost" />
<property name="unpackWARs" value="false" />
<property name="autoDeploy" value="false" />
<property name="xmlValidation" value="false" />
<property name="xmlNamespaceAware" value="false" />
</bean>
</property>
<property name="context">
<map>
<entry>
<key><value>name</value></key>
<value>rtmptContext</value>
</entry>
<entry>
<key><value>path</value></key>
<value></value>
</entry>
<entry>
<key><value>docBase</value></key>
<value>/</value>
</entry>
</map>
</property>
<property name="wrapper">
<bean class="org.apache.catalina.core.StandardWrapper">
<property name="servletName" value="RTMPTServlet" />
<property name="servletClass" value="org.red5.server.net.servlet.RTMPTServlet" />
</bean>
</property>
<property name="mappings">
<map>
<entry>
<key><value>RTMPTServlet</value></key>
<value>/open/*</value>
</entry>
<entry>
<key><value>RTMPTServlet</value></key>
<value>/close/*</value>
</entry>
<entry>
<key><value>RTMPTServlet</value></key>
<value>/send/*</value>
</entry>
<entry>
<key><value>RTMPTServlet</value></key>
<value>/idle/*</value>
</entry>
</map>
</property>
</bean>
-->
<!-- Enable when you need it.
<bean id="rtmpProxyTransport" class="org.red5.server.net.rtmp.RTMPMinaTransport" init-method="start" destroy-method="stop">
<property name="ioHandler" ref="debugProxyIoHandler" />
<property name="address" value="${proxy.source_host}" />
<property name="port" value="${proxy.source_port}" />
<property name="receiveBufferSize" value="${rtmp.receive_buffer_size}" />
<property name="sendBufferSize" value="${rtmp.send_buffer_size}" />
<property name="eventThreadsCore" value="${rtmp.event_threads_core}" />
<property name="eventThreadsMax" value="${rtmp.event_threads_max}" />
<property name="eventThreadsQueue" value="${rtmp.event_threads_queue}" />
<property name="eventThreadsKeepalive" value="${rtmp.event_threads_keepalive}" />
</bean>
<bean id="debugProxyIoHandler"
class="org.red5.server.net.proxy.DebugProxyHandler">
<property name="codecFactory" ref="rtmpCodecFactory" />
<property name="forward" value="${proxy.destination_host}:${proxy.destination_port}" />
<property name="dumpTo" value="./webapps/dump/" />
</bean>
-->
</beans>

View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:lang="http://www.springframework.org/schema/lang"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd">
<!-- This context holds all the networking: mina -->
<bean id="customEditorConfigurer"
class="org.springframework.beans.factory.config.CustomEditorConfigurer">
<property name="customEditors">
<map>
<entry key="java.net.SocketAddress">
<bean
class="org.apache.mina.integration.spring.InetSocketAddressEditor" />
</entry>
</map>
</property>
</bean>
<bean id="placeholderConfig"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:/red5.properties" />
</bean>
<!-- RTMP Handler -->
<bean id="rtmpHandler"
class="org.red5.server.net.rtmp.EdgeRTMPHandler">
<property name="server" ref="red5.server" />
<property name="statusObjectService" ref="statusObjectService" />
<property name="MRTMPManager" ref="mrtmpEdgeManager" />
</bean>
<bean id="rtmpMinaConnManager"
class="org.red5.server.net.rtmp.RTMPConnManager">
</bean>
<!-- RTMP Mina IO Handler -->
<bean id="rtmpMinaIoHandler"
class="org.red5.server.net.rtmp.EdgeRTMPMinaIoHandler">
<property name="handler" ref="rtmpHandler" />
<property name="codecFactory" ref="rtmpCodecFactory" />
<property name="rtmpConnManager" ref="rtmpMinaConnManager" />
</bean>
<!-- RTMP Mina Transport -->
<bean id="rtmpTransport" class="org.red5.server.net.rtmp.RTMPMinaTransport" init-method="start" destroy-method="stop">
<property name="ioHandler" ref="rtmpMinaIoHandler" />
<property name="address" value="${rtmp.host}" />
<property name="port" value="${rtmp.port}" />
<property name="receiveBufferSize" value="${rtmp.receive_buffer_size}" />
<property name="sendBufferSize" value="${rtmp.send_buffer_size}" />
<property name="eventThreadsCore" value="${rtmp.event_threads_core}" />
<property name="eventThreadsMax" value="${rtmp.event_threads_max}" />
<property name="eventThreadsQueue" value="${rtmp.event_threads_queue}" />
<property name="eventThreadsKeepalive" value="${rtmp.event_threads_keepalive}" />
<!-- This is the interval at which the sessions are polled for stats. If mina monitoring is not
enabled, polling will not occur. -->
<property name="jmxPollInterval" value="1000" />
<property name="tcpNoDelay" value="${rtmp.tcp_nodelay}" />
</bean>
<!-- RTMP Mina Connection -->
<bean id="rtmpEdgeMinaConnection" scope="prototype"
class="org.red5.server.net.rtmp.EdgeRTMPMinaConnection">
<!-- Ping clients every X ms. Set to 0 to disable ghost detection code. -->
<property name="pingInterval" value="${rtmp.ping_interval}" />
<!-- Disconnect client after X ms of not responding. -->
<property name="maxInactivity" value="${rtmp.max_inactivity}" />
<!-- Max. time in milliseconds to wait for a valid handshake. -->
<property name="maxHandshakeTimeout" value="5000" />
<property name="mrtmpManager" ref="mrtmpEdgeManager" />
</bean>
<bean id="mrtmpCodecFactory"
class="org.red5.server.net.mrtmp.codec.MRTMPCodecFactory" />
<bean id="mrtmpHandler" class="org.red5.server.net.mrtmp.EdgeMRTMPHandler">
<property name="mrtmpManager" ref="mrtmpEdgeManager"/>
<property name="codecFactory" ref="mrtmpCodecFactory" />
<property name="rtmpConnManager" ref="rtmpMinaConnManager" />
</bean>
<bean id="mrtmpClient"
class="org.red5.server.net.mrtmp.MRTMPClient" init-method="start" >
<property name="ioHandler" ref="mrtmpHandler" />
<property name="server" value="localhost" />
<property name="port" value="${mrtmp.port}" />
</bean>
<bean id="mrtmpEdgeManager"
class="org.red5.server.net.mrtmp.SimpleMRTMPEdgeManager">
<property name="rtmpConnManager" ref="rtmpMinaConnManager" />
</bean>
<!-- Enable when you need it.
<bean id="rtmpProxyTransport" class="org.red5.server.net.rtmp.RTMPMinaTransport" init-method="start" destroy-method="stop">
<property name="ioHandler" ref="debugProxyIoHandler" />
<property name="address" value="${proxy.source_host}" />
<property name="port" value="${proxy.source_port}" />
<property name="receiveBufferSize" value="${rtmp.receive_buffer_size}" />
<property name="sendBufferSize" value="${rtmp.send_buffer_size}" />
<property name="eventThreadsCore" value="${rtmp.event_threads_core}" />
<property name="eventThreadsMax" value="${rtmp.event_threads_max}" />
<property name="eventThreadsQueue" value="${rtmp.event_threads_queue}" />
<property name="eventThreadsKeepalive" value="${rtmp.event_threads_keepalive}" />
</bean>
<bean id="debugProxyIoHandler"
class="org.red5.server.net.proxy.DebugProxyHandler">
<property name="codecFactory" ref="rtmpCodecFactory" />
<property name="forward" value="${proxy.destination_host}:${proxy.destination_port}" />
<property name="dumpTo" value="./webapps/dump/" />
</bean>
-->
</beans>

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:lang="http://www.springframework.org/schema/lang"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd">
<!-- This file just wires together the context tree. Its accessed by ContextSingletonBeanFactoryLocator -->
<bean id="placeholderConfig"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:/red5.properties" />
</bean>
<!-- First we load the common context, its shared between all the other contexts -->
<!-- Global context serves are the parent to all child contexts. -->
<bean id="red5.common"
class="org.springframework.context.support.FileSystemXmlApplicationContext">
<constructor-arg><list><value>classpath:/red5-common.xml</value></list></constructor-arg>
</bean>
<!-- Then we load the core context, with the common as parent -->
<!-- Context holding all the networking, users should need to edit. -->
<bean id="red5.core"
class="org.springframework.context.support.FileSystemXmlApplicationContext">
<constructor-arg><list><value>classpath:/red5-edge-core.xml</value></list></constructor-arg>
<constructor-arg><ref bean="red5.common" /></constructor-arg>
</bean>
<!-- Then we load the global contexts, note its important this happens before app container loads -->
<bean id="context.loader"
class="org.red5.server.ContextLoader"
init-method="init">
<property name="parentContext" ref="red5.common" />
<property name="contextsConfig" value="red5.globals" />
</bean>
</beans>

View File

@ -0,0 +1,213 @@
<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:lang="http://www.springframework.org/schema/lang"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd">
<!-- This context holds all the networking: mina -->
<bean id="customEditorConfigurer"
class="org.springframework.beans.factory.config.CustomEditorConfigurer">
<property name="customEditors">
<map>
<entry key="java.net.SocketAddress">
<bean
class="org.apache.mina.integration.spring.InetSocketAddressEditor" />
</entry>
</map>
</property>
</bean>
<bean id="placeholderConfig"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:/red5.properties" />
</bean>
<!-- RTMP Handler -->
<bean id="rtmpHandler"
class="org.red5.server.net.rtmp.RTMPHandler">
<property name="server" ref="red5.server" />
<property name="statusObjectService" ref="statusObjectService" />
</bean>
<bean id="mrtmpManager"
class="org.red5.server.net.mrtmp.SimpleMRTMPOriginManager" >
<property name="originMRTMPHandler" ref="mrtmpMinaIoHandler" />
</bean>
<bean id="mrtmpCodecFactory"
class="org.red5.server.net.mrtmp.codec.MRTMPCodecFactory" />
<!-- MRTMP Mina IO Handler -->
<bean id="mrtmpMinaIoHandler"
class="org.red5.server.net.mrtmp.OriginMRTMPHandler">
<property name="handler" ref="rtmpHandler" />
<property name="mrtmpManager" ref="mrtmpManager" />
<property name="codecFactory" ref="mrtmpCodecFactory" />
</bean>
<!-- MRTMP Mina Transport -->
<bean id="mrtmpTransport" class="org.red5.server.net.mrtmp.MRTMPMinaTransport" init-method="start" destroy-method="stop">
<property name="ioHandler" ref="mrtmpMinaIoHandler" />
<property name="address" value="${mrtmp.host}" />
<property name="port" value="${mrtmp.port}" />
<property name="receiveBufferSize" value="${mrtmp.receive_buffer_size}" />
<property name="sendBufferSize" value="${mrtmp.send_buffer_size}" />
<property name="eventThreadsCore" value="${mrtmp.event_threads_core}" />
<property name="eventThreadsMax" value="${mrtmp.event_threads_max}" />
<property name="eventThreadsQueue" value="${mrtmp.event_threads_queue}" />
<property name="eventThreadsKeepalive" value="${mrtmp.event_threads_keepalive}" />
<property name="tcpNoDelay" value="${mrtmp.tcp_nodelay}" />
</bean>
<!-- Uncomment this if you run Origin on a different server from Edge
and still want to use RTMP
<bean id="rtmpConnManager"
class="org.red5.server.net.rtmp.RTMPConnManager">
</bean>
<bean id="rtmpMinaIoHandler"
class="org.red5.server.net.rtmp.RTMPMinaIoHandler">
<property name="handler" ref="rtmpHandler" />
<property name="codecFactory" ref="rtmpCodecFactory" />
<property name="rtmpConnManager" ref="rtmpConnManager" />
</bean>
<bean id="rtmpTransport" class="org.red5.server.net.rtmp.RTMPMinaTransport" init-method="start" destroy-method="stop">
<property name="ioHandler" ref="rtmpMinaIoHandler" />
<property name="address" value="${rtmp.host}" />
<property name="port" value="${rtmp.port}" />
<property name="receiveBufferSize" value="${rtmp.receive_buffer_size}" />
<property name="sendBufferSize" value="${rtmp.send_buffer_size}" />
<property name="eventThreadsCore" value="${rtmp.event_threads_core}" />
<property name="eventThreadsMax" value="${rtmp.event_threads_max}" />
<property name="eventThreadsQueue" value="${rtmp.event_threads_queue}" />
<property name="eventThreadsKeepalive" value="${rtmp.event_threads_keepalive}" />
<property name="jmxPollInterval" value="1000" />
<property name="tcpNoDelay" value="${rtmp.tcp_nodelay}" />
</bean>
<bean id="rtmpMinaConnection" scope="prototype"
class="org.red5.server.net.rtmp.RTMPMinaConnection">
<property name="pingInterval" value="${rtmp.ping_interval}" />
<property name="maxInactivity" value="${rtmp.max_inactivity}" />
<property name="maxHandshakeTimeout" value="5000" />
</bean>
-->
<!--
+ The following configuration is for RTMPT.
-->
<bean id="rtmptConnManager"
class="org.red5.server.net.rtmp.RTMPConnManager">
</bean>
<!-- RTMPT Handler -->
<bean id="rtmptHandler"
class="org.red5.server.net.rtmpt.RTMPTHandler" autowire="byType">
<property name="codecFactory" ref="rtmpCodecFactory" />
</bean>
<!-- Use injection to store RTMPT handler in servlet -->
<bean id="rtmptServlet"
class="org.red5.server.net.rtmpt.RTMPTServlet">
<property name="handler" ref="rtmptHandler" />
<property name="rtmpConnManager" ref="rtmptConnManager" />
</bean>
<!-- RTMPT Connection -->
<bean id="rtmptConnection" scope="prototype"
class="org.red5.server.net.rtmpt.RTMPTConnection">
<!-- Ping clients every X ms. Set to 0 to disable ghost detection code. -->
<property name="pingInterval" value="${rtmp.ping_interval}" />
<!-- Disconnect client after X ms of not responding. -->
<property name="maxInactivity" value="${rtmp.max_inactivity}" />
<!-- Max. time in milliseconds to wait for a valid handshake. -->
<property name="maxHandshakeTimeout" value="5000" />
</bean>
<!-- Jetty RTMPT Container -->
<bean id="rtmpt.server"
class="org.red5.server.net.rtmpt.RTMPTLoader" init-method="init"
autowire="byType" />
<!-- Tomcat Container -->
<!--
<bean id="rtmpt.server" class="org.red5.server.net.rtmpt.TomcatRTMPTLoader" init-method="init" autowire="byType">
<property name="embedded">
<bean class="org.apache.catalina.startup.Embedded" />
</property>
<property name="engine">
<bean class="org.apache.catalina.core.StandardEngine">
<property name="name" value="rtmptServletHandler" />
<property name="defaultHost" value="localhost" />
</bean>
</property>
<property name="connector">
<bean class="org.apache.catalina.connector.Connector">
<property name="port"><value>8088</value></property>
<property name="enableLookups"><value>false</value></property>
</bean>
</property>
<property name="host">
<bean class="org.apache.catalina.core.StandardHost">
<property name="name" value="localhost" />
<property name="unpackWARs" value="false" />
<property name="autoDeploy" value="false" />
<property name="xmlValidation" value="false" />
<property name="xmlNamespaceAware" value="false" />
</bean>
</property>
<property name="context">
<map>
<entry>
<key><value>name</value></key>
<value>rtmptContext</value>
</entry>
<entry>
<key><value>path</value></key>
<value></value>
</entry>
<entry>
<key><value>docBase</value></key>
<value>/</value>
</entry>
</map>
</property>
<property name="wrapper">
<bean class="org.apache.catalina.core.StandardWrapper">
<property name="servletName" value="RTMPTServlet" />
<property name="servletClass" value="org.red5.server.net.servlet.RTMPTServlet" />
</bean>
</property>
<property name="mappings">
<map>
<entry>
<key><value>RTMPTServlet</value></key>
<value>/open/*</value>
</entry>
<entry>
<key><value>RTMPTServlet</value></key>
<value>/close/*</value>
</entry>
<entry>
<key><value>RTMPTServlet</value></key>
<value>/send/*</value>
</entry>
<entry>
<key><value>RTMPTServlet</value></key>
<value>/idle/*</value>
</entry>
</map>
</property>
</bean>
-->
</beans>

View File

@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:lang="http://www.springframework.org/schema/lang"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd">
<!-- This file just wires together the context tree. Its accessed by ContextSingletonBeanFactoryLocator -->
<bean id="placeholderConfig"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:/red5.properties" />
</bean>
<!-- First we load the common context, its shared between all the other contexts -->
<!-- Global context serves are the parent to all child contexts. -->
<bean id="red5.common"
class="org.springframework.context.support.FileSystemXmlApplicationContext">
<constructor-arg><list><value>classpath:/red5-common.xml</value></list></constructor-arg>
</bean>
<!-- Then we load the core context, with the common as parent -->
<!-- Context holding all the networking, users should need to edit. -->
<bean id="red5.core"
class="org.springframework.context.support.FileSystemXmlApplicationContext">
<constructor-arg><list><value>classpath:/red5-origin-core.xml</value></list></constructor-arg>
<constructor-arg><ref bean="red5.common" /></constructor-arg>
</bean>
<!-- Then we load the global contexts, note its important this happens before app container loads -->
<bean id="context.loader"
class="org.red5.server.ContextLoader"
init-method="init">
<property name="parentContext" ref="red5.common" />
<property name="contextsConfig" value="red5.globals" />
</bean>
<!-- Now we can load the servlet engine, this has to happen after the context are loaded -->
<bean id="jetty6.server" class="org.red5.server.jetty.JettyLoader" init-method="init" autowire="byType" depends-on="context.loader">
<property name="webappFolder" value="${red5.root}/webapps" />
</bean>
<!--
<bean id="tomcat.server" class="org.red5.server.tomcat.TomcatLoader" init-method="init" destroy-method="shutdown" autowire="byType" depends-on="context.loader">
<!- - Note: the webapp root folder must be specified before the "contexts" property - ->
<property name="webappFolder" value="${red5.root}/webapps" />
<property name="embedded">
<bean class="org.apache.catalina.startup.Embedded" />
</property>
<property name="engine">
<bean class="org.apache.catalina.core.StandardEngine">
<property name="name" value="red5Engine" />
<property name="defaultHost" value="localhost" />
</bean>
</property>
<property name="realm">
<bean class="org.apache.catalina.realm.MemoryRealm" />
</property>
<property name="connector">
<bean class="org.apache.catalina.connector.Connector">
<property name="port"><value>5080</value></property>
<property name="redirectPort"><value>8443</value></property>
<property name="enableLookups"><value>false</value></property>
</bean>
</property>
<property name="baseHost">
<bean class="org.apache.catalina.core.StandardHost">
<property name="name" value="localhost" />
<property name="unpackWARs" value="true" />
<property name="autoDeploy" value="true" />
<property name="xmlValidation" value="false" />
<property name="xmlNamespaceAware" value="false" />
</bean>
</property>
<property name="valves">
<list>
<bean id="valve.access" class="org.apache.catalina.valves.AccessLogValve">
<property name="directory" value="." />
<property name="prefix" value="localhost_access." />
<property name="suffix" value=".log" />
<property name="pattern" value="common" />
<property name="resolveHosts" value="false" />
<property name="rotatable" value="true" />
</bean>
</list>
</property>
<property name="contexts">
<map>
<entry>
<key><value>/</value></key>
<value>/root</value>
</entry>
</map>
</property>
</bean>
-->
<!-- Default context. This can be shared between web app contexts -->
<!--
<bean id="default.context"
class="org.springframework.context.support.FileSystemXmlApplicationContext">
<constructor-arg><value>/webapps/red5-default.xml</value></constructor-arg>
<constructor-arg><ref bean="red5.common" /></constructor-arg>
</bean>
-->
<!-- You can add further contexts here. This allows for multiple separate global scopes -->
</beans>

View File

@ -0,0 +1,186 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<!-- =============================================================== -->
<!-- Configure the Jetty Server with Spring -->
<!-- This file is the equivalent of jetty.xml, but written in spring -->
<!-- XmlBeanFactory format. -->
<!-- The modules/spring/src/org/mortbay/spring/Main.java may be used -->
<!-- to run this file - or any other spring infrastructure that -->
<!-- accepts uses an XmlBeanFactory -->
<!-- =============================================================== -->
<beans>
<bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
<bean id="sysProps" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetClass"><value>java.lang.System</value></property>
<property name="targetMethod"><value>getProperties</value></property>
</bean>
<bean id="webappRoot"
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject">
<ref bean="sysProps" />
</property>
<property name="targetMethod">
<value>getProperty</value>
</property>
<property name="arguments">
<list>
<value>red5.webapp.root</value>
</list>
</property>
</bean>
<bean id="rtmptHost"
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject">
<ref bean="sysProps" />
</property>
<property name="targetMethod">
<value>getProperty</value>
</property>
<property name="arguments">
<list>
<value>rtmpt.host</value>
</list>
</property>
</bean>
<bean id="rtmptPort"
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject">
<ref bean="sysProps" />
</property>
<property name="targetMethod">
<value>getProperty</value>
</property>
<property name="arguments">
<list>
<value>rtmpt.port</value>
</list>
</property>
</bean>
<bean id="Server" class="org.mortbay.jetty.Server" init-method="start" destroy-method="stop">
<property name="threadPool">
<bean id="ThreadPool"
class="org.mortbay.thread.BoundedThreadPool">
<property name="minThreads" value="3" />
<property name="lowThreads" value="5" />
<property name="maxThreads" value="10" />
</bean>
</property>
<property name="connectors">
<list>
<bean id="Connector"
class="org.mortbay.jetty.nio.SelectChannelConnector">
<property name="host">
<ref local="rtmptHost" />
</property>
<property name="port">
<ref local="rtmptPort" />
</property>
<property name="maxIdleTime" value="3000" />
<property name="acceptors" value="2" />
<property name="confidentialPort" value="8443" />
</bean>
<!-- Uncomment to enable SSL, you should setup your own keystore and truststore -->
<!-- see: http://docs.codehaus.org/display/JETTY/How+to+configure+SSL -->
<!--
<bean id="sslConnector"
class="org.mortbay.jetty.security.SslSocketConnector">
<property name="host" value="127.0.0.1" />
<property name="port" value="1936" />
<property name="maxIdleTime" value="30000" />
<property name="keystore" value="${red5.config_root}/keystore.jmx" />
<property name="password" value="password" />
<property name="keyPassword" value="password" />
<property name="truststore" value="${red5.config_root}/truststore.jmx" />
<property name="trustPassword" value="trustword" />
</bean>
-->
</list>
</property>
<property name="handler">
<bean id="handlers" class="org.mortbay.jetty.handler.HandlerCollection">
<property name="handlers">
<list>
<bean id="contexts" class="org.mortbay.jetty.handler.ContextHandlerCollection">
<property name="handlers">
<list>
<bean id="rtmptContext" class="org.mortbay.jetty.handler.ContextHandler">
<property name="contextPath" value="/" />
<property name="handler">
<bean id="rtmptServletHandler" class="org.mortbay.jetty.servlet.ServletHandler">
<property name="servlets">
<list>
<bean class="org.mortbay.jetty.servlet.ServletHolder">
<property name="name" value="RTMPTServlet" />
<property name="className" value="org.red5.server.net.rtmpt.RTMPTServlet" />
</bean>
<bean class="org.mortbay.jetty.servlet.ServletHolder">
<property name="name" value="RedirectHTTPServlet" />
<property name="className" value="org.red5.server.net.servlet.RedirectHTTPServlet" />
</bean>
</list>
</property>
<property name="servletMappings">
<list>
<bean class="org.mortbay.jetty.servlet.ServletMapping">
<property name="pathSpec" value="/open/*" />
<property name="servletName" value="RTMPTServlet" />
</bean>
<bean class="org.mortbay.jetty.servlet.ServletMapping">
<property name="pathSpec" value="/close/*" />
<property name="servletName" value="RTMPTServlet" />
</bean>
<bean class="org.mortbay.jetty.servlet.ServletMapping">
<property name="pathSpec" value="/send/*" />
<property name="servletName" value="RTMPTServlet" />
</bean>
<bean class="org.mortbay.jetty.servlet.ServletMapping">
<property name="pathSpec" value="/idle/*" />
<property name="servletName" value="RTMPTServlet" />
</bean>
<bean class="org.mortbay.jetty.servlet.ServletMapping">
<property name="pathSpec" value="/*" />
<property name="servletName" value="RedirectHTTPServlet" />
</bean>
</list>
</property>
</bean>
</property>
</bean>
</list>
</property>
</bean>
</list>
</property>
</bean>
</property>
<property name="userRealms">
<list>
<bean
class="org.mortbay.jetty.security.HashUserRealm" depends-on="placeholderConfig">
<property name="name" value="Test Realm" />
<property name="config"><value>${red5.config_root}/realm.properties</value></property>
</bean>
</list>
</property>
</bean>
</beans>

View File

@ -0,0 +1 @@
default.context=${red5.root}/webapps/red5-default.xml

View File

@ -0,0 +1,18 @@
// ============================================================================
// Red5 JVM Security Policy
//
// This file contains the default security policy enforced by the JVM
// when Red5 starts up.
//
// Currently, AllPermission is enabled (essentially allowing anything to
// happen) which should be changed to be more restricted, depending on common
// deployment scenarios. AllPermission is only specified so there is
// _at least_ a starting point for a policy file that folks can edit.
//
// - Les Hazlewood, 5 July 2006.
//
// ============================================================================
grant {
permission java.security.AllPermission;
};

View File

@ -0,0 +1,40 @@
# HTTP
http.host=0.0.0.0
http.port=5080
https.port=8443
# RTMP
rtmp.host=0.0.0.0
rtmp.port=1935
rtmp.event_threads_core=16
rtmp.event_threads_max=64
# event threads queue: -1 unbounded, 0 direct (no queue), n bounded queue
rtmp.event_threads_queue=0
rtmp.event_threads_keepalive=60
rtmp.send_buffer_size=271360
rtmp.receive_buffer_size=65536
rtmp.ping_interval=5000
rtmp.max_inactivity=60000
rtmp.tcp_nodelay=true
# RTMPT
rtmpt.host=0.0.0.0
rtmpt.port=8088
rtmpt.ping_interval=5000
rtmpt.max_inactivity=60000
# MRTMP
mrtmp.host=0.0.0.0
mrtmp.port=9035
mrtmp.event_threads_core=4
mrtmp.event_threads_max=32
# event threads queue: -1 unbounded, 0 direct (no queue), n bounded queue
mrtmp.event_threads_queue=0
mrtmp.event_threads_keepalive=60
mrtmp.send_buffer_size=271360
mrtmp.receive_buffer_size=65536
mrtmp.ping_interval=5000
mrtmp.max_inactivity=60000
mrtmp.tcp_nodelay=true
# Debug proxy (needs to be activated in red5-core.xml)
proxy.source_host=127.0.0.1
proxy.source_port=1936
proxy.destination_host=127.0.0.1
proxy.destination_port=1935

View File

@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:lang="http://www.springframework.org/schema/lang"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd">
<!-- This file just wires together the context tree. Its accessed by ContextSingletonBeanFactoryLocator -->
<bean id="placeholderConfig"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:/red5.properties" />
</bean>
<!-- First we load the common context, its shared between all the other contexts -->
<!-- Global context serves are the parent to all child contexts. -->
<bean id="red5.common"
class="org.springframework.context.support.FileSystemXmlApplicationContext">
<constructor-arg><list><value>classpath:/red5-common.xml</value></list></constructor-arg>
</bean>
<!-- Then we load the core context, with the common as parent -->
<!-- Context holding all the networking, users should need to edit. -->
<bean id="red5.core"
class="org.springframework.context.support.FileSystemXmlApplicationContext">
<constructor-arg><list><value>classpath:/red5-core.xml</value></list></constructor-arg>
<constructor-arg><ref bean="red5.common" /></constructor-arg>
</bean>
<!-- Then we load the global contexts, note its important this happens before app container loads -->
<bean id="context.loader"
class="org.red5.server.ContextLoader"
init-method="init">
<property name="parentContext" ref="red5.common" />
<property name="contextsConfig" value="red5.globals" />
</bean>
<!-- Now we can load the servlet engine, this has to happen after the context are loaded -->
<bean id="jetty6.server" class="org.red5.server.jetty.JettyLoader" init-method="init" autowire="byType" depends-on="context.loader">
<property name="webappFolder" value="${red5.root}/webapps" />
</bean>
<!--
<bean id="tomcat.server" class="org.red5.server.tomcat.TomcatLoader" init-method="init" destroy-method="shutdown" autowire="byType" depends-on="context.loader">
<!- - Note: the webapp root folder must be specified before the "contexts" property - ->
<property name="webappFolder" value="${red5.root}/webapps" />
<property name="embedded">
<bean class="org.apache.catalina.startup.Embedded" />
</property>
<property name="engine">
<bean class="org.apache.catalina.core.StandardEngine">
<property name="name" value="red5Engine" />
<property name="defaultHost" value="localhost" />
</bean>
</property>
<property name="realm">
<bean class="org.apache.catalina.realm.MemoryRealm" />
</property>
<property name="connector">
<bean class="org.apache.catalina.connector.Connector">
<property name="port"><value>5080</value></property>
<property name="redirectPort"><value>8443</value></property>
<property name="enableLookups"><value>false</value></property>
</bean>
</property>
<property name="baseHost">
<bean class="org.apache.catalina.core.StandardHost">
<property name="name" value="localhost" />
<property name="unpackWARs" value="true" />
<property name="autoDeploy" value="true" />
<property name="xmlValidation" value="false" />
<property name="xmlNamespaceAware" value="false" />
</bean>
</property>
<property name="valves">
<list>
<bean id="valve.access" class="org.apache.catalina.valves.AccessLogValve">
<property name="directory" value="." />
<property name="prefix" value="localhost_access." />
<property name="suffix" value=".log" />
<property name="pattern" value="common" />
<property name="resolveHosts" value="false" />
<property name="rotatable" value="true" />
</bean>
</list>
</property>
<property name="contexts">
<map>
<entry>
<key><value>/</value></key>
<value>/root</value>
</entry>
</map>
</property>
</bean>
-->
<!-- Default context. This can be shared between web app contexts -->
<!--
<bean id="default.context"
class="org.springframework.context.support.FileSystemXmlApplicationContext">
<constructor-arg><value>/webapps/red5-default.xml</value></constructor-arg>
<constructor-arg><ref bean="red5.common" /></constructor-arg>
</bean>
-->
<!-- You can add further contexts here. This allows for multiple separate global scopes -->
</beans>

View File

@ -0,0 +1,11 @@
<!--
NOTE: By default, no user is included in the "manager" role required
to operate the "/manager" web application. If you wish to use this app,
you must define such a user - the username and password are arbitrary.
-->
<tomcat-users>
<user name="admin" password="admin" roles="admin" />
<user name="tomcat" password="tomcat" roles="tomcat" />
<user name="role1" password="tomcat" roles="role1" />
<user name="both" password="tomcat" roles="tomcat,role1" />
</tomcat-users>

Binary file not shown.

View File

@ -0,0 +1 @@
These files are used only by the WAR version of Red5.

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="web.context.SOSample" class="org.red5.server.Context">
<property name="scopeResolver" ref="red5.scopeResolver" />
<property name="clientRegistry" ref="global.clientRegistry" />
<property name="serviceInvoker" ref="global.serviceInvoker" />
<property name="mappingStrategy" ref="global.mappingStrategy" />
</bean>
<bean id="web.scope.SOSample" class="org.red5.server.WebScope" init-method="register">
<property name="server" ref="red5.server" />
<property name="parent" ref="global.scope" />
<property name="context" ref="web.context.SOSample" />
<property name="handler" ref="web.handler.SOSample" />
<property name="contextPath" value="/SOSample" />
<property name="virtualHosts" value="@virtual.hosts@" />
</bean>
<bean id="web.handler.SOSample" class="org.red5.server.adapter.ApplicationAdapter"/>
</beans>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="authClientRegistry"
class="org.red5.adminPanel.client.AuthClientRegistry"
/>
<bean id="web.context.admin" class="org.red5.server.Context">
<property name="scopeResolver" ref="red5.scopeResolver" />
<property name="clientRegistry" ref="authClientRegistry" />
<property name="serviceInvoker" ref="global.serviceInvoker" />
<property name="mappingStrategy" ref="global.mappingStrategy" />
</bean>
<bean id="web.scope.admin" class="org.red5.server.WebScope" init-method="register">
<property name="server" ref="red5.server" />
<property name="parent" ref="global.scope" />
<property name="context" ref="web.context.admin" />
<property name="handler" ref="web.handler.admin" />
<property name="contextPath" value="/admin" />
<property name="virtualHosts" value="@virtual.hosts@" />
</bean>
<bean id="web.handler.admin" class="org.red5.webapps.admin.Application" />
</beans>

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app
version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!--
** For use with servlet v2.5 replace the lines above with these
version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-->
<display-name>Red5 Administration Interface</display-name>
<!-- remove the following servlet tags if you want to disable remoting for this application -->
<servlet>
<servlet-name>gateway</servlet-name>
<servlet-class>org.red5.server.net.servlet.AMFTunnelServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>gateway</servlet-name>
<url-pattern>/gateway</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>StatisticsServlet</servlet-name>
<servlet-class>org.red5.server.net.servlet.StatisticsServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>StatisticsServlet</servlet-name>
<url-pattern>/statistics</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>login.html</welcome-file>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>
<security-constraint>
<web-resource-collection>
<web-resource-name>Forbidden</web-resource-name>
<url-pattern>/WEB-INF/*</url-pattern>
</web-resource-collection>
<auth-constraint />
</security-constraint>
</web-app>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean name="default.context" class="org.springframework.context.support.ClassPathXmlApplicationContext">
<constructor-arg>
<list>
<value>defaultContext.xml</value>
<value>red5-common.xml</value>
<value>red5-core.xml</value>
</list>
</constructor-arg>
</bean>
</beans>

View File

@ -0,0 +1,38 @@
#Filter file
context.config.location=/WEB-INF/applicationContext.xml /WEB-INF/red5-*.xml
locator.factory.selector=applicationContext.xml
global.scope=<context-param><param-name>globalScope</param-name><param-value>default</param-value></context-param>
parent.context.key=<context-param><param-name>parentContextKey</param-name><param-value>default.context</param-value></context-param>
context.loader.listener=org.red5.server.MainServlet
request.context.listener=<listener><listener-class>org.springframework.web.context.request.RequestContextListener</listener-class></listener>
gateway.servlet=<servlet><servlet-name>gateway</servlet-name><servlet-class>org.red5.server.net.servlet.AMFGatewayServlet</servlet-class><load-on-startup>1</load-on-startup></servlet>
gateway.servlet.mapping=<servlet-mapping><servlet-name>gateway</servlet-name><url-pattern>/gateway</url-pattern></servlet-mapping>
rtmpt.servlet=<servlet><servlet-name>rtmpt</servlet-name><servlet-class>org.red5.server.net.rtmpt.RTMPTServlet</servlet-class><load-on-startup>2</load-on-startup></servlet>
rtmpt.servlet.mappings=<servlet-mapping><servlet-name>rtmpt</servlet-name><url-pattern>/open/*</url-pattern></servlet-mapping><servlet-mapping><servlet-name>rtmpt</servlet-name><url-pattern>/idle/*</url-pattern></servlet-mapping><servlet-mapping><servlet-name>rtmpt</servlet-name><url-pattern>/send/*</url-pattern></servlet-mapping><servlet-mapping><servlet-name>rtmpt</servlet-name><url-pattern>/close/*</url-pattern></servlet-mapping>
welcome.file=index.jsp
context.override=false
virtual.hosts=*,localhost, localhost:8080, 127.0.0.1:8080
# HTTP
http.host=0.0.0.0
http.port=8080
# RTMP
rtmp.host=0.0.0.0
rtmp.port=1935
rtmp.event_threads_core=4
rtmp.event_threads_max=8
# event threads queue: -1 unbounded, 0 direct (no queue), n bounded queue
rtmp.event_threads_queue=-1
rtmp.event_threads_keepalive=60
rtmp.send_buffer_size=271360
rtmp.receive_buffer_size=65536
rtmp.ping_interval=5000
rtmp.max_inactivity=60000
# RTMPT
rtmpt.host=0.0.0.0
rtmpt.port=8080
rtmpt.ping_interval=5000
rtmpt.max_inactivity=60000

View File

@ -0,0 +1,17 @@
<!--
Context file for red5
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
path=""
docBase="${catalina.home}/webapps/"
override="true"
privileged="true"
reloadable="false"
crossContext="false"
cookies="false"
antiResourceLocking="false"
antiJARLocking="false"
-->
<Context path="@context.path@" crossContext="true">
</Context>

View File

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<!-- DEFAULT GLOBAL CONTEXT -->
<bean id="global.clientRegistry" class="org.red5.server.ClientRegistry" />
<bean id="global.serviceInvoker" class="org.red5.server.service.ServiceInvoker">
<property name="serviceResolvers">
<list>
<bean id="scopeServiceResolver"
class="org.red5.server.service.ScopeServiceResolver" />
<bean id="handlerServiceResolver"
class="org.red5.server.service.HandlerServiceResolver" />
<bean id="contextServiceResolver"
class="org.red5.server.service.ContextServiceResolver" />
</list>
</property>
</bean>
<bean id="global.mappingStrategy" class="org.red5.server.MappingStrategy"/>
<bean id="global.context" class="org.red5.server.Context">
<property name="scopeResolver" ref="red5.scopeResolver" />
<property name="clientRegistry" ref="global.clientRegistry" />
<property name="serviceInvoker" ref="global.serviceInvoker" />
<property name="mappingStrategy" ref="global.mappingStrategy" />
</bean>
<bean id="global.handler" class="org.red5.server.CoreHandler"/>
<bean id="global.scope" class="org.red5.server.GlobalScope" init-method="register">
<property name="server" ref="red5.server" />
<property name="name" value="default" />
<property name="context" ref="global.context" />
<property name="handler" ref="global.handler" />
<property name="persistenceClass">
<value>org.red5.server.persistence.FilePersistence</value>
</property>
</bean>
<bean id="red5.scopeResolver" class="org.red5.server.ScopeResolver">
<property name="globalScope" ref="global.scope" />
</bean>
</beans>

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="web.context.echo" class="org.red5.server.Context">
<property name="scopeResolver" ref="red5.scopeResolver" />
<property name="clientRegistry" ref="global.clientRegistry" />
<property name="serviceInvoker" ref="global.serviceInvoker" />
<property name="mappingStrategy" ref="global.mappingStrategy" />
</bean>
<bean id="web.scope.echo" class="org.red5.server.WebScope" init-method="register">
<property name="server" ref="red5.server" />
<property name="parent" ref="global.scope" />
<property name="context" ref="web.context.echo" />
<property name="handler" ref="web.handler.echo" />
<property name="contextPath" value="/echo" />
<property name="virtualHosts" value="@virtual.hosts@" />
</bean>
<bean id="web.handler.echo" class="org.red5.server.webapp.echo.Application"/>
<!-- enable support for mx:RemoteObject requests -->
<bean id="flexMessaging.service" class="org.red5.server.net.remoting.FlexMessagingService">
<property name="serviceInvoker" ref="global.serviceInvoker" />
<!-- add an entry for all possible "destination" attributes of your
mx:RemoteObject sources -->
<property name="endpoints">
<map>
<entry key="Red5Echo">
<!-- object that handles requests sent to this endpoint -->
<ref bean="web.handler.echo" />
</entry>
</map>
</property>
</bean>
</beans>

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app
version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!--
** For use with servlet v2.5 replace the lines above with these
version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-->
<display-name>Echo</display-name>
<servlet>
<servlet-name>gateway</servlet-name>
<servlet-class>org.red5.server.net.servlet.AMFTunnelServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>gateway</servlet-name>
<url-pattern>/gateway</url-pattern>
</servlet-mapping>
<security-constraint>
<web-resource-collection>
<web-resource-name>Forbidden</web-resource-name>
<url-pattern>/WEB-INF/*</url-pattern>
</web-resource-collection>
<auth-constraint />
</security-constraint>
</web-app>

View File

@ -0,0 +1,228 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<consolePlugin/>
<!-- Appenders http://logback.qos.ch/manual/appenders.html -->
<appender name="CONSOLE"
class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>INFO</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>
%date [%thread] %-5level %logger - %msg%n
</Pattern>
</layout>
</appender>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<File>C:/dev/tomcat-6.0.14/logs/red5.log</File>
<Append>false</Append>
<Encoding>UTF-8</Encoding>
<BufferedIO>false</BufferedIO>
<ImmediateFlush>true</ImmediateFlush>
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>
%date [%thread] %-5level %logger{35} - %msg%n
</Pattern>
</layout>
</appender>
<appender name="ERRORFILE" class="ch.qos.logback.core.FileAppender">
<File>C:/dev/tomcat-6.0.14/logs/error.log</File>
<Append>false</Append>
<Encoding>UTF-8</Encoding>
<BufferedIO>false</BufferedIO>
<ImmediateFlush>true</ImmediateFlush>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>WARN</level>
</filter>
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>
%date [%thread] %-5level %logger{35} - %msg%n
</Pattern>
</layout>
</appender>
<root>
<level value="DEBUG" />
<appender-ref ref="CONSOLE" />
<appender-ref ref="FILE" />
<appender-ref ref="ERRORFILE" />
</root>
<!-- Red5 -->
<logger name="org.red5.io">
<level value="INFO" />
</logger>
<logger name="org.red5.server">
<level value="WARN" />
</logger>
<logger name="org.red5.server.Client">
<level value="INFO" />
</logger>
<logger name="org.red5.server.jetty">
<level value="INFO" />
</logger>
<logger name="org.red5.server.Standalone">
<level value="INFO" />
</logger>
<logger name="org.red5.server.tomcat">
<level value="INFO" />
</logger>
<logger name="org.red5.server.api.stream.support">
<level value="INFO" />
</logger>
<logger name="org.red5.server.cache">
<level value="WARN" />
</logger>
<logger
name="org.red5.server.jetty.Red5WebPropertiesConfiguration">
<level value="WARN" />
</logger>
<logger name="org.red5.server.jmx">
<level value="INFO" />
</logger>
<logger name="org.red5.server.messaging.InMemoryPushPushPipe">
<level value="INFO" />
</logger>
<logger name="org.red5.server.net">
<level value="INFO" />
</logger>
<logger name="org.red5.server.net.servlet.RTMPTServlet">
<level value="WARN" />
</logger>
<logger name="org.red5.server.net.servlet">
<level value="WARN" />
</logger>
<logger name="org.red5.server.net.proxy">
<level value="INFO" />
</logger>
<logger name="org.red5.server.net.remoting">
<level value="WARN" />
</logger>
<logger name="org.red5.server.net.rtmp">
<level value="WARN" />
</logger>
<logger name="org.red5.server.net.rtmp.RTMPHandler">
<level value="OFF" />
</logger>
<logger name="org.red5.server.net.rtmp.BaseRTMPHandler">
<level value="OFF" />
</logger>
<logger name="org.red5.server.net.rtmp.codec">
<level value="INFO" />
</logger>
<logger name="org.red5.server.net.rtmp.RTMPMinaIoHandler">
<level value="OFF" />
</logger>
<logger name="org.red5.server.net.rtmp.RTMPMinaTransport">
<level value="INFO" />
</logger>
<logger name="org.red5.server.net.rtmp.status">
<level value="INFO" />
</logger>
<logger name="org.red5.server.net.rtmpt">
<level value="WARN" />
</logger>
<logger name="org.red5.server.persistence">
<level value="WARN" />
</logger>
<logger name="org.red5.server.pooling.ThreadObjectFactory">
<level value="WARN" />
</logger>
<logger name="org.red5.server.script">
<level value="WARN" />
</logger>
<logger name="org.red5.server.service">
<level value="INFO" />
</logger>
<logger name="org.red5.server.so">
<level value="WARN" />
</logger>
<logger name="org.red5.server.stream">
<level value="INFO" />
</logger>
<logger name="org.red5.server.stream.consumer">
<level value="WARN" />
</logger>
<!-- Red5 demos -->
<logger name="org.red5.server.webapp.oflaDemo">
<level value="WARN" />
</logger>
<!-- Mina -->
<logger name="org.apache.mina">
<level value="WARN" />
</logger>
<logger name="org.apache.mina.filter">
<level value="WARN" />
</logger>
<logger name="org.apache.mina.filter.thread.ThreadPoolFilter">
<level value="WARN" />
</logger>
<!-- Apache commons -->
<logger name="org.apache.commons.modeler">
<level value="WARN" />
</logger>
<logger name="org.apache.commons.beanutils">
<level value="WARN" />
</logger>
<logger name="org.apache.commons.digester">
<level value="WARN" />
</logger>
<logger name="httpclient">
<level value="WARN" />
</logger>
<!-- Apache catalina / tomcat -->
<logger name="org.apache.catalina">
<level value="INFO" />
</logger>
<logger name="org.apache.catalina.authenticator">
<level value="INFO" />
</logger>
<logger name="org.apache.catalina.realm">
<level value="WARN" />
</logger>
<logger name="org.apache.catalina.session">
<level value="WARN" />
</logger>
<logger name="org.apache.jasper">
<level value="INFO" />
</logger>
<!-- Jetty -->
<logger name="org.mortbay">
<level value="INFO" />
</logger>
<logger name="org.mortbay.log">
<level value="INFO" />
</logger>
<!-- Spring -->
<logger name="org.springframework">
<level value="INFO" />
</logger>
<logger name="org.springframework.beans.factory">
<level value="INFO" />
</logger>
<logger name="org.springframework.beans.factory.xml">
<level value="WARN" />
</logger>
<logger name="org.springframework.ui.context.support">
<level value="WARN" />
</logger>
<logger name="org.springframework.web.context">
<level value="INFO" />
</logger>
<logger name="org.springframework.web.context.support">
<level value="WARN" />
</logger>
<logger name="org.quartz">
<level value="WARN" />
</logger>
<!-- Caching -->
<logger name="net.sf.ehcache">
<level value="INFO" />
</logger>
<logger name="com.whirlycott.cache">
<level value="WARN" />
</logger>
<logger name="com.whirlycott.cache.policy">
<level value="WARN" />
</logger>
</configuration>

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:lang="http://www.springframework.org/schema/lang"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd">
<!-- oflaDemo web context -->
<bean id="web.context.oflaDemo" class="org.red5.server.Context">
<property name="scopeResolver" ref="red5.scopeResolver" />
<property name="clientRegistry" ref="global.clientRegistry" />
<property name="serviceInvoker" ref="global.serviceInvoker" />
<property name="mappingStrategy" ref="global.mappingStrategy" />
</bean>
<bean id="web.scope.oflaDemo" class="org.red5.server.WebScope" init-method="register">
<property name="server" ref="red5.server" />
<property name="parent" ref="global.scope" />
<property name="context" ref="web.context.oflaDemo" />
<property name="handler" ref="web.handler.oflaDemo" />
<property name="contextPath" value="/oflaDemo" />
<property name="virtualHosts" value="@virtual.hosts@" />
</bean>
<bean id="web.handler.oflaDemo" class="org.red5.server.webapp.oflaDemo.Application"/>
<bean id="demoService.service" class="org.red5.server.webapp.oflaDemo.DemoService" lazy-init="true" />
</beans>

View File

@ -0,0 +1,184 @@
<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:lang="http://www.springframework.org/schema/lang" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd">
<!-- This context is shared between all child contexts. -->
<!-- Server bean -->
<bean id="red5.server" class="org.red5.server.Server"/>
<!-- JMX server -->
<bean id="jmxFactory" class="org.red5.server.jmx.JMXFactory">
<property name="domain" value="org.red5.server"/>
</bean>
<bean id="jmxAgent" class="org.red5.server.jmx.JMXAgent" init-method="init">
<!-- The RMI adapter allows remote connections to the MBeanServer -->
<property name="enableRmiAdapter" value="false" />
<property name="rmiAdapterPort" value="9999"/>
<!-- SSL
To use jmx with ssl you must also supply the location of the keystore and its password
when starting the server with the following JVM options:
-Djavax.net.ssl.keyStore=keystore
-Djavax.net.ssl.keyStorePassword=password
-->
<property name="enableSsl" value="false"/>
<!-- Starts a registry if it doesnt exist -->
<property name="startRegistry" value="true" />
<!-- Authentication -->
<property name="remoteAccessProperties" value=""/>
<property name="remotePasswordProperties" value=""/>
<!-- The HTML adapter allows connections to the MBeanServer via a web browser -->
<property name="enableHtmlAdapter" value="false" />
<property name="htmlAdapterPort" value="8082"/>
<!-- Mina offers its own Mbeans so you may integrate them here -->
<property name="enableMinaMonitor" value="true" />
</bean>
<!-- Serializes objects to AMF binary -->
<bean id="serializer" class="org.red5.io.object.Serializer"/>
<!-- Deserializes objects from AMF binary -->
<bean id="deserializer" class="org.red5.io.object.Deserializer"/>
<!-- Deals with StatusObjects representing statuses like FMS NetConnection.Connect.Success status -->
<bean id="statusObjectService" class="org.red5.server.net.rtmp.status.StatusObjectService"
autowire="byType" init-method="initialize"/>
<!-- RTMP codec factory -->
<bean id="rtmpCodecFactory" class="org.red5.server.net.rtmp.codec.RTMPMinaCodecFactory"
autowire="byType" init-method="init">
<property name="minaEncoder">
<bean class="org.red5.server.net.rtmp.codec.RTMPMinaProtocolEncoder">
<property name="serializer"><ref bean="serializer"/></property>
</bean>
</property>
<property name="minaDecoder">
<bean class="org.red5.server.net.rtmp.codec.RTMPMinaProtocolDecoder">
<property name="deserializer"><ref bean="deserializer"/></property>
</bean>
</property>
</bean>
<!-- Remoting calls codec factory -->
<bean id="remotingCodecFactory" class="org.red5.server.net.remoting.codec.RemotingCodecFactory"
autowire="byType" init-method="init"/>
<!-- Video codec factory -->
<bean id="videoCodecFactory" class="org.red5.server.stream.VideoCodecFactory">
<property name="codecs">
<list>
<bean id="screenVideoCodec" class="org.red5.server.stream.codec.ScreenVideo"/>
<!--
<bean id="sorensonVideoCodec" class="org.red5.server.stream.codec.SorensonVideo"/>
-->
</list>
</property>
</bean>
<!-- Streamable file factory -->
<bean id="streamableFileFactory" class="org.red5.io.StreamableFileFactory">
<property name="services">
<list>
<bean id="flvFileService" class="org.red5.io.flv.impl.FLVService">
<property name="generateMetadata" value="true"/>
</bean>
<bean id="mp3FileService" class="org.red5.io.mp3.impl.MP3Service"/>
</list>
</property>
</bean>
<!-- Thread that writes modified objects to disk periodically -->
<bean id="filePersistenceThread" class="org.red5.server.persistence.FilePersistenceThread"/>
<!-- Handles creation / lookup of shared objects -->
<bean id="sharedObjectService" class="org.red5.server.so.SharedObjectService">
<property name="persistenceClassName">
<value>org.red5.server.persistence.FilePersistence</value>
</property>
</bean>
<!-- High level access to streams -->
<bean id="streamService" class="org.red5.server.stream.StreamService"/>
<!-- High level access to broadcasted streams -->
<bean id="providerService" class="org.red5.server.stream.ProviderService"/>
<!-- Provides output to consumers -->
<bean id="consumerService" class="org.red5.server.stream.ConsumerService"/>
<!-- Simple bandwidth control -->
<bean id="BWControlService" class="org.red5.server.stream.SimpleBWControlService" init-method="init" destroy-method="shutdown">
<property name="interval" value="100"/>
<property name="defaultCapacity" value="104857600"/>
<!-- 100MB -->
</bean>
<!-- Scheduling service -->
<bean id="schedulingService" class="org.red5.server.scheduling.QuartzSchedulingService" destroy-method="shutdown"/>
<!-- Threadpool settings for the remoting clients -->
<bean id="remotingPool" class="org.red5.server.pooling.ThreadPool">
<property name="poolSize" value="8"/>
</bean>
<!-- Use injection to setup thread pool for remoting clients -->
<bean id="remotingClient" class="org.red5.server.net.remoting.RemotingClient">
<property name="threadPool" ref="remotingPool"/>
</bean>
<!--
Now we can load the cache engine, only one may be enabled at a time. If no-caching is required select the
NoCacheImpl. Three other implementations based on EhCache, WhirlyCache, and Red5Cache are also available.
-->
<bean id="object.cache" class="org.red5.server.cache.NoCacheImpl"/>
<!--
Cache to use for keyframe metadata.
-->
<bean id="keyframe.cache" class="org.red5.io.FileKeyFrameMetaCache"/>
<!--
Represents FLV files
Use injection to set the cache impl to be used with flvs
-->
<bean id="flv.impl" class="org.red5.io.flv.impl.FLV">
<property name="cache">
<ref bean="object.cache"/>
</property>
</bean>
<!-- Use injection to set the keyframe cache for FLV files -->
<bean id="flvreader.impl" class="org.red5.io.flv.impl.FLVReader">
<property name="keyFrameCache">
<ref bean="keyframe.cache"/>
</property>
</bean>
<!-- Use injection to set the keyframe cache for MP3 files -->
<bean id="mp3reader.impl" class="org.red5.io.mp3.impl.MP3Reader">
<property name="frameCache">
<ref bean="keyframe.cache"/>
</property>
</bean>
<!-- Use injection to set the buffer type for reading FLV files -->
<bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="staticMethod">
<value>org.red5.io.flv.impl.FLVReader.setBufferType</value>
</property>
<!-- Three buffer types are available 'auto', 'heap', and 'direct' -->
<property name="arguments" value="auto"/>
</bean>
<!-- Use injection to set the buffer size for reading FLV files -->
<bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="staticMethod">
<value>org.red5.io.flv.impl.FLVReader.setBufferSize</value>
</property>
<!-- Three buffer types are available 'auto', 'heap', and 'direct' -->
<property name="arguments" value="4096"/>
</bean>
<!-- Executor that will be used to schedule stream playback to keep
the client buffer filled.
-->
<bean id="streamExecutor" class="java.util.concurrent.ScheduledThreadPoolExecutor">
<constructor-arg value="16"/>
<property name="maximumPoolSize" value="64"/>
</bean>
<!-- ClientBroadcastStream and PlaylistSubscriberStream
that will be used by RTMPConnection and maybe other classes.
These beans are lazy-init because most likely server will need
to be up and running before we can get a smart implementation
of these streams
-->
<bean id="playlistSubscriberStream" scope="prototype" lazy-init="true" class="org.red5.server.stream.PlaylistSubscriberStream">
<property name="executor" ref="streamExecutor"/>
<!-- Check for buffer underruns every X ms and generate NetStream.Play.InsufficientBW accordingly.
Set to 0 to disable. Be careful not to set this value too small to avoid network congestion.
-->
<property name="bufferCheckInterval" value="5000"/>
<!-- A NetStream.Play.InsufficientBW message is generated if more than X messages are queued for sending on the connection.
This value will also control the maximum pending messages on the server. To use a smaller value on slow connections
to get smaller delay for downstream server commands.
-->
<property name="underrunTrigger" value="10"/>
</bean>
<bean id="clientBroadcastStream" scope="prototype" lazy-init="true" class="org.red5.server.stream.ClientBroadcastStream"/>
</beans>

View File

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:lang="http://www.springframework.org/schema/lang"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd">
<!-- This context holds all the networking: mina -->
<bean id="customEditorConfigurer"
class="org.springframework.beans.factory.config.CustomEditorConfigurer">
<property name="customEditors">
<map>
<entry key="java.net.SocketAddress">
<bean
class="org.apache.mina.integration.spring.InetSocketAddressEditor" />
</entry>
</map>
</property>
</bean>
<!-- RTMP Handler -->
<bean id="rtmpHandler"
class="org.red5.server.net.rtmp.RTMPHandler">
<property name="server" ref="red5.server" />
<property name="statusObjectService" ref="statusObjectService" />
</bean>
<bean id="rtmpMinaConnManager"
class="org.red5.server.net.rtmp.RTMPConnManager">
</bean>
<!-- RTMP Mina IO Handler -->
<bean id="rtmpMinaIoHandler"
class="org.red5.server.net.rtmp.RTMPMinaIoHandler">
<property name="handler" ref="rtmpHandler" />
<property name="codecFactory" ref="rtmpCodecFactory" />
<property name="rtmpConnManager" ref="rtmpMinaConnManager" />
</bean>
<!-- RTMP Mina Transport -->
<bean id="rtmpTransport" class="org.red5.server.net.rtmp.RTMPMinaTransport" init-method="start" destroy-method="stop">
<property name="ioHandler" ref="rtmpMinaIoHandler" />
<property name="address" value="@rtmp.host@" />
<property name="port" value="@rtmp.port@" />
<property name="receiveBufferSize" value="@rtmp.receive_buffer_size@" />
<property name="sendBufferSize" value="@rtmp.send_buffer_size@" />
<property name="eventThreadsCore" value="@rtmp.event_threads_core@" />
<property name="eventThreadsMax" value="@rtmp.event_threads_max@" />
<property name="eventThreadsQueue" value="@rtmp.event_threads_queue@" />
<property name="eventThreadsKeepalive" value="@rtmp.event_threads_keepalive@" />
<!-- This is the interval at which the sessions are polled for stats. If mina monitoring is not
enabled, polling will not occur. -->
<property name="jmxPollInterval" value="1000" />
<property name="tcpNoDelay" value="true" />
</bean>
<!-- RTMP Mina Connection -->
<bean id="rtmpMinaConnection" scope="prototype"
class="org.red5.server.net.rtmp.RTMPMinaConnection">
<!-- Ping clients every X ms. Set to 0 to disable ghost detection code. -->
<property name="pingInterval" value="@rtmp.ping_interval@" />
<!-- Disconnect client after X ms of not responding. -->
<property name="maxInactivity" value="@rtmp.max_inactivity@" />
<!-- Max. time in milliseconds to wait for a valid handshake. -->
<property name="maxHandshakeTimeout" value="5000" />
</bean>
<bean id="rtmptConnManager"
class="org.red5.server.net.rtmp.RTMPConnManager">
</bean>
<!-- RTMPT Handler -->
<bean id="rtmptHandler"
class="org.red5.server.net.rtmpt.RTMPTHandler" autowire="byType">
<property name="codecFactory" ref="rtmpCodecFactory" />
</bean>
<!-- Use injection to store RTMPT handler in servlet -->
<bean id="rtmptServlet"
class="org.red5.server.net.rtmpt.RTMPTServlet">
<property name="handler" ref="rtmptHandler" />
<property name="rtmpConnManager" ref="rtmptConnManager" />
</bean>
<!-- RTMPT Connection -->
<bean id="rtmptConnection" scope="prototype"
class="org.red5.server.net.rtmpt.RTMPTConnection">
<!-- Ping clients every X ms. Set to 0 to disable ghost detection code. -->
<property name="pingInterval" value="@rtmp.ping_interval@" />
<!-- Disconnect client after X ms of not responding. -->
<property name="maxInactivity" value="@rtmp.max_inactivity@" />
<!-- Max. time in milliseconds to wait for a valid handshake. -->
<property name="maxHandshakeTimeout" value="5000" />
</bean>
</beans>

View File

@ -0,0 +1,2 @@
webapp.contextPath=@context.path@
webapp.virtualHosts=*,localhost, localhost:8080, 127.0.0.1:8080

View File

@ -0,0 +1,38 @@
# HTTP
http.host=0.0.0.0
http.port=8080
# RTMP
rtmp.host=0.0.0.0
rtmp.port=1935
rtmp.event_threads_core=16
rtmp.event_threads_max=32
# event threads queue: -1 unbounded, 0 direct (no queue), n bounded queue
rtmp.event_threads_queue=-1
rtmp.event_threads_keepalive=60
rtmp.send_buffer_size=271360
rtmp.receive_buffer_size=65536
rtmp.ping_interval=5000
rtmp.max_inactivity=60000
rtmp.tcp_nodelay=true
# RTMPT
rtmpt.host=0.0.0.0
rtmpt.port=8080
rtmpt.ping_interval=5000
rtmpt.max_inactivity=60000
# MRTMP
mrtmp.host=0.0.0.0
mrtmp.port=9035
mrtmp.event_threads_core=16
mrtmp.event_threads_max=32
# event threads queue: -1 unbounded, 0 direct (no queue), n bounded queue
mrtmp.event_threads_queue=-1
mrtmp.event_threads_keepalive=60
mrtmp.send_buffer_size=271360
mrtmp.receive_buffer_size=65536
mrtmp.ping_interval=5000
mrtmp.max_inactivity=60000
# Debug proxy (needs to be activated in red5-core.xml)
proxy.source_host=127.0.0.1
proxy.source_port=1936
proxy.destination_host=127.0.0.1
proxy.destination_port=1935

View File

@ -0,0 +1,17 @@
<!--
Context file for red5
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
path=""
docBase="${catalina.home}/webapps/"
override="true"
privileged="true"
reloadable="false"
crossContext="false"
cookies="false"
antiResourceLocking="false"
antiJARLocking="false"
-->
<Context path="" crossContext="true" override="true">
</Context>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<!-- ROOT web context -->
<bean id="web.context" class="org.red5.server.Context">
<property name="scopeResolver" ref="red5.scopeResolver" />
<property name="clientRegistry" ref="global.clientRegistry" />
<property name="serviceInvoker" ref="global.serviceInvoker" />
<property name="mappingStrategy" ref="global.mappingStrategy" />
</bean>
<bean id="web.scope" class="org.red5.server.WebScope" init-method="register">
<property name="server" ref="red5.server" />
<property name="parent" ref="global.scope" />
<property name="context" ref="web.context" />
<property name="handler" ref="global.handler" />
<property name="contextPath" value="@context.path@" />
<property name="virtualHosts" value="@virtual.hosts@" />
</bean>
</beans>

View File

@ -0,0 +1,118 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app
version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!--
** For use with servlet v2.5 replace the lines above with these
version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-->
<display-name>Red5 @display.name@ War</display-name>
<context-param>
<param-name>globalScope</param-name>
<param-value>default</param-value>
</context-param>
<context-param>
<param-name>parentContextKey</param-name>
<param-value>default.context</param-value>
</context-param>
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>@webapp.root.key@</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/classes/*-web.xml</param-value>
</context-param>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/log4j.properties</param-value>
</context-param>
<listener>
<listener-class>org.red5.server.war.WarLoaderServlet</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>
<servlet>
<servlet-name>gateway</servlet-name>
<servlet-class>org.red5.server.net.servlet.AMFGatewayServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>rtmpt</servlet-name>
<servlet-class>org.red5.server.net.rtmpt.RTMPTServlet</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>gateway</servlet-name>
<url-pattern>/gateway</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>rtmpt</servlet-name>
<url-pattern>/open/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>rtmpt</servlet-name>
<url-pattern>/idle/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>rtmpt</servlet-name>
<url-pattern>/send/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>rtmpt</servlet-name>
<url-pattern>/close/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>login.html</welcome-file>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>
<security-constraint>
<web-resource-collection>
<web-resource-name>Forbidden</web-resource-name>
<url-pattern>/WEB-INF/*</url-pattern>
</web-resource-collection>
<auth-constraint />
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Forbidden</web-resource-name>
<url-pattern>/persistence/*</url-pattern>
</web-resource-collection>
<auth-constraint />
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Forbidden</web-resource-name>
<url-pattern>/streams/*</url-pattern>
</web-resource-collection>
<auth-constraint />
</security-constraint>
</web-app>

View File

@ -0,0 +1,341 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd"
version="2.5">
<description>
Default web.xml file.
This file is applied to a Web application before it's own WEB_INF/web.xml file
</description>
<!-- ==================================================================== -->
<!-- Context params to control Session Cookies -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- UNCOMMENT TO ACTIVATE
<context-param>
<param-name>org.mortbay.jetty.servlet.SessionDomain</param-name>
<param-value>127.0.0.1</param-value>
</context-param>
<context-param>
<param-name>org.mortbay.jetty.servlet.SessionPath</param-name>
<param-value>/</param-value>
</context-param>
<context-param>
<param-name>org.mortbay.jetty.servlet.MaxAge</param-name>
<param-value>-1</param-value>
</context-param>
-->
<!-- ==================================================================== -->
<!-- The default servlet. -->
<!-- This servlet, normally mapped to /, provides the handling for static -->
<!-- content, OPTIONS and TRACE methods for the context. -->
<!-- The following initParameters are supported: -->
<!-- -->
<!-- acceptRanges If true, range requests and responses are -->
<!-- supported -->
<!-- -->
<!-- dirAllowed If true, directory listings are returned if no -->
<!-- welcome file is found. Else 403 Forbidden. -->
<!-- -->
<!-- redirectWelcome If true, redirect welcome file requests -->
<!-- else use request dispatcher forwards -->
<!-- -->
<!-- resoureBase Can be set to replace the context resource base -->
<!-- -->
<!-- relativeResourceBase -->
<!-- Set with a pathname relative to the base of the -->
<!-- servlet context root. Useful for only serving -->
<!-- static content from only specific subdirectories. -->
<!-- -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<servlet>
<servlet-name>default</servlet-name>
<servlet-class>org.mortbay.jetty.servlet.DefaultServlet</servlet-class>
<init-param>
<param-name>acceptRanges</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>dirAllowed</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>redirectWelcome</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>maxCacheSize</param-name>
<param-value>4000000</param-value>
</init-param>
<init-param>
<param-name>maxCachedFileSize</param-name>
<param-value>260000</param-value>
</init-param>
<init-param>
<param-name>maxCachedFiles</param-name>
<param-value>100</param-value>
</init-param>
<!-- Disable this to use memory mapped files. However this locks files on windows. -->
<init-param>
<param-name>useFileMappedBuffer</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet>
<servlet-name>gateway</servlet-name>
<servlet-class>org.red5.server.net.servlet.AMFGatewayServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping>
<servlet-mapping> <servlet-name>gateway</servlet-name> <url-pattern>/gateway</url-pattern> </servlet-mapping>
<!-- ==================================================================== -->
<!-- JSP Servlet -->
<!-- This is the jasper JSP servlet from the jakarta project -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- The JSP page compiler and execution servlet, which is the mechanism -->
<!-- used by Tomcat to support JSP pages. Traditionally, this servlet -->
<!-- is mapped to URL patterh "*.jsp". This servlet supports the -->
<!-- following initialization parameters (default values are in square -->
<!-- brackets): -->
<!-- -->
<!-- checkInterval If development is false and reloading is true, -->
<!-- background compiles are enabled. checkInterval -->
<!-- is the time in seconds between checks to see -->
<!-- if a JSP page needs to be recompiled. [300] -->
<!-- -->
<!-- compiler Which compiler Ant should use to compile JSP -->
<!-- pages. See the Ant documenation for more -->
<!-- information. [javac] -->
<!-- -->
<!-- classdebuginfo Should the class file be compiled with -->
<!-- debugging information? [true] -->
<!-- -->
<!-- classpath What class path should I use while compiling -->
<!-- generated servlets? [Created dynamically -->
<!-- based on the current web application] -->
<!-- -->
<!-- development Is Jasper used in development mode (will check -->
<!-- for JSP modification on every access)? [true] -->
<!-- -->
<!-- enablePooling Determines whether tag handler pooling is -->
<!-- enabled [true] -->
<!-- -->
<!-- fork Tell Ant to fork compiles of JSP pages so that -->
<!-- a separate JVM is used for JSP page compiles -->
<!-- from the one Tomcat is running in. [true] -->
<!-- -->
<!-- ieClassId The class-id value to be sent to Internet -->
<!-- Explorer when using <jsp:plugin> tags. -->
<!-- [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93] -->
<!-- -->
<!-- javaEncoding Java file encoding to use for generating java -->
<!-- source files. [UTF8] -->
<!-- -->
<!-- keepgenerated Should we keep the generated Java source code -->
<!-- for each page instead of deleting it? [true] -->
<!-- -->
<!-- logVerbosityLevel The level of detailed messages to be produced -->
<!-- by this servlet. Increasing levels cause the -->
<!-- generation of more messages. Valid values are -->
<!-- FATAL, ERROR, WARNING, INFORMATION, and DEBUG. -->
<!-- [WARNING] -->
<!-- -->
<!-- mappedfile Should we generate static content with one -->
<!-- print statement per input line, to ease -->
<!-- debugging? [false] -->
<!-- -->
<!-- -->
<!-- reloading Should Jasper check for modified JSPs? [true] -->
<!-- -->
<!-- suppressSmap Should the generation of SMAP info for JSR45 -->
<!-- debugging be suppressed? [false] -->
<!-- -->
<!-- dumpSmap Should the SMAP info for JSR45 debugging be -->
<!-- dumped to a file? [false] -->
<!-- False if suppressSmap is true -->
<!-- -->
<!-- scratchdir What scratch directory should we use when -->
<!-- compiling JSP pages? [default work directory -->
<!-- for the current web application] -->
<!-- -->
<!-- tagpoolMaxSize The maximum tag handler pool size [5] -->
<!-- -->
<!-- xpoweredBy Determines whether X-Powered-By response -->
<!-- header is added by generated servlet [false] -->
<!-- -->
<!-- If you wish to use Jikes to compile JSP pages: -->
<!-- Set the init parameter "compiler" to "jikes". Define -->
<!-- the property "-Dbuild.compiler.emacs=true" when starting Jetty -->
<!-- to cause Jikes to emit error messages in a format compatible with -->
<!-- Jasper. -->
<!-- If you get an error reporting that jikes can't use UTF8 encoding, -->
<!-- try setting the init parameter "javaEncoding" to "ISO-8859-1". -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<servlet id="jsp">
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>logVerbosityLevel</param-name>
<param-value>DEBUG</param-value>
</init-param>
<init-param>
<param-name>fork</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>xpoweredBy</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>jsp</servlet-name>
<url-pattern>*.jsp</url-pattern>
<url-pattern>*.jspf</url-pattern>
<url-pattern>*.jspx</url-pattern>
<url-pattern>*.xsp</url-pattern>
<url-pattern>*.JSP</url-pattern>
<url-pattern>*.JSPF</url-pattern>
<url-pattern>*.JSPX</url-pattern>
<url-pattern>*.XSP</url-pattern>
</servlet-mapping>
<!-- ==================================================================== -->
<!-- Dynamic Servlet Invoker. -->
<!-- This servlet invokes anonymous servlets that have not been defined -->
<!-- in the web.xml or by other means. The first element of the pathInfo -->
<!-- of a request passed to the envoker is treated as a servlet name for -->
<!-- an existing servlet, or as a class name of a new servlet. -->
<!-- This servlet is normally mapped to /servlet/* -->
<!-- This servlet support the following initParams: -->
<!-- -->
<!-- nonContextServlets If false, the invoker can only load -->
<!-- servlets from the contexts classloader. -->
<!-- This is false by default and setting this -->
<!-- to true may have security implications. -->
<!-- -->
<!-- verbose If true, log dynamic loads -->
<!-- -->
<!-- * All other parameters are copied to the -->
<!-- each dynamic servlet as init parameters -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Uncomment for dynamic invocation
<servlet>
<servlet-name>invoker</servlet-name>
<servlet-class>org.mortbay.jetty.servlet.Invoker</servlet-class>
<init-param>
<param-name>verbose</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>nonContextServlets</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>dynamicParam</param-name>
<param-value>anyValue</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping> <servlet-name>invoker</servlet-name> <url-pattern>/servlet/*</url-pattern> </servlet-mapping>
-->
<!-- ==================================================================== -->
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<!-- ==================================================================== -->
<!-- Default MIME mappings -->
<!-- The default MIME mappings are provided by the mime.properties -->
<!-- resource in the org.mortbay.jetty.jar file. Additional or modified -->
<!-- mappings may be specified here -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- UNCOMMENT TO ACTIVATE
<mime-mapping>
<extension>mysuffix</extension>
<mime-type>mymime/type</mime-type>
</mime-mapping>
-->
<!-- ==================================================================== -->
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<!-- ==================================================================== -->
<locale-encoding-mapping-list>
<locale-encoding-mapping><locale>ar</locale><encoding>ISO-8859-6</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>be</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>bg</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>ca</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>cs</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>da</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>de</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>el</locale><encoding>ISO-8859-7</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>en</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>es</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>et</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>fi</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>fr</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>hr</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>hu</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>is</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>it</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>iw</locale><encoding>ISO-8859-8</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>ja</locale><encoding>Shift_JIS</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>ko</locale><encoding>EUC-KR</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>lt</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>lv</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>mk</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>nl</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>no</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>pl</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>pt</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>ro</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>ru</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>sh</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>sk</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>sl</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>sq</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>sr</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>sv</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>tr</locale><encoding>ISO-8859-9</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>uk</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>zh</locale><encoding>GB2312</encoding></locale-encoding-mapping>
<locale-encoding-mapping><locale>zh_TW</locale><encoding>Big5</encoding></locale-encoding-mapping>
</locale-encoding-mapping-list>
<security-constraint>
<web-resource-collection>
<web-resource-name>Forbidden</web-resource-name>
<url-pattern>/WEB-INF/*</url-pattern>
</web-resource-collection>
<auth-constraint/>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Forbidden</web-resource-name>
<url-pattern>/persistence/*</url-pattern>
</web-resource-collection>
<auth-constraint/>
</security-constraint>
</web-app>

File diff suppressed because it is too large Load Diff