~ubuntu-branches/ubuntu/oneiric/tomcat6/oneiric

« back to all changes in this revision

Viewing changes to java/org/apache/tomcat/util/net/NioEndpoint.java

  • Committer: Bazaar Package Importer
  • Author(s): Thierry Carrez
  • Date: 2010-07-20 14:36:48 UTC
  • mfrom: (2.2.17 sid)
  • Revision ID: james.westby@ubuntu.com-20100720143648-23y81x6cq1kv1z00
Tags: 6.0.28-2
* Add debconf questions for user, group and Java options.
* Use ucf to install /etc/default/tomcat6 from a template
* Drop CATALINA_BASE and CATALINA_HOME from /etc/default/tomcat6 since we
  shouldn't encourage users to change those anyway

Show diffs side-by-side

added added

removed removed

Lines of Context:
649
649
    public int getSessionCacheSize() { return sessionCacheSize;}
650
650
    public void setSessionCacheSize(int i) { sessionCacheSize = i;}
651
651
 
652
 
    protected int sessionCacheTimeout = 86400;
653
 
    public int getSessionCacheTimeout() { return sessionCacheTimeout;}
654
 
    public void setSessionCacheTimeout(int i) { sessionCacheTimeout = i;}
 
652
    protected int sessionTimeout = 86400;
 
653
    public int getSessionTimeout() { return sessionTimeout;}
 
654
    public void setSessionTimeout(int i) { sessionTimeout = i;}
655
655
 
656
656
    /**
657
657
     * SSL engine.
852
852
                sslContext.getServerSessionContext();
853
853
            if (sessionContext != null) {
854
854
                sessionContext.setSessionCacheSize(sessionCacheSize);
855
 
                sessionContext.setSessionTimeout(sessionCacheTimeout);
 
855
                sessionContext.setSessionTimeout(sessionTimeout);
856
856
            }
857
857
        }
858
858
        
1218
1218
     */
1219
1219
    protected Worker getWorkerThread() {
1220
1220
        // Allocate a new worker thread
1221
 
        Worker workerThread = createWorkerThread();
1222
 
        while (workerThread == null) {
1223
 
            try {
1224
 
                synchronized (workers) {
1225
 
                    workerThread = createWorkerThread();
1226
 
                    if ( workerThread == null ) workers.wait();
 
1221
        synchronized (workers) {
 
1222
            Worker workerThread;
 
1223
            while ((workerThread = createWorkerThread()) == null) {
 
1224
                try {
 
1225
                    workers.wait();
 
1226
                } catch (InterruptedException e) {
 
1227
                    // Ignore
1227
1228
                }
1228
 
            } catch (InterruptedException e) {
1229
 
                // Ignore
1230
1229
            }
1231
 
            if ( workerThread == null ) workerThread = createWorkerThread();
 
1230
            return workerThread;
1232
1231
        }
1233
 
        return workerThread;
1234
1232
    }
1235
1233
 
1236
1234