Lines 168-173
Link Here
|
168 |
*/ |
168 |
*/ |
169 |
boolean antiJARLocking = false; |
169 |
boolean antiJARLocking = false; |
170 |
|
170 |
|
|
|
171 |
/** |
172 |
* Set static fields of loaded classes to null when undeploying to prevent |
173 |
* memory leaks. |
174 |
*/ |
175 |
boolean nullifyReferences = true; |
171 |
|
176 |
|
172 |
// ----------------------------------------------------------- Constructors |
177 |
// ----------------------------------------------------------- Constructors |
173 |
|
178 |
|
Lines 424-438
Link Here
|
424 |
return antiJARLocking; |
429 |
return antiJARLocking; |
425 |
} |
430 |
} |
426 |
|
431 |
|
427 |
|
432 |
/** |
428 |
/** |
|
|
429 |
* @param antiJARLocking The antiJARLocking to set. |
433 |
* @param antiJARLocking The antiJARLocking to set. |
430 |
*/ |
434 |
*/ |
431 |
public void setAntiJARLocking(boolean antiJARLocking) { |
435 |
public void setAntiJARLocking(boolean antiJARLocking) { |
432 |
this.antiJARLocking = antiJARLocking; |
436 |
this.antiJARLocking = antiJARLocking; |
433 |
} |
437 |
} |
|
|
438 |
|
439 |
/** |
440 |
* @param flag The nullifyReferences to set. |
441 |
*/ |
442 |
public void setNullifyReferences(boolean flag) { |
443 |
this.nullifyReferences = flag; |
444 |
} |
434 |
|
445 |
|
|
|
446 |
/** |
447 |
* @return Returns the nullifyReferences. |
448 |
*/ |
449 |
public boolean getNullifyReferences() { |
450 |
return nullifyReferences; |
451 |
} |
435 |
|
452 |
|
|
|
453 |
|
454 |
|
436 |
/** |
455 |
/** |
437 |
* If there is a Java SecurityManager create a read FilePermission |
456 |
* If there is a Java SecurityManager create a read FilePermission |
438 |
* or JndiPermission for the file directory path. |
457 |
* or JndiPermission for the file directory path. |
Lines 1587-1592
Link Here
|
1587 |
} |
1606 |
} |
1588 |
} |
1607 |
} |
1589 |
|
1608 |
|
|
|
1609 |
if(nullifyReferences) { |
1590 |
// Null out any static or final fields from loaded classes, |
1610 |
// Null out any static or final fields from loaded classes, |
1591 |
// as a workaround for apparent garbage collection bugs |
1611 |
// as a workaround for apparent garbage collection bugs |
1592 |
Iterator loadedClasses = ((HashMap) resourceEntries.clone()).values().iterator(); |
1612 |
Iterator loadedClasses = ((HashMap) resourceEntries.clone()).values().iterator(); |
Lines 1633-1639
Link Here
|
1633 |
} |
1653 |
} |
1634 |
} |
1654 |
} |
1635 |
} |
1655 |
} |
1636 |
|
1656 |
} |
1637 |
// Remove entries for this webapp from the JSP EL BeanInfo cache |
1657 |
// Remove entries for this webapp from the JSP EL BeanInfo cache |
1638 |
cleanElCache(); |
1658 |
cleanElCache(); |
1639 |
|
1659 |
|