On Thu, 2 May 2002, Hans Schmid wrote: > We have two Tomcats in a lb group. Only one is running at a time with > lbfactor=1, > the other has lbfactor=0 assinged but is not running -> all requests go to > TC1 > > When we upgrade our system we update the classes/jars and start the second > Tomcat TC2 in the group, > switch the lbfactor of TC1 to 0 and the lbfactor fo TC2 to 1 and do a > graceful > restart of apache. This way old sessions still go to TC1 whereas new > sessions go to TC2.
That's exactly what I'm trying to do :-) ( almost - if on the same machine, TC1 going up will automatically add it to the lb group, and eventually if a TC is detected to go down, it'll be automatically removed ) Costin > > After all sessions on TC1 have ended, we shutdown TC1 and TC2 serves > everything. > > Next update goes in the oposit direction (start TC1, switch lbfactors, wait > for the end of all > sessions on TC2 and finally shutdown TC2. > > > Thanks, > Hans > > > > > Still to add: > > - display ( nicely ) the information in the shm > > - read info from shm ( like slots owned by apache processes with > > statistics - in a future release ) > > > > Revision Changes Path > > 1.9 +27 -0 > > jakarta-tomcat-connectors/jk/java/org/apache/jk/common/Shm.java > > > > Index: Shm.java > > =================================================================== > > RCS file: > > /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/S > > hm.java,v > > retrieving revision 1.8 > > retrieving revision 1.9 > > diff -u -r1.8 -r1.9 > > --- Shm.java 1 May 2002 22:40:17 -0000 1.8 > > +++ Shm.java 2 May 2002 03:18:01 -0000 1.9 > > @@ -95,6 +95,7 @@ > > > > boolean unregister=false; > > boolean reset=false; > > + String dumpFile=null; > > > > // Will be dynamic ( getMethodId() ) after things are stable > > static final int SHM_SET_ATTRIBUTE=0; > > @@ -102,6 +103,8 @@ > > static final int SHM_ATTACH=3; > > static final int SHM_DETACH=4; > > static final int SHM_RESET=5; > > + static final int SHM_DUMP=6; > > + static final int SHM_DESTROY=7; > > > > public Shm() { > > } > > @@ -112,6 +115,13 @@ > > file=f; > > } > > > > + /** Copy the scoreboard in a file for debugging > > + * Will also log a lot of information about what's in the > > scoreboard. > > + */ > > + public void setDump( String dumpFile ) { > > + this.dumpFile=dumpFile; > > + } > > + > > /** Size. Used only if the scoreboard is to be created. > > */ > > public void setSize( int size ) { > > @@ -199,6 +209,20 @@ > > this.invoke( msg, mCtx ); > > } > > > > + public void dumpScoreboard(String fname) throws IOException { > > + if( apr==null ) return; > > + MsgContext mCtx=createMsgContext(); > > + Msg msg=(Msg)mCtx.getMsg(0); > > + C2BConverter c2b=(C2BConverter)mCtx.getNote(C2B_NOTE); > > + msg.reset(); > > + > > + msg.appendByte( SHM_DUMP ); > > + > > + appendString( msg, fname, c2b); > > + > > + this.invoke( msg, mCtx ); > > + } > > + > > public void setNativeAttribute(String name, String val) > > throws IOException { > > if( apr==null ) return; > > MsgContext mCtx=createMsgContext(); > > @@ -315,8 +339,11 @@ > > return; > > } > > init(); > > + > > if( reset ) { > > resetScoreboard(); > > + } else if( dumpFile!=null ) { > > + dumpScoreboard(dumpFile); > > } else if( unregister ) { > > unRegisterTomcat( host, port ); > > } else { > > > > > > > > > > -- > > To unsubscribe, e-mail: > > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > > <mailto:[EMAIL PROTECTED]> > > > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>