geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Geronimo v2.2 > Configuring session manager of Tomcat
Date Fri, 12 Nov 2010 02:17:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1810/9/1/_/styles/combined.css?spaceKey=GMOxDOC22&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/GMOxDOC22/Configuring+session+manager+of+Tomcat">Configuring
session manager of Tomcat</a></h2>
    <h4>Page  <b>added</b> by             <a href="https://cwiki.apache.org/confluence/display/~chirunhua@gmail.com">Runhua
Chi</a>
    </h4>
         <br/>
    <div class="notificationGreySide">
         <style type='text/css'>/*<![CDATA[*/
table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color:
#f0f0f0}
table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}

/*]]>*/</style><div class="Scrollbar"><table class='ScrollbarTable'><tr><td
width='33%' class='ScrollbarPrevName'>&nbsp;</td><td width='33%' class='ScrollbarParent'><sup><a
href="/confluence/display/GMOxDOC22/Configuring+the+Web+Container"><img border='0' align='middle'
src='/confluence/images/icons/up_16.gif' width='8' height='8'></a></sup><a
href="/confluence/display/GMOxDOC22/Configuring+the+Web+Container">Configuring the Web
Container</a></td><td width='33%' class='ScrollbarNextName'>&nbsp;</td></tr></table></div>

<h1><a name="ConfiguringsessionmanagerofTomcat-Configuringsessionmanager"></a>Configuring
session manager</h1>

<p>The <b>Manager</b> element represents the session manager that is used
to create and maintain HTTP sessions in Tomcat. Geronimo supports both implementations of
Manager by providing a <b>ManagerGBean</b> for:</p>
<ul>
	<li><tt>org.apache.catalina.session.StandardManager</tt></li>
	<li><tt>org.apache.catalina.session.PersistentManager</tt></li>
</ul>


<p>Refer to <a href="http://tomcat.apache.org/tomcat-6.0-doc/config/manager.html"
title="Tomcat 6.0 document" class="external-link" rel="nofollow">Tomcat document</a>
for more information about those two implementations and relevant attributes.</p>

<p>You can customize the session management behavior per web app context in your deployment
plan as followed:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader"
style="border-bottom-width: 1px;"><b>Usage of StandardManger in geornimo-web.xml</b></div><div
class="codeContent panelContent">
<pre class="code-xml">
...
<span class="code-tag">&lt;manager&gt;</span>TomcatManager<span class="code-tag">&lt;/manager&gt;</span>
<span class="code-tag">&lt;gbean name=<span class="code-quote">"TomcatManager"</span>
class=<span class="code-quote">"org.apache.geronimo.tomcat.ManagerGBean"</span>&gt;</span>
<span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.session.StandardManager<span
class="code-tag">&lt;/attribute&gt;</span>
<span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>&gt;</span>maxActiveSessions=10
<span class="code-tag">&lt;/attribute&gt;</span>
<span class="code-tag">&lt;/gbean&gt;</span>
...
</pre>
</div></div>

<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader"
style="border-bottom-width: 1px;"><b>Usage of PersistentManger in geornimo-web.xml</b></div><div
class="codeContent panelContent">
<pre class="code-xml">
...
<span class="code-tag">&lt;manager&gt;</span>TomcatManager<span class="code-tag">&lt;/manager&gt;</span>
<span class="code-tag">&lt;gbean name=<span class="code-quote">"TomcatManager"</span>
class=<span class="code-quote">"org.apache.geronimo.tomcat.ManagerGBean"</span>&gt;</span>
<span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.session.PersistentManager<span
class="code-tag">&lt;/attribute&gt;</span>
<span class="code-tag">&lt;attribute name=<span class="code-quote">"initParams"</span>&gt;</span>maxActiveSessions=10
                             maxIdleBackup=10
                             maxIdleSwap=11
                             minIdleSwap=5
                             store.className=org.apache.catalina.session.FileStore
                             store.checkInterval=10
                             store.directory=d:/testFolder/session
<span class="code-tag">&lt;/attribute&gt;</span>
<span class="code-tag">&lt;/gbean&gt;</span>
...
</pre>
</div></div>

<p>Note that for PersistentManager, you can use different strategies for session store
by specifying <b>store.className</b> to <tt>org.apache.catalina.session.FileStore</tt>
for file based store or <tt>org.apache.catalina.session.JDBCStore</tt> for JDBC
based store. Refer to <a href="http://tomcat.apache.org/tomcat-6.0-doc/config/manager.html#Nested_Components"
title="Persistence Manager implementations" class="external-link" rel="nofollow">Persistence
Manager implementations</a> for all the attributes you can configure for each store
strategy.</p>
    </div>
    <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>
       <a href="https://cwiki.apache.org/confluence/display/GMOxDOC22/Configuring+session+manager+of+Tomcat">View
Online</a>
              |
       <a href="https://cwiki.apache.org/confluence/display/GMOxDOC22/Configuring+session+manager+of+Tomcat?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
           </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message