We got nominated! Help us out and vote for GitHub as Best Bootstrapped Startup of 2008. (You can vote once a day.) [ hide ]

public
Description: Phusion Passenger (mod_rails)
Homepage: http://www.modrails.com/
Clone URL: git://github.com/FooBarWidget/passenger.git
Click here to lend your support to: passenger and make a donation at www.pledgie.com !
Various refactorings and improvements.

- PassengerUseGlobalQueue is now per-virtual host instead of global.
- Added integration tests for PassengerUseGlobalQueue.
- SpawnOptions renamed to PoolOptions.
Hongli Lai (Phusion) (author)
Sat Nov 22 08:26:49 -0800 2008
commit  4dacc1083996bdc2bb818dec1289c3e16bfff012
tree    8730f5c5c741d39d85439a89f7c66d62d894dcff
parent  6af8a1e7077abbaf376838ce050c6a4670c63ac1
...
128
129
130
131
 
132
133
134
...
166
167
168
169
 
170
171
172
...
210
211
212
213
 
214
215
216
217
218
 
219
220
221
222
223
224
225
 
226
227
228
...
230
231
232
233
 
234
235
 
236
237
238
...
128
129
130
 
131
132
133
134
...
166
167
168
 
169
170
171
172
...
210
211
212
 
213
214
215
216
217
 
218
219
220
221
222
223
224
 
225
226
227
228
...
230
231
232
 
233
234
 
235
236
237
238
0
@@ -128,7 +128,7 @@ class APACHE2
0
     'Hooks.o' => %w(Hooks.cpp Hooks.h
0
         Configuration.h ApplicationPool.h ApplicationPoolServer.h
0
         SpawnManager.h Exceptions.h Application.h MessageChannel.h
0
- SpawnOptions.h Utils.h DirectoryMapper.h),
0
+ PoolOptions.h Utils.h DirectoryMapper.h),
0
     'Utils.o' => %w(Utils.cpp Utils.h),
0
     'Logging.o' => %w(Logging.cpp Logging.h)
0
   }
0
@@ -166,7 +166,7 @@ subdir 'ext/apache2' do
0
     'StandardApplicationPool.h',
0
     'MessageChannel.h',
0
     'SpawnManager.h',
0
- 'SpawnOptions.h',
0
+ 'PoolOptions.h',
0
     'Utils.o',
0
     'Logging.o'
0
   ] do
0
@@ -210,19 +210,19 @@ class TEST
0
       ../ext/apache2/MessageChannel.h),
0
     'SpawnManagerTest.o' => %w(SpawnManagerTest.cpp
0
       ../ext/apache2/SpawnManager.h
0
- ../ext/apache2/SpawnOptions.h
0
+ ../ext/apache2/PoolOptions.h
0
       ../ext/apache2/Application.h
0
       ../ext/apache2/MessageChannel.h),
0
     'ApplicationPoolServerTest.o' => %w(ApplicationPoolServerTest.cpp
0
       ../ext/apache2/ApplicationPoolServer.h
0
- ../ext/apache2/SpawnOptions.h
0
+ ../ext/apache2/PoolOptions.h
0
       ../ext/apache2/MessageChannel.h),
0
     'ApplicationPoolServer_ApplicationPoolTest.o' => %w(ApplicationPoolServer_ApplicationPoolTest.cpp
0
       ApplicationPoolTest.cpp
0
       ../ext/apache2/ApplicationPoolServer.h
0
       ../ext/apache2/ApplicationPool.h
0
       ../ext/apache2/SpawnManager.h
0
- ../ext/apache2/SpawnOptions.h
0
+ ../ext/apache2/PoolOptions.h
0
       ../ext/apache2/Application.h
0
       ../ext/apache2/MessageChannel.h),
0
     'StandardApplicationPoolTest.o' => %w(StandardApplicationPoolTest.cpp
0
@@ -230,9 +230,9 @@ class TEST
0
       ../ext/apache2/ApplicationPool.h
0
       ../ext/apache2/StandardApplicationPool.h
0
       ../ext/apache2/SpawnManager.h
0
- ../ext/apache2/SpawnOptions.h
0
+ ../ext/apache2/PoolOptions.h
0
       ../ext/apache2/Application.h),
