Profile豆浆油条BlogLists Tools Help
    December 05

    四个Tomcat

    上周Robbin来讲课,讲课时我突然有个想法:
    可以利用cluster来动态发布项目,假设有两个tomcat:master和slave,运行中,关掉slave,然后把war方上去,启动slave。然后关掉master再启动master。这样在项目变化不十分大的情况下就可以动态发布了。
     
    那天下午就开始研究了,搞出来了一个cluster,但是session没有互相通知。
    今天按照几个原则改了一顿,可以了:
    • web.xml中的<distributable />标签
    • session中的对象需要implements Serializable结构
    • workers.properties中lb中就简单的写两个ajp13就行了,robbin说的url mapping或者mod_proxy没有用到,(那仿佛是2.2的内容?)
     
    cluster搞定后,干脆把所有的tomcat都弄成ajp13的,
    这样就出现了4个tomcat一个apache httpd
    一个develop,两个cluster,还有一个做web服务如lps和wiki等
     

    Comments

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    Trackbacks

    The trackback URL for this entry is:
    http://b051.spaces.live.com/blog/cns!9E2D0BC71827D4E9!251.trak
    Weblogs that reference this entry
    • None