Search code examples
securityspringintegrationred5

How could Red5 be integrated into an existing Spring Web application?


I've made this question couple of days ago (What is the best approach to develop a video chat web application in Java? Flex or JMF?) thanks to the answers given there we've decided to implement it with Flex + Red5, so the question now is, how can we implement Red5 into the existing Spring Web application? We can take advantages as much as we can of the Spring Security configuration that is currently in the Spring application and be able to call all the bussiness logic in there. So we are wondering if Red5 has to be deployed in a separate server or if we can somehow deploy it under the same Spring application as a separate servlet thus being able to use the same Spring Security configuration to secure the Red5 server? We know that Red5 configuration is based on Spring and for that reason we suppose that we can deploy it as another servlet together with Spring... is it possible? or we have to deploy Red5 in another server and configure another Spring security instance inside it?


Solution

  • Lots of questions :)

    Basically, you just keep writing your server side logic as you are used to, with all the application context xmls you need, but keep in mind, that your main entry point (at least from amf) will be inside your Application extension class (any extra contexts should be loaded from there).

    About deploying your application:

    • You can have Red5 as a separate server -modified Tomcat- (in my opinion is the best), or
    • You can deploy it under existing servers.

    If you go with the first option, you'll be able to set up everything you need in a manner you always do, and you can also use it as a servlet container without any problems.

    You might find the following links useful: