Free and Open Source Software

Free and Open Source Software

The location to find out about free and open source software. Reviews, commentary, tips and tricks. All welcome.

Embedded Tomcat In RED5

The development of Red5 server is on the fast track. Red5 developers are adding more and more functionality in order to make Red5 server, a tough competitor of FMS.

Paul Gregoire from Red5 has worked on Embedded Tomcat in Red5. Now we have a choice between Jetty and Tomcat as a web container, Previously Jetty was the only web container with Red5.

Though emebeded Tomcat won't impact your application in terms of functionality. But it gives you the option to choose between web containers and an advantage that it will now be easier to run the Edge/ Origin setup from the embedded Tomcat as opposed to the Tomcat standalone container.

How to change the settings to make it working with Tomcat?

Go to red5.xml in conf directory and comment the jetty server and uncomment the Tomcat server like below-


 <!-- 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>${http.port}</value></property>
          <property name="redirectPort"><value>${https.port}</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="log" />

                 <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>
    
 </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 -->



 
The discussion over embeded Tomcat in Red5 is going on Red5 mailing list.Technology Update
Sponsors
Comments
Be the first to leave a comment!
Add a Comment:
Already a member? Log In
Sponsors
About the Author

2 Kudos

Linus Torvalds, the man behind Linux

Linus Torvalds, the man behind Linux

Linked from: nndb.com

Click to play video
More From Zimbio
Copyright © 2008 - Zimbio, Inc. Some rights reserved.