GithubHelp home page GithubHelp logo

tomcat-memcached-support's Introduction

tomcat-memcached-support

兼容memcached session共享的docker镜像

usage

  1. 基于该tomcat镜像构建应用镜像,注意Dockerfile中如果需要使用CMD指令,那么CMD指令应该为:CMD rsq-tomcat-start.sh
  2. 应用镜像中需要指定tomcat的context.xml配置文件,并mount到/etc/config/rishiqing/tomcat/目录下,rsq-tomcat-start.sh启动时,会自动查找是否有/etc/config/rishiqing/tomcat/context.xml文件,如果存在,那么会覆盖tomcat中conf目录下的context.xml文件。

context.xml示例

  1. non-sticky session
<?xml version='1.0' encoding='utf-8'?>
<Context>
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
    <Manager 
      className="de.javakaffee.web.msm.MemcachedBackupSessionManager"  
      memcachedNodes="n1:127.0.0.1:11211,n2:127.0.0.1:11212"
      sticky="false"
      sessionBackupAsync="false"
      lockingMode="all"
      requestUriIgnorePattern=".*\.(ico|png|gif|jpg|css|js)$"  
      transcoderFactoryClass="de.javakaffee.web.msm.JavaSerializationTranscoderFactory"  
    />
</Context>
  1. sticky session
<?xml version='1.0' encoding='utf-8'?>
<Context>
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
    <Manager
      className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
      memcachedNodes="ttm-memcached.ttm-beta.svc.cluster.local:11211"
      requestUriIgnorePattern=".*\.(ico|png|gif|jpg|css|js)$"
      sessionBackupAsync="false"
      sessionBackupTimeout="2000"
      transcoderFactoryClass="de.javakaffee.web.msm.JavaSerializationTranscoderFactory"
    />
</Context>

tomcat-memcached-support's People

Contributors

wallacemao avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.