0
- 'SpawnOptionsTest.o' => %w(SpawnOptionsTest.cpp ../ext/apache2/SpawnOptions.h),
0
+ 'PoolOptionsTest.o' => %w(PoolOptionsTest.cpp ../ext/apache2/PoolOptions.h),
0
     'UtilsTest.o' => %w(UtilsTest.cpp ../ext/apache2/Utils.h)
0
   }
0
   
...
89
90
91
92
93
94
 
 
 
95
96
 
97
98
99
100
 
 
 
101
102
103
...
189
190
191
192
 
193
194
195
...
256
257
258
259
 
260
261
262
...
89
90
91
 
 
 
92
93
94
95
 
96
97
98
99
100
101
102
103
104
105
106
...
192
193
194
 
195
196
197
198
...
259
260
261
 
262
263
264
265
0
@@ -89,15 +89,18 @@ explicitly define some special types:
0
     inactive_apps. This iterator is only valid if this AppContainer really is
0
     in that list.
0
 
0
-- SpawnOptions
0
- A structure containing additional information, used by the application instance
0
- spawning process.
0
+- PoolOptions
0
+ A structure containing additional information used by the spawn manager's
0
+ spawning process, as well as by the get() function.
0
   
0
- A SpawnOptions has the following members:
0
+ A PoolOptions has the following members:
0
   * max_requests (unsigned integer) - The maximum number of requests that the
0
     application instance may process. After having processed this many requests,
0
     the application instance will be shut down. A value of 0 indicates that there
0
     is no maximum.
0
+ * use_global_queue (boolean) - Whether to use a global queue for all
0
+ application instances, or a queue that's private to the application instance.
0
+ The users guide explains this feature in more detail.
0
 
0
 === Special functions
0
 
0
@@ -189,7 +192,7 @@ Here's an UML diagram in ASCII art:
0
 
0
 # Connect to an existing application instance or to a newly spawned application instance.
0
 # 'app_root' specifies the application root folder of the application. 'options' is an
0
-# object of type 'SpawnOptions', which contains additional information which may be
0
+# object of type 'PoolOptions', which contains additional information which may be
0
 # relevant for spawning.
0
 function get(app_root, options):
0
   MAX_ATTEMPTS = 10
0
@@ -256,7 +259,7 @@ function spawn_or_use_existing(app_root, options):
0
       # spawned for this application domain has been reached.
0
       #
0
       # We're not allowed to spawn a new application instance.
0
- if use_global_queue:
0
+ if options.use_global_queue:
0
         # So we wait until _active_ has changed, then
0
         # we restart this function and try again.
0
         waiting_on_global_queue++
...
24
25
26
27
 
28
29
30
...
92
93
94
95
 
96
97
98
99
100
101
102
 
103
104
105
 
106
107
108
...
115
116
117
118
 
119
120
121
122
123
124
 
125
126
127
...
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
...
24
25
26
 
27
28
29
30
...
92
93
94
 
95
96
97
98
99
100
101
 
102
103
104
 
105
106
107
108
...
115
116
117
 
118
119
120
121
122
123
 
124
125
126
127
...
171
172
173
 
 
 
 
 
 
 
 
 
 
 
 
174
175
176
0
@@ -24,7 +24,7 @@
0
 #include <sys/types.h>
0
 
0
 #include "Application.h"
0
-#include "SpawnOptions.h"
0
+#include "PoolOptions.h"
0
 
