Apple WebObjects 3.5 Uživatelský manuál Strana 155

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 218
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 154
Automatically Terminating an Application
155
Automatically Terminating an Application
Unless an application is very carefully constructed, the longer it runs, the
more memory it consumes. As more memory is consumed, the server
machine’s performance begins to degrade. For this reason, you may find
that performance is greatly improved if you occasionally stop an application
instance and start a new one.
You can stop an application manually using the Monitor application
(described in the online document Serving WebObjects). Or you can include
code in the application to have it automatically terminate itself under
certain conditions. Either way, you might want to turn on application auto-
recovery in the Monitor application; that way, when the application dies, it
automatically restarts.
Idle time. If no users are accessing the application, you might want to shut
it down until a user requests it. To do so, use WOApplication’s
setTimeOut:
method. This method shuts down the application after it has been idle
for a given number of seconds.
public Application() {
super();
this.setTimeOut(2*60*60); //shut down if idle 2 hours
...
}
Running time. You can have an application terminate itself after a specific
amount of time has elapsed, regardless of whether it is idle or not using
the
terminateAfterTimeInterval: method. For example, the following
application will terminate after 24 hours.
public Application() {
super();
this.terminateAfterTimeInterval(24*60*60);
...
}
After the specified time limit has elapsed, terminateAfterTimeInterval:
immediately stops all current processing. If any sessions are active,
users may lose information.
Session count. An application can also terminate if the number of active
sessions falls below a certain number. Use
setMinimumActiveSessionsCount: to
set this number, and then send
refuseNewSessions: to prevent the
application from creating more sessions. For example, if you want to
shut down your application after 24 hours but you want any current
Zobrazit stránku 154
1 2 ... 150 151 152 153 154 155 156 157 158 159 160 ... 217 218

Komentáře k této Příručce

Žádné komentáře

LG 42LB550A manuali

Manuali dei proprietari e guide per l'utente per TV a cristalli liquidi LG 42LB550A.
We fornisce 3 manuali pdf LG 42LB550A per scaricare gratuitamente in base al tipo di documento: Manuale Utente






Più prodotti e manuali per TV a cristalli liquidi LG

Modelli Tipo di Documento
79UX340C Manuale Utente   LG 79UX340C Owner’s Manual [el] , 56 pagine
49UB8500 Manuale Utente   LG 49UB8500,105UC9 用戶指南 [el] , 56 pagine
RZ-37LZ30 Manuale Utente   LG RZ-37LZ30 Owner’s Manual, 44 pagine
49UF6300 Manuale Utente   LG 43UF6300-CD,43UF6300,49UF6300,49UF6300-CD 产品说明书, 63 pagine
55UH770T Manuale Utente   LG 55UH770T Owner's manual [en] , 41 pagine
32LJ514D Manuale Utente   LG 32LJ514D Owner’s Manual [en] , 49 pagine
55UH61700GI Manuale Utente   LG 55UH617T Owner's manual, 44 pagine
24MT49S-PZ Manuale Utente   LG 24MT49S-PZ Інструкція користувача, 34 pagine
29FU1RLD Manuale Utente   LG 29FU1RLD manuel du propriétaire, 18 pagine
49LX761H Manuale Utente   LG 49LX761H دليل المالك, 22 pagine
CT-25Q25VE Manuale Utente   LG CT-25Q25VE Owner’s Manual, 32 pagine
20LC1RB Manuale Utente    LG 20LC1RB دليل المالك, 32 pagine
29FU6RLD Manuale Utente   LG 29FU6RLD Owner's manual [en] , 8 pagine
32LB1R Manuale Utente LG 32LB1R Brukermanual, 64 pagine
L3020T Manuale Utente   LG L3020T Owner’s Manual, 41 pagine
39LN5420-TC Manuale Utente   LG 39LN5420-TC manuel du propriétaire, 41 pagine
20CD1RGE Manuale Utente   LG 20CD1RGE Owner’s Manual, 28 pagine
RT-21FD70V Manuale Utente   LG RT-21FD70V Owner’s Manual, 32 pagine
60PA6500 Manuale Utente   LG 50PA6500 Owner's manual [en] , 72 pagine
70UF7700 Manuale Utente   LG 70UF7700 Owner’s Manual [en] , 24 pagine