Telling Tomcat Not to Save Sessions
So
a few days ago, I noticed that on every restart, Tomcat was trying to
save sessions and then restore them. We are doing software development,
that is a completely stupid waste of time. Nevermind the Lean dictates
about VSM maps, the joke about the runner who
goes to the doctor and complains of his knee hurting applies. Doctor
puts him up on the table and taps it and says ‘does that hurt?‘ and when
they guy says no, he says ‘it would if I did it 10,000 times.‘ Here‘s
where I made a fatal error though: I thought, ‘wait, let me just look
this up and fix it, it must be simple.‘
Of course, there are 3 different branches of Tomcat code that are still in pretty wide use (5.x, 5.5.x, and 6.x) so using google to even find the answer was hellish and stupidly slow. In the old days, you had to add a manager tag in the server.xml. In newer versions, that tag has to be inside context.xml. And of course, that file could be in the server install or in your war (another sore spot in the sucky config silliness that is Tomcat).
Eventually, the key was to open up the servers node in eclipse, go into the context.xml. But as is always the case in the Java world, when you think you have finally found the key, you have to put it in the lock at least 3 or 4 times, do a couple cleans, sacrifice a small hen, oh, wipe the work area, and do Add/Remove again.
So find Servers in your Package Explorer, then drill that open, and drill open the Tomcat node comme ça:

then uncomment the Manager tag:

Why am I using Tomcat? Well, this is a 5.x project (that we are about to move to 6) and JB6 is slower on restarts.
Some would say we reached the T. J. Eckleberg state in Java a long time ago. It‘s a state of simultaneously dusty immersion in dead stuff, and yet, still furious mutated wages of industry. Fitzgerald‘s working title for Gatsby was Among Ash Heaps and Millionaires I kind of like Bowie‘s rendition of this: the failed spaceman as a returned wanderer in the land of the dead. The key thing is that those who live there don‘t realize that it is an ash heap… Have we reached Eliot‘s Wasteland in the Java world? I think when you compare it on a QC basis with iOS, it‘s utterly laughable. 90% of the stuff out in the world on the Java side would never have donned the alpha moniker from Apple. Problem is, when you say that to a lot of Java people, they just go Beavis on you. Yet, I talk to more and more people who have grown utterly weary of the toll of trudging through the dust… (Click on the T.J. Eckleberg pic for a cool article on the actual site of Wilson‘s garage…)
From http://www.jroller.com/robwilliams/entry/telling_tomcat_not_to_save
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)






Comments
Loren Kratzke replied on Sat, 2011/05/14 - 12:31pm
Going Beavis now.
iOS? The OS that runs nowhere except on Apple licensed hardware (aka Apple hardware). I'm not sure that makes the best case when comparing to Java which runs everywhere except perhaps on iOS. Just sayin'.
And when it comes to strange actions, how about that Mac OS update a few weeks back? It upgraded everybody to Maven 3.x. Could one company be any more out of touch with reality than to think it is cool to bump every Java developer to Maven 3.x? Who at Apple thought that was a good idea? Who I ask? And why is Apple even including Maven in its updates. I would much prefer to simply unpack the Maven(s) of my choosing and point to them as desired. What could be simpler? I don't like their system integration at all in this respect. Apple just doesn't like Java.
You can be mad at Tomcat but don't take it out on Java as a whole.
For those who are wondering, I am forced to develop Java on a MacBook Pro at work. It's ok except for the Apple strangeness. I find Linux to be a superior Java dev system though. And I don't use Eclipse. But that's another rant for another thread...