0
 namespace Passenger {
0
 
0
@@ -92,17 +92,17 @@ public:
0
   virtual ~ApplicationPool() {};
0
   
0
   /**
0
- * Open a new session with the application specified by <tt>spawnOptions.appRoot</tt>.
0
+ * Open a new session with the application specified by <tt>PoolOptions.appRoot</tt>.
0
    * See the class description for ApplicationPool, as well as Application::connect(),
0
    * on how to use the returned session object.
0
    *
0
    * Internally, this method may either spawn a new application instance, or use
0
    * an existing one.
0
    *
0
- * @param spawnOptions An object containing information on which application to open
0
+ * @param options An object containing information on which application to open
0
    * a session with, as well as spawning details. Spawning details will be used
0
    * if the pool decides that spawning a new application instance is necessary.
0
- * See SpawnManager and SpawnOptions for details.
0
+ * See SpawnManager and PoolOptions for details.
0
    * @return A session object.
0
    * @throw SpawnException An attempt was made to spawn a new application instance, but that attempt failed.
0
    * @throw BusyException The application pool is too busy right now, and cannot
0
@@ -115,13 +115,13 @@ public:
0
    * <tt>get("/home/../home/foo")</tt>, then ApplicationPool will think
0
    * they're 2 different applications, and thus will spawn 2 application instances.
0
    */
0
- virtual Application::SessionPtr get(const SpawnOptions &spawnOptions) = 0;
0
+ virtual Application::SessionPtr get(const PoolOptions &options) = 0;
0
   
0
   /**
0
    * Convenience shortcut for calling get() with default spawn options.
0
    */
0
   virtual Application::SessionPtr get(const string &appRoot) {
0
- return get(SpawnOptions(appRoot));
0
+ return get(PoolOptions(appRoot));
0
   }
0
   
0
   /**
0
@@ -171,18 +171,6 @@ public:
0
   virtual void setMaxPerApp(unsigned int max) = 0;
0
   
0
   /**
0
- * Sets whether to use a global queue instead of a per-backend process
0
- * queue. If enabled, when all backend processes are active, get() will
0
- * wait until there's at least one backend process that's idle, instead
0
- * of queuing the request into a random process's private queue.
0
- * This is especially useful if a website has one or more long-running
0
- * requests.
0
- *
0
- * Defaults to false.
0
- */
0
- virtual void setUseGlobalQueue(bool value) = 0;
0
-
0
- /**
0
    * Get the process ID of the spawn server that is used.
0
    *
0
    * This method exposes an implementation detail. It is used by unit tests to verify
...
300
301
302
303
304
305
306
307
308
309
310
311
...
317
318
319
320
 
321
322
323
...
331
332
333
334
 
335
336
337
...
300
301
302
 
 
 
 
 
 
303
304
305
...
311
312
313
 
314
315
316
317
...
325
326
327
 
328
329
330
331
0
@@ -300,12 +300,6 @@ private:
0
       channel.write("setMaxPerApp", toString(max).c_str(), NULL);
0
     }
0
     
0
- virtual void setUseGlobalQueue(bool value) {
0
- MessageChannel channel(data->server);
0
- boost::mutex::scoped_lock l(data->lock);
0
- channel.write("setUseGlobalQueue", value ? "true" : "false", NULL);
0
- }
0
-
0
     virtual pid_t getSpawnServerPid() const {
0
       this_thread::disable_syscall_interruption dsi;
0
       MessageChannel channel(data->server);
0
@@ -317,7 +311,7 @@ private:
0
       return atoi(args[0].c_str());
0
     }
0
     
0
- virtual Application::SessionPtr get(const SpawnOptions &spawnOptions) {
0
+ virtual Application::SessionPtr get(const PoolOptions &options) {
0
       this_thread::disable_syscall_interruption dsi;
0
       TRACE_POINT();
0
       
0
@@ -331,7 +325,7 @@ private:
0
         vector<string> args;
0
         
0
         args.push_back("get");
0
- spawnOptions.toVector(args);
0
+ options.toVector(args);
0
         channel.write(args);
0
       } catch (const SystemException &) {
0
         UPDATE_TRACE_POINT();
...
234
235
236
237
 
238
239
240
...
318
319
320
321
322
323
324
325
326
327
328
...
380
381
382
383
384
385
386
387
...
234
235
236
 
237
238
239
240
...
318
319
320
 
 
 
 
 
321
322
323
...
375
376
377
 
 
378
379
380
0
@@ -234,7 +234,7 @@ private:
0
     bool failed = false;
0
     
0
     try {
0
- SpawnOptions options(args, 1);
0
+ PoolOptions options(args, 1);
0
       session = server.pool.get(options);
0
       sessions[lastSessionID] = session;
0
       lastSessionID++;
0
@@ -318,11 +318,6 @@ private:
0
     server.pool.setMaxPerApp(maxPerApp);
0
   }
0
   
0
- void processSetUseGlobalQueue(bool value) {
0
- TRACE_POINT();
0
- server.pool.setUseGlobalQueue(value);
0
- }
0
-
0
   void processGetSpawnServerPid(const vector<string> &args) {
0
     TRACE_POINT();
0
     channel.write(toString(server.pool.getSpawnServerPid()).c_str(), NULL);
0
@@ -380,8 +375,6 @@ private:
0
           processGetCount(args);
0
         } else if (args[0] == "setMaxPerApp" && args.size() == 2) {
0
           processSetMaxPerApp(atoi(args[1]));
0
- } else if (args[0] == "setUseGlobalQueue" && args.size() == 2) {
0
- processSetUseGlobalQueue(args[1] == "true");
0
         } else if (args[0] == "getSpawnServerPid" && args.size() == 1) {
0
           processGetSpawnServerPid(args);
0
         } else {
...
73
74
75
 
76
77
78
...
107
108
109
 
110
111
112
...
122
123
124
125
126
127
128
129
...
145
146
147
148
149
150
151
152
...
169
170
171
172
173
174
175
176
...
277
278
279
280
281
 
282
283
 
284
285
 
286
287
288
289
290
...
519
520
521
522
 
523
524
525
...
73
74
75
76
77
78
79
...
108
109
110
111
112
113
114
...
124
125
126
 
 
127
128
129
...
145
146
147
 
 
148
149
150
...
167
168
169
 
 
170
171
172
...
273
274
275
 
 
276
277
 
278
279
 
280
281
 
282
283
284
...
513
514
515
 
516
517
518
519
0
@@ -73,6 +73,7 @@ passenger_config_create_dir(apr_pool_t *p, char *dirspec) {
0
   config->memoryLimit = 0;
0
   config->memoryLimitSpecified = false;
0
   config->highPerformance = DirConfig::UNSET;
0
+ config->useGlobalQueue = DirConfig::UNSET;
0
   return config;
0
 }
0
 
0
@@ -107,6 +108,7 @@ passenger_config_merge_dir(apr_pool_t *p, void *basev, void *addv) {
0
   config->memoryLimit = (add->memoryLimitSpecified) ? add->memoryLimit : base->memoryLimit;
0
   config->memoryLimitSpecified = base->memoryLimitSpecified || add->memoryLimitSpecified;
0
   config->highPerformance = (add->highPerformance == DirConfig::UNSET) ? base->highPerformance : add->highPerformance;
0
+ config->useGlobalQueue = (add->useGlobalQueue == DirConfig::UNSET) ? base->useGlobalQueue : add->useGlobalQueue;
0
   return config;
0
 }
0
 
0
@@ -122,8 +124,6 @@ passenger_config_create_server(apr_pool_t *p, server_rec *s) {
0
   config->maxInstancesPerAppSpecified = false;
0
   config->poolIdleTime = DEFAULT_POOL_IDLE_TIME;
0
   config->poolIdleTimeSpecified = false;
0
- config->useGlobalQueue = false;
0
- config->useGlobalQueueSpecified = false;
0
   config->userSwitching = true;
0
   config->userSwitchingSpecified = false;
0
   config->defaultUser = NULL;
0
@@ -145,8 +145,6 @@ passenger_config_merge_server(apr_pool_t *p, void *basev, void *addv) {
0
   config->maxInstancesPerAppSpecified = base->maxInstancesPerAppSpecified || add->maxInstancesPerAppSpecified;
0
   config->poolIdleTime = (add->poolIdleTime) ? base->poolIdleTime : add->poolIdleTime;
0
   config->poolIdleTimeSpecified = base->poolIdleTimeSpecified || add->poolIdleTimeSpecified;
0
- config->useGlobalQueue = (add->useGlobalQueue) ? base->useGlobalQueue : add->useGlobalQueue;
0
- config->useGlobalQueueSpecified = base->useGlobalQueueSpecified || add->useGlobalQueueSpecified;
0
   config->userSwitching = (add->userSwitchingSpecified) ? add->userSwitching : base->userSwitching;
0
   config->userSwitchingSpecified = base->userSwitchingSpecified || add->userSwitchingSpecified;
0
   config->defaultUser = (add->defaultUser == NULL) ? base->defaultUser : add->defaultUser;
0
@@ -169,8 +167,6 @@ passenger_config_merge_all_servers(apr_pool_t *pool, server_rec *main_server) {
0
     final->maxInstancesPerAppSpecified = final->maxInstancesPerAppSpecified || config->maxInstancesPerAppSpecified;
0
     final->poolIdleTime = (final->poolIdleTimeSpecified) ? final->poolIdleTime : config->poolIdleTime;
0
     final->poolIdleTimeSpecified = final->poolIdleTimeSpecified || config->poolIdleTimeSpecified;
0
- final->useGlobalQueue = (final->useGlobalQueue) ? final->useGlobalQueue : config->useGlobalQueue;
0
- final->useGlobalQueueSpecified = final->useGlobalQueueSpecified || config->useGlobalQueueSpecified;
0
     final->userSwitching = (config->userSwitchingSpecified) ? config->userSwitching : final->userSwitching;
0
     final->userSwitchingSpecified = final->userSwitchingSpecified || config->userSwitchingSpecified;
0
     final->defaultUser = (final->defaultUser != NULL) ? final->defaultUser : config->defaultUser;
0
@@ -277,14 +273,12 @@ cmd_passenger_pool_idle_time(cmd_parms *cmd, void *pcfg, const char *arg) {
0
 
0
 static const char *
0
 cmd_passenger_use_global_queue(cmd_parms *cmd, void *pcfg, int arg) {
0
- ServerConfig *config = (ServerConfig *) ap_get_module_config(
0
- cmd->server->module_config, &passenger_module);
0
+ DirConfig *config = (DirConfig *) pcfg;
0
   if (arg) {
0
- config->useGlobalQueue = true;
0
+ config->useGlobalQueue = DirConfig::ENABLED;
0
   } else {
0
- config->useGlobalQueue = false;
0
+ config->useGlobalQueue = DirConfig::DISABLED;
0
   }
0
- config->useGlobalQueueSpecified = true;
0
   return NULL;
0
 }
0
 
0
@@ -519,7 +513,7 @@ const command_rec passenger_commands[] = {
0
   AP_INIT_FLAG("PassengerUseGlobalQueue",
0
     (Take1Func) cmd_passenger_use_global_queue,
0
     NULL,
0
- ACCESS_CONF | RSRC_CONF,
0
+ OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
0
     "Enable or disable Passenger's global queuing mode mode."),
0
   AP_INIT_FLAG("PassengerUserSwitching",
0
     (Take1Func) cmd_passenger_user_switching,
...
115
116
117
 
 
 
118
119
120
...
167
168
169
 
 
 
 
170
171
172
...
209
210
211
212
213
214
215
216
217
218
219
220
221
...
228
229
230
231
232
233
234
235
236
237
238
239
240
241
...
115
116
117
118
119
120
121
122
123
...
170
171
172
173
174
175
176
177
178
179
...
216
217
218
 
 
 
 
 
 
 
219
220
221
...
228
229
230
 
 
 
 
 
 
 
 
231
232
233
0
@@ -115,6 +115,9 @@
0
       
0
       Threeway highPerformance;
0
       
0
+ /** Whether global queuing should be used. */
0
+ Threeway useGlobalQueue;
0
+
0
       bool isEnabled() const {
0
         return enabled != DISABLED;
0
       }
0
@@ -167,6 +170,10 @@
0
       bool highPerformanceMode() const {
0
         return highPerformance == ENABLED;
0
       }
0
+
0
+ bool usingGlobalQueue() const {
0
+ return useGlobalQueue == ENABLED;
0
+ }
0
     };
0
     
0
     /**
0
@@ -209,13 +216,6 @@
0
        * this server config. */
0
       bool poolIdleTimeSpecified;
0
       
0
- /** Whether global queuing should be used. */
0
- bool useGlobalQueue;
0
-
0
- /** Whether the useGlobalQueue option was explicitly specified
0
- * in this server config. */
0
- bool useGlobalQueueSpecified;
0
-
0
       /** Whether user switching support is enabled. */
0
       bool userSwitching;
0
       
0
@@ -228,14 +228,6 @@
0
        */
0
       const char *defaultUser;
0
       
0
- bool getUseGlobalQueue() const {
0
- if (useGlobalQueueSpecified) {
0
- return useGlobalQueue;
0
- } else {
0
- return false;
0
- }
0
- }
0
-
0
       const char *getDefaultUser() const {
0
         if (defaultUser != NULL) {
0
           return defaultUser;
...
387
388
389
390
 
391
392
393
...
397
398
399
400
 
 
401
402
403
...
749
750
751
752
753
754
755
...
387
388
389
 
390
391
392
393
...
397
398
399
 
400
401
402
403
404
...
750
751
752
 
753
754
755
0
@@ -387,7 +387,7 @@ private:
0
         ServerConfig *sconfig = getServerConfig(r->server);
0
         string appRoot(canonicalizePath(mapper.getPublicDirectory() + "/.."));
0
         
0
- session = applicationPool->get(SpawnOptions(
0
+ session = applicationPool->get(PoolOptions(
0
           appRoot,
0
           true,
0
           sconfig->getDefaultUser(),
0
@@ -397,7 +397,8 @@ private:
0
           config->frameworkSpawnerTimeout,
0
           config->appSpawnerTimeout,
0
           config->getMaxRequests(),
0
- config->getMemoryLimit()));
0
+ config->getMemoryLimit(),
0
+ config->usingGlobalQueue()));
0
         P_TRACE(3, "Forwarding " << r->uri << " to PID " << session->getPid());
0
       } catch (const SpawnException &e) {
0
         r->status = 500;
0
@@ -749,7 +750,6 @@ public:
0
       applicationPool->setMax(config->maxPoolSize);
0
       applicationPool->setMaxPerApp(config->maxInstancesPerApp);
0
       applicationPool->setMaxIdleTime(config->poolIdleTime);
0
- applicationPool->setUseGlobalQueue(config->getUseGlobalQueue());
0
     } catch (const thread_interrupted &) {
0
       P_TRACE(3, "A system call was interrupted during initialization of "
0
         "an Apache child process. Apache is probably restarting or "
...
39
40
41
42
 
43
44
45
...
247
248
249
250
 
251
252
253
254
 
255
256
257
258
259
260
261
 
262
263
264
...
325
326
327
328
 
329
330
331
...
333
334
335
336
 
337
338
339
...
350
351
352
353
 
354
355
356
...
465
466
467
468
 
469
470
471
472
473
474
475
476
 
 
477
478
479
480
481
482
483
 
484
485
486
487
 
488
489
490
491
492
 
493
494
495
...
39
40
41
 
42
43
44
45
...
247
248
249
 
250
251
252
253
 
254
255
256
257
258
259
260
 
261
262
263
264
...
325
326
327
 
328
329
330
331
...
333
334
335
 
336
337
338
339
...
350
351
352
 
353
354
355
356
...
465
466
467
 
468
469
470
471
472
473
474
 
 
475
476
477
478
479
480
481
482
 
483
484
485
486
 
487
488
489
490
491
 
492
493
494
495
0
@@ -39,7 +39,7 @@
0
 #include <signal.h>
0
 
0
 #include "Application.h"
0
-#include "SpawnOptions.h"
0
+#include "PoolOptions.h"
0
 #include "MessageChannel.h"
0
 #include "Exceptions.h"
0
 #include "Logging.h"
0
@@ -247,18 +247,18 @@ private:
0
   /**
0
    * Send the spawn command to the spawn server.
0
    *
0
- * @param spawnOptions The spawn options to use.
0
+ * @param PoolOptions The spawn options to use.
0
    * @return An Application smart pointer, representing the spawned application.
0
    * @throws SpawnException Something went wrong.
0
    */
0
- ApplicationPtr sendSpawnCommand(const SpawnOptions &spawnOptions) {
0
+ ApplicationPtr sendSpawnCommand(const PoolOptions &PoolOptions) {
0
     TRACE_POINT();
0
     vector<string> args;
0
     int ownerPipe;
0
     
0
     try {
0
       args.push_back("spawn_application");
0
- spawnOptions.toVector(args);
0
+ PoolOptions.toVector(args);
0
       channel.write(args);
0
     } catch (const SystemException &e) {
0
       throw SpawnException(string("Could not write 'spawn_application' "
0
@@ -325,7 +325,7 @@ private:
0
         ret = chown(args[1].c_str(), getuid(), getgid());
0
       } while (ret == -1 && errno == EINTR);
0
     }
0
- return ApplicationPtr(new Application(spawnOptions.appRoot,
0
+ return ApplicationPtr(new Application(PoolOptions.appRoot,
0
       pid, args[1], args[2], ownerPipe));
0
   }
0
   
0
@@ -333,7 +333,7 @@ private:
0
    * @throws boost::thread_interrupted
0
    */
0
   ApplicationPtr
0
- handleSpawnException(const SpawnException &e, const SpawnOptions &spawnOptions) {
0
+ handleSpawnException(const SpawnException &e, const PoolOptions &PoolOptions) {
0
     TRACE_POINT();
0
     bool restarted;
0
     try {
0
@@ -350,7 +350,7 @@ private:
0
       restarted = false;
0
     }
0
     if (restarted) {
0
- return sendSpawnCommand(spawnOptions);
0
+ return sendSpawnCommand(PoolOptions);
0
     } else {
0
       throw SpawnException("The spawn server died unexpectedly, and restarting it failed.");
0
     }
0
@@ -465,31 +465,31 @@ public:
0
   
0
   /**
0
    * Spawn a new instance of an application. Spawning details are to be passed
0
- * via the <tt>spawnOptions</tt> parameter.
0
+ * via the <tt>PoolOptions</tt> parameter.
0
    *
0
    * If the spawn server died during the spawning process, then the server
0
    * will be automatically restarted, and another spawn attempt will be made.
0
    * If restarting the server fails, or if the second spawn attempt fails,
0
    * then an exception will be thrown.
0
    *
0
- * @param spawnOptions An object containing the details for this spawn operation,
0
- * such as which application to spawn. See SpawnOptions for details.
0
+ * @param PoolOptions An object containing the details for this spawn operation,
0
+ * such as which application to spawn. See PoolOptions for details.
0
    * @return A smart pointer to an Application object, which represents the application
0
    * instance that has been spawned. Use this object to communicate with the
0
    * spawned application.
0
    * @throws SpawnException Something went wrong.
0
    * @throws boost::thread_interrupted
0
    */
0
- ApplicationPtr spawn(const SpawnOptions &spawnOptions) {
0
+ ApplicationPtr spawn(const PoolOptions &PoolOptions) {
0
     TRACE_POINT();
0
     boost::mutex::scoped_lock l(lock);
0
     try {
0
- return sendSpawnCommand(spawnOptions);
0
+ return sendSpawnCommand(PoolOptions);
0
     } catch (const SpawnException &e) {
0
       if (e.hasErrorPage()) {
0
         throw;
0
       } else {
0
- return handleSpawnException(e, spawnOptions);
0
+ return handleSpawnException(e, PoolOptions);
0
       }
0
     }
0
   }
...
233
234
235
236
237
238
239
...
306
307
308
309
310
311
312
...
432
433
434
435
 
436
437
438
439
440
 
441
442
443
...
481
482
483
484
 
485
486
487
...
506
507
508
509
 
510
511
512
...
539
540
541
542
 
543
544
545
546
547
548
549
 
550
551
552
...
628
629
630
631
632
633
634
...
651
652
653
654
 
655
656
657
...
664
665
666
667
 
668
669
670
...
683
684
685
686
 
687
688
689
...
693
694
695
696
 
697
698
699
...
747
748
749
750
751
752
753
754
755
756
...
233
234
235
 
236
237
238
...
305
306
307
 
308
309
310
...
430
431
432
 
433
434
435
436
437
 
438
439
440
441
...
479
480
481
 
482
483
484
485
...
504
505
506
 
507
508
509
510
...
537
538
539
 
540
541
542
543
544
545
546
 
547
548
549
550
...
626
627
628
 
629
630
631
...
648
649
650
 
651
652
653
654
...
661
662
663
 
664
665
666
667
...
680
681
682
 
683
684
685
686
...
690
691
692
 
693
694
695
696
...
744
745
746
 
 
 
 
747
748
749
0
@@ -233,7 +233,6 @@ private:
0
   boost::thread *cleanerThread;
0
   bool detached;
0
   bool done;
0
- bool useGlobalQueue;
0
   unsigned int maxIdleTime;
0
   unsigned int waitingOnGlobalQueue;
0
   condition cleanerThreadSleeper;
0
@@ -306,7 +305,6 @@ private:
0
     result << "count = " << count << endl;
0
     result << "active = " << active << endl;
0
     result << "inactive = " << inactiveApps.size() << endl;
0
- result << "Using global queue: " << (useGlobalQueue ? "yes" : "no") << endl;
0
     result << "Waiting on global queue: " << waitingOnGlobalQueue << endl;
0
     result << endl;
0
     
0
@@ -432,12 +430,12 @@ private:
0
    * @throws SystemException
0
    */
0
   pair<AppContainerPtr, Domain *>
0
- spawnOrUseExisting(boost::mutex::scoped_lock &l, const SpawnOptions &spawnOptions) {
0
+ spawnOrUseExisting(boost::mutex::scoped_lock &l, const PoolOptions &options) {
0
     beginning_of_function:
0
     
0
     this_thread::disable_interruption di;
0
     this_thread::disable_syscall_interruption dsi;
0
- const string &appRoot(spawnOptions.appRoot);
0
+ const string &appRoot(options.appRoot);
0
     AppContainerPtr container;
0
     Domain *domain;
0
     AppContainerList *instances;
0
@@ -481,7 +479,7 @@ pri